Skip to content

Conversation

@frankdavid
Copy link
Contributor

  • Instead of the uses_* pattern, pass hostos and setupos args to system_test similarly to guestos.
  • Factor out repeating parts of the config in system_tests.bzl into functions
  • Behavior change: recovery-dev now builds the initial update image corresponding to the base image (both from //ic-os/guestos/envs/recovery-dev), whereas previously the two weren't consistent. The test still passes and I got green light from @andrewbattat who originally wrote the tests.

- Instead of the `uses_*` pattern, pass `hostos` and `setupos` args to `system_test` similarly to `guestos`.
- Factor out repeating parts of the config in `system_tests.bzl` into functions
- Behavior change: `recovery-dev` now builds the initial update image corresponding to the base image (both from `//ic-os/guestos/envs/recovery-dev`), whereas previously the two weren't consistent. The test still passes and I got green light from @andrew who originally wrote the tests.
@frankdavid frankdavid requested review from a team as code owners January 20, 2026 16:46
@github-actions github-actions bot added the test label Jan 20, 2026
…ests-icos-config

# Conflicts:
#	rs/tests/nested/BUILD.bazel
#	rs/tests/testnets/BUILD.bazel
@frankdavid frankdavid added the CI_ALL_BAZEL_TARGETS Runs all bazel targets and uploads them to S3 label Jan 20, 2026
Copy link
Collaborator

@basvandijk basvandijk left a comment

Choose a reason for hiding this comment

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

Nice! LGTM.

Copy link
Contributor

@pierugo-dfinity pierugo-dfinity left a comment

Choose a reason for hiding this comment

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

Nice!

def _configure_icos(env, env_var_files, icos_images, runtime_deps, guestos, guestos_update, setupos, hostos_update):
"""Configure all IC-OS images based on the provided parameters."""

is_mainnet_dev = guestos == "mainnet_latest_dev"
Copy link
Contributor

@andrewbattat andrewbattat Jan 20, 2026

Choose a reason for hiding this comment

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

If guestos == "mainnet_latest_dev", then we use dev mainnet images, which effects both setupos_mainnet and hostos_update_mainnet. This is intentional, as we want to consistently use dev mainnet images across all the OSes. But it becomes confusing if you look at the guestos_upgrade_from_latest_release_to_current target declaration:

guestos = "mainnet_latest_dev",  # necessary for configuring NNS public key
...
setupos = "mainnet_latest",

But the guestos mainnet_latest_dev causes the setupos used to actually be "mainnet_latest_dev"

I think it would be cleaner to add a uses_mainnet_dev flag, and then get rid of the guestos mainnet_latest_dev option. Then, the use of mainnet dev images is something targets directly enable or not.

I know you didn't introduce this behavior in this PR, but this seems like a nice chance to improve it 🙂

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, I see that guestos_update_mainnet doesn't use is_mainnet_dev. This matches the behavior before your change.

I'm not sure why we have this behavior though.

We appear to be uploading the dev mainnet images:

ic/BUILD.bazel

Line 281 in 8f51fe4

"//ic-os/guestos/envs/dev:bundle-update", # used by nested tests

So it shouldn't be a problem to use dev mainnet update images.

If you can't think of a reason why we shouldn't be using dev guestos update mainnet images, I think we can also update guestos_update_mainnet to follow a uses_mainnet_dev flag.

Also, it would be good to add a check that uses_mainnet_dev = True is only used when at least one *_mainnet image is specified

@andrewbattat
Copy link
Contributor

Great refactor!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI_ALL_BAZEL_TARGETS Runs all bazel targets and uploads them to S3 @consensus @idx @node test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants