Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
870594f56b40b6394366a382221f29f5
568376d5841031b748c6021beef486b5
28 changes: 18 additions & 10 deletions dev/breeze/doc/images/output_workflow-run_publish-docs.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
75a6fa574a8867b8a681f4792aa21a3c
aee3662a42543b525bf4ccfd23adaf62
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
APACHE_AIRFLOW_GITHUB_REPOSITORY,
CURRENT_PYTHON_MAJOR_MINOR_VERSIONS,
DEFAULT_PYTHON_MAJOR_MINOR_VERSION,
DESTINATION_LOCATIONS,
MULTI_PLATFORM,
UV_VERSION,
)
Expand Down Expand Up @@ -3899,6 +3900,7 @@ def generate_issue_content(
@click.option(
"--destination-location",
help="Name of the S3 bucket to publish the documentation to.",
type=NotVerifiedBetterChoice(DESTINATION_LOCATIONS),
required=True,
)
@click.option(
Expand Down
31 changes: 19 additions & 12 deletions dev/breeze/src/airflow_breeze/commands/workflow_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ def workflow_run():
help="Git reference tag to checkout to build documentation.",
required=True,
)
@click.option(
"--skip-tag-validation",
help="Skip validation of the tag. Allows to use `main` or commit hash. Use with caution.",
is_flag=True,
)
@click.option(
"--exclude-docs",
help="Comma separated list of docs packages to exclude from the publish.",
Expand All @@ -72,27 +77,29 @@ def workflow_run_publish(
ref: str,
exclude_docs: str,
site_env: str,
skip_tag_validation: bool,
doc_packages: tuple[str, ...],
skip_write_to_stable_folder: bool = False,
):
get_console().print(
f"[blue]Validating ref: {ref}[/blue]",
)

tag_result = run_command(
["gh", "api", f"repos/apache/airflow/git/refs/tags/{ref}"],
capture_output=True,
check=False,
)
if not skip_tag_validation:
tag_result = run_command(
["gh", "api", f"repos/apache/airflow/git/refs/tags/{ref}"],
capture_output=True,
check=False,
)

stdout = tag_result.stdout.decode("utf-8")
tag_respo = json.loads(stdout)
stdout = tag_result.stdout.decode("utf-8")
tag_respo = json.loads(stdout)

if not tag_respo.get("ref"):
get_console().print(
f"[red]Error: Ref {ref} is not exists in repo apache/airflow .[/red]",
)
sys.exit(1)
if not tag_respo.get("ref"):
get_console().print(
f"[red]Error: Ref {ref} does not exists in repo apache/airflow .[/red]",
)
sys.exit(1)

get_console().print(
f"[blue]Triggering workflow {WORKFLOW_NAME_MAPS['publish-docs']}: at {APACHE_AIRFLOW_REPO}[/blue]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"name": "Trigger publish docs workflow",
"options": [
"--ref",
"--skip-tag-validation",
"--exclude-docs",
"--site-env",
"--skip-write-to-stable-folder",
Expand Down
5 changes: 5 additions & 0 deletions dev/breeze/src/airflow_breeze/global_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@
"task-sdk",
]

DESTINATION_LOCATIONS = [
"s3://live-docs-airflow-apache-org/docs/",
"s3://staging-docs-airflow-apache-org/docs/",
]


@clearable_cache
def all_selective_core_test_types() -> tuple[str, ...]:
Expand Down