potiuk commented on code in PR #65223:
URL: https://github.com/apache/airflow/pull/65223#discussion_r3081019712
##########
dev/breeze/src/airflow_breeze/commands/registry_commands.py:
##########
@@ -242,14 +243,130 @@ def _run_extract_script(
return result.returncode
+def _backfill_docker(
+ python: str,
+ provider: str,
+ versions: tuple[str, ...],
+ package_name: str,
+ extras: list[str],
+) -> list[str]:
+ """Run parameter/connection extraction inside the Breeze CI container."""
+ failed: list[str] = []
+ unique_project_name = f"breeze-backfill-{uuid.uuid4().hex[:8]}"
+
+ shell_params = ShellParams(
+ python=python,
+ project_name=unique_project_name,
+ quiet=True,
+ skip_environment_initialization=True,
+ extra_args=(),
+ )
+
+ rebuild_or_pull_ci_image_if_needed(command_params=shell_params)
+
+ # Place isolated providers.json under dev/registry/ so it's visible inside
the container
+ # at /opt/airflow/dev/registry/
+ backfill_tmp_dir = DEV_REGISTRY_DIR / ".backfill_tmp"
+ backfill_tmp_dir.mkdir(exist_ok=True)
+
+ try:
+ for version in versions:
+ click.echo(f"{'=' * 60}")
+ click.echo(f"Extracting {provider} {version} (Docker)")
+ click.echo(f"{'=' * 60}")
+
+ providers_json = _create_isolated_providers_json(
+ provider, package_name, version, backfill_tmp_dir
+ )
+ # Container path:
/opt/airflow/dev/registry/.backfill_tmp/<filename>
+ container_providers_json =
f"/opt/airflow/dev/registry/.backfill_tmp/{providers_json.name}"
+
+ pip_spec = _build_pip_spec(package_name, extras, version)
+ base_spec = f"{package_name}=={version}"
+
+ command = (
+ f"pip install --quiet {pip_spec} && "
Review Comment:
No need to do pipp install and stuff. Use `uv run` in "de/registry" folder,
It will automatically install all that is needed and will work the same way in
and out of the container.
--
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]