Skip to content

Substitute all artifacts when the build has the debian_substitution_marker present.#2491

Open
ser-io wants to merge 1 commit intogoogle:mainfrom
ser-io:hard-coded-substitution-logic
Open

Substitute all artifacts when the build has the debian_substitution_marker present.#2491
ser-io wants to merge 1 commit intogoogle:mainfrom
ser-io:hard-coded-substitution-logic

Conversation

@ser-io
Copy link
Copy Markdown
Member

@ser-io ser-io commented Apr 29, 2026

debian_substitution_marker present.

Bug: b/507524719

@ser-io ser-io requested review from Databean and jemoreira April 29, 2026 19:24
@ser-io ser-io force-pushed the hard-coded-substitution-logic branch from 0c242be to c709553 Compare April 29, 2026 19:25
@ser-io ser-io changed the title Substitute all artifacts when the build has the Substitute all artifacts when the build has the debian_substitution_marker present. Apr 29, 2026
Comment thread base/cvd/cuttlefish/host/commands/cvd/fetch/substitute.cc Outdated
Comment thread base/cvd/cuttlefish/host/commands/cvd/fetch/substitute.cc
namespace cuttlefish {
namespace {

static constexpr std::string_view kArtifactNames[] = {
Copy link
Copy Markdown
Member

@Databean Databean Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's already special logic for --host_substitutions=all:

if (host_substitutions == std::vector<std::string>{"all"}) {

That implementation scans the bazel/debian package artifacts for files that it can substitute, and aggressively replaces as many as possible. what do you think of using this logic rather than adding a new hardcoded list?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the discussion in the meeting today it sounds like the preferred strategy is to go with a curated list rather than replacing everything possible.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The curated list could be "everything in the cvd package". Executables will still be built even if we don't add them there.

Copy link
Copy Markdown
Member Author

@ser-io ser-io May 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uses {"all"}. As we have already logic in place to substitute elements listed in the cvd package I agree with using the package as the source of truth rather than having a duplicated logic based on a new hardcoded list.

@ser-io ser-io force-pushed the hard-coded-substitution-logic branch from c709553 to 4921a5b Compare May 1, 2026 16:10
@ser-io ser-io requested review from Databean and jemoreira May 1, 2026 16:16
@ser-io ser-io force-pushed the hard-coded-substitution-logic branch from 4921a5b to 7888f96 Compare May 1, 2026 16:17
@ser-io ser-io force-pushed the hard-coded-substitution-logic branch 3 times, most recently from 5dc408d to 7ca4966 Compare May 5, 2026 19:42
@ser-io ser-io force-pushed the hard-coded-substitution-logic branch from 7ca4966 to 4a8556a Compare May 5, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants