amoghrajesh commented on code in PR #33207:
URL: https://github.com/apache/airflow/pull/33207#discussion_r1287908808
##########
dev/breeze/src/airflow_breeze/utils/add_back_references.py:
##########
@@ -149,26 +141,23 @@ def generate_back_references(link: str, base_path: Path):
create_back_reference_html(relative_path, dest_file_path)
-def start_generating_back_references(
- gen_type: GenerationType, airflow_site_directory: Path,
short_provider_package_ids: list[str]
-):
- # Either packages or gen_type should be provided
+def start_generating_back_references(airflow_site_directory: Path,
short_provider_package_ids: list[str]):
docs_archive_path = airflow_site_directory / "docs-archive"
airflow_docs_path = docs_archive_path / "apache-airflow"
helm_docs_path = docs_archive_path / "helm-chart"
-
- if gen_type == GenerationType.airflow:
+ if "apache-airflow" in short_provider_package_ids:
generate_back_references(airflow_redirects_link, airflow_docs_path)
- elif gen_type == GenerationType.helm:
+ short_provider_package_ids.remove("apache-airflow")
+ if "helm-chart" in short_provider_package_ids:
generate_back_references(helm_redirects_link, helm_docs_path)
- elif gen_type == GenerationType.providers:
- if short_provider_package_ids:
- all_providers = [
- f"apache-airflow-providers-{package.replace('.','-')}"
- for package in short_provider_package_ids
- ]
- else:
- all_providers = get_available_documentation_provider_packages()
+ short_provider_package_ids.remove("helm-chart")
+ if "docker-stack" in short_provider_package_ids:
+ get_console().print("[info]Skipping docker-stack package. No
back-reference needed.")
+ short_provider_package_ids.remove("docker-stack")
+ if short_provider_package_ids:
+ all_providers = [
+ f"apache-airflow-providers-{package.replace('.','-')}" for package
in short_provider_package_ids
+ ]
Review Comment:
I see, thanks.
--
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]