Skip to content

Commit 0c71238

Browse files
authored
Pre-release distributions documentation links use staged.apache.org (#50536)
1 parent 656c170 commit 0c71238

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

dev/breeze/src/airflow_breeze/templates/pyproject_TEMPLATE.toml.jinja2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ apache-airflow-providers-common-sql = {workspace = true}
124124
apache-airflow-providers-standard = {workspace = true}
125125

126126
[project.urls]
127-
"Documentation" = "https://airflow.apache.org/docs/{{ PACKAGE_PIP_NAME }}/{{RELEASE}}"
128-
"Changelog" = "https://airflow.apache.org/docs/{{ PACKAGE_PIP_NAME }}/{{RELEASE}}/changelog.html"
127+
"Documentation" = "{{ AIRFLOW_DOC_URL }}/docs/{{ PACKAGE_PIP_NAME }}/{{RELEASE}}"
128+
"Changelog" = "{{ AIRFLOW_DOC_URL }}/docs/{{ PACKAGE_PIP_NAME }}/{{RELEASE}}/changelog.html"
129129
"Bug Tracker" = "https://github.com/apache/airflow/issues"
130130
"Source Code" = "https://github.com/apache/airflow"
131131
"Slack Chat" = "https://s.apache.org/airflow-slack"

dev/breeze/src/airflow_breeze/utils/packages.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,9 @@ def regenerate_pyproject_toml(
877877
new_optional_dependencies.append(modified_dependency)
878878
optional_dependencies = new_optional_dependencies
879879
context["INSTALL_REQUIREMENTS"] = "\n".join(required_dependencies)
880+
context["AIRFLOW_DOC_URL"] = (
881+
"https://airflow.staged.apache.org" if version_suffix else "https://airflow.apache.org"
882+
)
880883
cross_provider_ids = set(PROVIDER_DEPENDENCIES.get(provider_details.provider_id)["cross-providers-deps"])
881884
cross_provider_dependencies = []
882885
# Add cross-provider dependencies to the optional dependencies if they are missing
@@ -1046,6 +1049,9 @@ def update_version_suffix_in_non_provider_pyproject_toml(version_suffix: str, py
10461049
if base_line.startswith("version = "):
10471050
get_console().print(f"[info]Updating version suffix to {version_suffix} for {line}.")
10481051
base_line = base_line.rstrip('"') + f'{version_suffix}"'
1052+
if "https://airflow.apache.org/" in base_line and version_suffix:
1053+
get_console().print(f"[info]Updating documentation link to staging for {line}.")
1054+
base_line = base_line.replace("https://airflow.apache.org/", "https://airflow.staged.apache.org/")
10491055
# do not modify references for .post prefixes
10501056
if not version_suffix.startswith(".post"):
10511057
if base_line.strip().startswith('"apache-airflow-') and ">=" in base_line:

0 commit comments

Comments
 (0)