-
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
Bogus error alert when a team member adds a new GitLab project #6743
Comments
/schedule |
@JanKoehnlein: Issue scheduled in the meta team (WIP: 0) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign |
When creating a project from a GitLab repo, we use the team owner's token to install the pre-build automation. In this case, this fails because the owner doesn't have a GItLab token yet, so we throw an error. This raises a couple of questions
My feeling is we shouldn't use another user's token and we should report back in the UI if prebuilds couldn't be enabled (with a link to instructions how to do this manually). But that'd require a protocol change. Opinions? |
Wow. Excellent and scary find. Thanks! @AlexTugarev For GitLab, do you remember why we impersonate a random owner from the Team to install the Prebuilds webhook, as opposed to doing it as the user who is adding the project? I think I remember a meeting where we agreed that impersonating other users is bad practice, and doing things as the logged-in user is:
Do you see any technical limitations that would prevent us from installing the Prebuilds webhook as the user who is adding the project, and not as a random team owner? (E.g. maybe I'm missing something regarding who has access to what, and using the logged-in user's token won't actually work.) |
Bug description
When adding a new GitLab project as a team member, I'm immediately presented with an error alert:
However, adding the project was actually successful.
Steps to reproduce
In a regular browser window:
Next, in a private browser window:
You will see a pop-up that says
Request createProject failed with message: UnauthorizedError
(see above screenshot)However, the project was actually successfully added to the team (you can see it if you navigate away from the error and back into the team projects)
Workspace affected
No response
Expected behavior
I shouldn't see the error alert, but instead be able to continue in the wizard as usual.
Example repository
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: