ashb commented on code in PR #63968:
URL: https://github.com/apache/airflow/pull/63968#discussion_r2964762593
##########
scripts/ci/prek/check_execution_api_versions.py:
##########
@@ -23,32 +23,35 @@
# ///
from __future__ import annotations
+import json
import os
import subprocess
import sys
+import tempfile
+from pathlib import Path
from common_prek_utils import console
DATAMODELS_PREFIX =
"airflow-core/src/airflow/api_fastapi/execution_api/datamodels/"
VERSIONS_PREFIX =
"airflow-core/src/airflow/api_fastapi/execution_api/versions/"
+TARGET_BRANCH = "main"
def get_changed_files_ci() -> list[str]:
- """Get changed files in a CI environment by comparing against the target
branch."""
- target_branch = os.environ.get("GITHUB_BASE_REF") or "main"
+ """Get changed files in CI by comparing against main."""
fetch_result = subprocess.run(
- ["git", "fetch", "origin", target_branch],
+ ["git", "fetch", "upstream", TARGET_BRANCH],
Review Comment:
"Upstream" is wrong here too - CI only has an origin remote. And my working
copy has "apache" for instance
##########
scripts/ci/prek/check_execution_api_versions.py:
##########
@@ -23,32 +23,35 @@
# ///
from __future__ import annotations
+import json
import os
import subprocess
import sys
+import tempfile
+from pathlib import Path
from common_prek_utils import console
DATAMODELS_PREFIX =
"airflow-core/src/airflow/api_fastapi/execution_api/datamodels/"
VERSIONS_PREFIX =
"airflow-core/src/airflow/api_fastapi/execution_api/versions/"
+TARGET_BRANCH = "main"
Review Comment:
This shouldn't be hard coded - it will mess up when we start cherry picking
to 3-2-test once main has moved on
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]