Skip to content

Handle GitLab ref lookup rejections immediately - #21561

Closed
kylos101 wants to merge 1 commit into
mainfrom
fix/gitlab-missing-ref-not-found
Closed

Handle GitLab ref lookup rejections immediately#21561
kylos101 wants to merge 1 commit into
mainfrom
fix/gitlab-missing-ref-not-found

Conversation

@kylos101

@kylos101 kylos101 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • await the GitLab repository and ref lookups together so both promises receive rejection handlers immediately
  • preserve the existing missing-ref error semantics
  • add a regression test using a percent-encoded zero-width character in the missing ref while the repository lookup remains pending

Root cause

The ref lookup started before the repository lookup completed, but its promise was not awaited until afterward. When ref resolution failed first, Node reported an unhandled rejection before the request eventually observed and propagated the same error.

Validation

  • yarn workspace @gitpod/server build
  • yarn workspace @gitpod/server test:unit -- --grep 'GitlabContextParserUnitSpec'
  • pre-commit run --files components/server/src/gitlab/gitlab-context-parser.ts components/server/src/gitlab/gitlab-context-parser.unit.spec.ts
  • regression check: the focused test fails with the previous sequential await ordering because it observes the unhandled rejection, and passes with Promise.all()

@kylos101
kylos101 requested a review from a team as a code owner August 3, 2026 06:08
@kylos101
kylos101 force-pushed the fix/gitlab-missing-ref-not-found branch from 43f38fe to 27468da Compare August 3, 2026 06:14
@kylos101
kylos101 marked this pull request as draft August 3, 2026 06:44
Co-authored-by: Codex <noreply@openai.com>
@kylos101
kylos101 force-pushed the fix/gitlab-missing-ref-not-found branch from 27468da to 0391fa8 Compare August 3, 2026 06:55
@kylos101 kylos101 changed the title Fix missing GitLab refs in Public API Handle GitLab ref lookup rejections immediately Aug 3, 2026
@kylos101
kylos101 deployed to branch-build August 3, 2026 06:56 — with GitHub Actions Active
@kylos101 kylos101 closed this Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant