This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v3-0-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-0-test by this push:
new b7db19e0cfa [v3-0-test] Make GITHUB_TOKEN variable mandatory when
updating installers (#53452) (#53457)
b7db19e0cfa is described below
commit b7db19e0cfae87b3de114f9a97b47ea9b254ef55
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sat Jul 19 14:15:37 2025 +0200
[v3-0-test] Make GITHUB_TOKEN variable mandatory when updating installers
(#53452) (#53457)
When running "update-installers-and-pre-commit" pre-commit, the script
is virtually guaranteed to fail with "rate limits" reached if you do
not use GITHUB_TOKEN. This change makes GITHUB_TOKEN variable mandatory
for the pre-commit, it prints the helpful information and prints URL
that allows to create such GITHUB_TOKEN very easily.
(cherry picked from commit aeb0d4cafa11ddc0d29bd7c64117195f8ac3768e)
Co-authored-by: Jarek Potiuk <[email protected]>
---
scripts/ci/pre_commit/update_installers_and_pre_commit.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/scripts/ci/pre_commit/update_installers_and_pre_commit.py
b/scripts/ci/pre_commit/update_installers_and_pre_commit.py
index eed555e93fe..70054b6d550 100755
--- a/scripts/ci/pre_commit/update_installers_and_pre_commit.py
+++ b/scripts/ci/pre_commit/update_installers_and_pre_commit.py
@@ -249,6 +249,16 @@ def replace_version(pattern: re.Pattern[str], version:
str, text: str, keep_tota
if __name__ == "__main__":
+ if not GITHUB_TOKEN:
+ console.print(
+ "[red]GITHUB_TOKEN environment variable is not set. This will lead
to failures on rate limits.[/]\n"
+ "Please set it to a valid GitHub token with public_repo scope. You
can create one by clicking "
+ "the URL:\n\n"
+
"https://github.com/settings/tokens/new?scopes=public_repo&description=airflow-update-installers-and-pre-commit\n\n"
+ "Once you have the token you can prepend pre-commit command with
GITHUB_TOKEN='<your token>' or"
+ "set it in your environment with export GITHUB_TOKEN='<your
token>'\n\n"
+ )
+ sys.exit(1)
changed = False
golang_version = get_latest_golang_version()
pip_version = get_latest_pypi_version("pip")