shahar1 commented on code in PR #76225:
URL: https://github.com/apache/airflow/pull/76225#discussion_r4436857632


##########
dev/breeze/src/airflow_breeze/utils/selective_checks.py:
##########
@@ -2343,6 +2343,12 @@ def debug_resources(self) -> bool:
     def disable_airflow_repo_cache(self) -> bool:
         return self.docker_cache == "disabled"
 
+    @cached_property
+    def use_pinned_os_deps_images(self) -> bool:
+        # Only the label - not the DOCKER_CACHE=disabled retry of a failed 
image build - asks for the OS
+        # dependencies to be installed from scratch rather than taken from the 
pinned images.
+        return DISABLE_IMAGE_CACHE_LABEL not in self._pr_labels

Review Comment:
   **minor** — a PR that changes one of the inputs `install_os_dependencies.sh` 
hashes (`install_os_dependencies.sh`, `common.sh`, 
`install_{mysql,mssql,postgres}.sh` or `keys/*`) gets a marker mismatch. The 
script then reinstalls *on top of* the pinned image. That exercises additions, 
but not removals. A package or database client the PR drops is still there from 
the pinned layer, because `apt_clean`'s `--auto-remove` does not purge packages 
that were installed explicitly. CI stays green even if something still needs 
what was removed. The reinstall on top also installs from the live dhi.io 
repository, so the pin gives these PRs no reproducibility either.
   
   Could this also return `False` when the PR touches those files? Such PRs 
would then build their OS layer from `BASE_IMAGE`, as they did before this 
change. The `disable image cache` label does that today, but only when the 
author knows to add it.
   



-- 
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]

Reply via email to