gitpod-io / gitpod-io/gitpod

Can not open file context sometimes for specific filenames in GitLab

Open
#8,600 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature: context awareness git provider: gitlab meta: never-stale team: webapp type: bug
Dominant language
TypeScript
Stars
13.8k
Forks
1.4k
Avg merge
17h 58m
Merged PRs (30d)
5

Description

Bug description

Although we've removed the file context from the docs, opening a file directly from the tree in Gitpod works as expected.

However, this does not work sometimes for specific filenames in GitLab.

See relevant issue in https://gitlab.com/gitlab-org/gitlab/-/issues/354263 and relevant discussion (internal).

Steps to reproduce

For example, try the two following example URLs:

  1. https://gitpod.io/#https://gitlab.com/gitpod-io/gitlab/-/tree/master/.gitpod.yml
  2. https://gitpod.io/#https://gitlab.com/gitpod-io/gitlab/-/tree/master/yarn.lock

Both fail with the following error on the workspace start page:

GitLab ApiError on searching for possible branches for gitpod-io/gitlab/tree/master/.gitpod.yml: GitLabApiError: GitLab Request Error: The branch refname is invalid

Screenshot 2022-03-04 at 2 55 26 PM
Workspace affected

No response

Expected behavior

No response

Example repository

No response

Anything else?

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the two GitLab URLs in the issue and trace the workspace start-page handling of the GitLab branch-ref error. The fix is complete when both the .gitpod.yml and yarn.lock URLs open successfully without the invalid branch refname error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.