Skip to content

[llvm][docs] Document how to get admin permissions for a Buildbot worker #108561

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

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

DavidSpickett
Copy link
Collaborator

I spent a long time trying different combinations of primary and verified emails, until a colleague tried it who happened to have a public profile email set when I did not.

Document how this works to save everyone else the legwork.

@DavidSpickett
Copy link
Collaborator Author

And if you're wondering, the console output looks like:

{"jsonrpc":"2.0","id":332,"error":{"code":-32600,"message":" You must be the worker owner."}}
<as many times as there are pending requests>

I'm not sure why I thought to check it at all, so I figured it was worth mentioning even though it's a bit of an unintended feature.

I spent a long time trying different combinations of primary and verified
emails, until a colleague tried it who happened to have a public profile
email set when I did not.

Document how this works to save everyone else the legwork.
@DavidSpickett
Copy link
Collaborator Author

ping! @gkistanova

@DavidSpickett
Copy link
Collaborator Author

ping!

Though I know the instructions do work, so I will go ahead and land this if there's no input in the next week.

@DavidSpickett DavidSpickett changed the title [llvm][docs] Document how to get admin permissions for a worker [llvm][docs] Document how to get admin permissions for a Buildbot worker Oct 9, 2024
@DavidSpickett DavidSpickett merged commit 57cd6d8 into llvm:main Oct 14, 2024
8 of 10 checks passed
@DavidSpickett DavidSpickett deleted the bb-docs branch October 14, 2024 08:09
DanielCChen pushed a commit to DanielCChen/llvm-project that referenced this pull request Oct 16, 2024
…ker (llvm#108561)

I spent a long time trying different combinations of primary and
verified emails, until a colleague tried it who happened to have a
public profile email set when I did not.

Document how this works to save everyone else the legwork.
@asb
Copy link
Contributor

asb commented Oct 20, 2024

Firstly, thank you for documenting this - I recently had to reach out to Galina for help with this, but I failed to think to follow up to document it.

I know it's post-commit, but two thoughts:

  • Might it be better to suggest people go to to https://github.com/settings/emails while logged in to review the emails associated with their account? For me at least, github.com/asb doesn't show anything very useful.
  • I was surprised to hear it's working for you with an email other than your primary one. I wasn't able to get login to work on the lab.llvm.org until I switched the admin email for my bots over to [email protected] (my GH primary email) rather than [email protected] (the backup email). It's possible there was something else going on (e.g. caching) that caused me to think that was the fix.

@DavidSpickett
Copy link
Collaborator Author

The key point here is that Buildbot sees the email listed on your public GitHub profile page. That email must therefore be associated with the account, but it can be primary or secondary, as long as you've chosen to show it on your profile.

I see you have [email protected] on your public profile, so by switching to that now Buildbot sees it on your public profile as well and you're seen as the admin.

This is what had me stuck for ages, it was only by chance a colleague interpreted "GitHub email" to mean "GitHub profile email" and we realised what was happening.

That said, if that's not clear I'll update the wording.

@asb
Copy link
Contributor

asb commented Oct 22, 2024

The key point here is that Buildbot sees the email listed on your public GitHub profile page. That email must therefore be associated with the account, but it can be primary or secondary, as long as you've chosen to show it on your profile.

You know I think this is the key reason for my confusion, because when you login and grant oauth permissions to the buildbot it requests permission to "Access user email addresses (read-only)". ie. the user:email permission here which should allow listing all email addresses https://docs.github.com/en/rest/users/emails?apiVersion=2022-11-28#list-email-addresses-for-the-authenticated-user

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.

3 participants