GH-47075: [Release][Dev] Use GH_TOKEN as GitHub token environment variable#47181
GH-47075: [Release][Dev] Use GH_TOKEN as GitHub token environment variable#47181kou merged 7 commits intoapache:mainfrom
Conversation
|
|
da363b6 to
96e0eb1
Compare
…nt variable We can still use `ARROW_GITHUB_API_TOKEN` and `CROSSBOW_GITHUB_TOKEN` for backward compatibility but `GH_TOKEN` is recommended.
amoeba
left a comment
There was a problem hiding this comment.
+1, thanks @kou. I left some comments.
Should we update this comment in .env.example too?
diff --git a/dev/release/.env.example b/dev/release/.env.example
index c1e012aacb..43af2851db 100644
--- a/dev/release/.env.example
+++ b/dev/release/.env.example
@@ -31,7 +31,7 @@
# You must set this.
#ARTIFACTORY_API_KEY=secret
-# The GitHub token to upload artifacts to GitHub Release.
+# The GitHub token used in numerous release scripts.
#
# You must set this.
#GH_TOKEN=secret| token = config["github"]["api_token"] | ||
| if not token: | ||
| token = os.environ.get('GH_TOKEN') | ||
| if not token: |
There was a problem hiding this comment.
Do we want to warn people they're still using ARROW_GITHUB_API_TOKEN to allow us to fully deprecate it at some point?
There was a problem hiding this comment.
Good point. I've added warning message.
Co-authored-by: Bryce Mecum <petridish@gmail.com>
CROSSBOW_GITHUB_TOKEN is for ursacomputing/crossbow and GH_TOKEN is for apache/arrow. We may want to use different token for them.
kou
left a comment
There was a problem hiding this comment.
Thanks for the suggestion. I've updated the comment in .env.example.
| token = config["github"]["api_token"] | ||
| if not token: | ||
| token = os.environ.get('GH_TOKEN') | ||
| if not token: |
There was a problem hiding this comment.
Good point. I've added warning message.
|
I'll merge this. |
|
Thanks for your work on this @kou. |
|
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit ea5dad5. There weren't enough matching historic benchmark results to make a call on whether there were regressions. The full Conbench report has more details. |
Rationale for this change
We have many environment variables for GitHub token:
GH_TOKEN,ARROW_GITHUB_API_TOKENandCROSSBOW_GITHUB_TOKENIt's difficult to maintain. For example, we may forget to define one of them.
What changes are included in this PR?
Use
GH_TOKENas unified environment variable for GitHub token.We can still use
ARROW_GITHUB_API_TOKENandCROSSBOW_GITHUB_TOKENfor backward compatibility butGH_TOKENis recommended.Are these changes tested?
Yes.
Are there any user-facing changes?
No.