Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Force package download when packages are present on target container image #2267

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cwoerner
Copy link

@cwoerner cwoerner commented Aug 11, 2023

Ensure that requested packages are downloaded, even if present on the build host. This enables the build rules to declare their necessary package dependencies without having the knowledge of whether they are present on the specific build host which is running the bazel command.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

When defining package dependencies, the generate downloads script fails if the requested packages are already present on the host docker image.

Issue Number: N/A

What is the new behavior?

Declared packages are always downloaded into the temporary Dir::Cache directory regardless of whether the binaries are present on the target machine or not.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Sometimes these base docker images and the software installed into them are often maintained by different teams and when the download packages script fails due to dependencies already being present it requires coordination between both teams to ensure that a mutually exclusive set of dependencies is installed in the host env vs. declared in the package dependencies in the software system's bazel target.

New tests were not added, but I tested the behavior with this newly added --reinstall command line flag.

Ensure that requested packages are downloaded, even if present on the build host.
@cwoerner cwoerner changed the title Force package download when packages are present on build host Force package download when packages are present on target container image Aug 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant