GH-50532: [R][CI] R nightly binary upload broken since github3 to pygithub migration#50533
Open
thisisnic wants to merge 1 commit into
Open
GH-50532: [R][CI] R nightly binary upload broken since github3 to pygithub migration#50533thisisnic wants to merge 1 commit into
thisisnic wants to merge 1 commit into
Conversation
|
|
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a regression in Archery Crossbow’s GitHub client initialization so CI workflows (notably r_nightly.yml) can download artifacts from the public crossbow repository even when no CROSSBOW_GITHUB_TOKEN is provided, restoring the pre-migration unauthenticated behavior.
Changes:
- Add a fallback to create an unauthenticated
PyGithub.Github()client when the token isNone. - Prevent the
Auth.Token(None)assertion failure introduced by the github3 → PyGithub migration.
Comment on lines
454
to
457
| github_token = github_token or self.github_token | ||
| if github_token is None: | ||
| return Github(timeout=30) | ||
| return Github(auth=GithubAuth.Token(github_token), timeout=30) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
#48886 replaced github3 with pygithub in archery. Unlike github3, pygithub's
Auth.Tokenrequires a non-None string, so_github_login()crashes when no token is provided. Ther_nightly.ymlworkflow doesn't passCROSSBOW_GITHUB_TOKENto archery, so it has been failing since June 19 (#50532). No R nightly binaries have been uploaded for a month.What changes are included in this PR?
Fall back to unauthenticated
Github()when no token is provided, restoring the pre-migration behavior. The crossbow repo is public so auth isn't required for downloading artifacts.Are these changes tested?
Tested locally by running
archery crossbow download-artifactswithout a token set.Are there any user-facing changes?
No.