-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce project slug #6376
Introduce project slug #6376
Conversation
I am currently on leave, but I can monitor this so I won't block the progress. |
/werft run 👍 started the job as gitpod-build-laushinka-url-5847.14 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @laushinka! Great to see this change happening! 🍰
issue: When I tried to add an existing GitLab project it didn't work as expected as you mentioned, however, I tried creating a new GitLab project and then adding it as a project in Gitpod but the same issue occurred.
issue: The same issue is also present on GitHub repositories on production. Is this PR also resolving this issue?
thought: Regarding the GH (GitHub) app, there's some relevant documentation (internal) which could help set up the app for this preview environment if you need.
/werft run 👍 started the job as gitpod-build-laushinka-url-5847.15 |
/werft run 👍 started the job as gitpod-build-laushinka-url-5847.16 |
Hi, @gtsiolis! Thanks for starting to review it 🙌🏽
Could you send screenshots or a recording? I tested it and it "worked on my machine" but I could be missing some steps or doing it incorrectly.
Same as above, if you could send some screenshots or recording? I'm not aware that this bug exists for the GitHub ones, and just checked to confirm it too. |
@gitpod-io/engineering-meta Just noticed that George is off, so if anyone would like to pick up the reviewing, that would be awesome 🤗 |
1dd35b7
to
14b996d
Compare
/werft run 👍 started the job as gitpod-build-laushinka-url-5847.18 |
14b996d
to
79d371b
Compare
if (!(await columnExists(queryRunner, "d_b_project", "slug"))) { | ||
await queryRunner.query("ALTER TABLE d_b_project ADD COLUMN `slug` varchar(255) NULL"); | ||
} | ||
if (await columnExists(queryRunner, "d_b_project", "slug")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we do something for Gitlab repos here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean for the existing GitLab repos? That's the problem that I ran into, hence why this PR doesn't address existing GitLab repos. Existing GitLab ones have the wrong format in the name
column, and we shouldn't populate the slug
column with these. I'm not sure how best to populate existing ones with the correct slug. Ideas are very welcome 🙏🏽
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#5847 was closed when this PR merged.
Regarding the strategy for #5847 (comment), my initial approach (perhaps naive) would have been to "lookup" the slug in GitLab by pulling in the repo details using the repo url. There would be a risk of collisions when we do that since I would expect that project slugs have to be unique within the team or user's project namespace.
Upon further reflection however, I'm inclined to go for option # 3
Leave the existing projects be. In the PR, existing GitLab projects will have NULL in the slug column, and the name column will be used instead, which is the current situation.
because:
- breaking URLs is not a good idea and
- I expect that we will end up offering a way to edit project slugs at some point in the future, and when we do that, should also offer redirect capabilities like people have come to expect (from GitHub).
/lgtm |
LGTM label has been added. Git tree hash: aed42b4825ea190de2be75fd7c977e8784457d6d
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JanKoehnlein Associated issue: #5847 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
This PR:
Related Issue(s)
Maybe partially fixes #5847 because this PR does not tackle existing GitLab projects. Detailed thoughts in the issue here.
How to test
Note: I do not have a GitHub app in my preview envs. If anyone could test it with theirs, please do. Nothing should change for GitHub projects.
Release Notes
Documentation