Skip to content

Conversation

@ShadowCurse
Copy link
Contributor

Changes

  • make devtool pull latest artifacts from s3
  • add ability to download multiple custom artifacts
  • add ability to specify which artifacts to use in tests
  • add ability to specify artifacts for A/B tests

Reason

Artifacts are rebuilt periodically now, so update our tools to be able to pull latest ones.
Additionally, while we are at it, add ability to download and switch between multiple
artifacts. This also opened a path for A/B tests of artifacts as well.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.

PR Checklist

  • I have read and understand CONTRIBUTING.md.
  • I have run tools/devtool checkbuild --all to verify that the PR passes
    build checks on all supported architectures.
  • I have run tools/devtool checkstyle to verify that the PR passes the
    automated style checks.
  • I have described what is done in these changes, why they are needed, and
    how they are solving the problem in a clear and encompassing way.
  • I have updated any relevant documentation (both in code and in the docs)
    in the PR.
  • I have mentioned all user-facing changes in CHANGELOG.md.
  • If a specific issue led to this PR, this PR closes the issue.
  • When making API changes, I have followed the
    Runbook for Firecracker API changes.
  • I have tested all new and changed functionalities in unit tests and/or
    integration tests.
  • I have linked an issue to every new TODO.

  • This functionality cannot be added in rust-vmm.

@codecov
Copy link

codecov bot commented Dec 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.23%. Comparing base (89d3ad8) to head (4f7295f).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5585   +/-   ##
=======================================
  Coverage   83.23%   83.23%           
=======================================
  Files         277      277           
  Lines       29312    29312           
=======================================
  Hits        24399    24399           
  Misses       4913     4913           
Flag Coverage Δ
5.10-m5n.metal 83.57% <ø> (-0.01%) ⬇️
5.10-m6a.metal 82.91% <ø> (+<0.01%) ⬆️
5.10-m6g.metal 80.28% <ø> (ø)
5.10-m6i.metal 83.57% <ø> (+<0.01%) ⬆️
5.10-m7a.metal-48xl 82.90% <ø> (ø)
5.10-m7g.metal 80.28% <ø> (ø)
5.10-m7i.metal-24xl 83.54% <ø> (-0.01%) ⬇️
5.10-m7i.metal-48xl 83.55% <ø> (ø)
5.10-m8g.metal-24xl 80.28% <ø> (-0.01%) ⬇️
5.10-m8g.metal-48xl 80.28% <ø> (ø)
6.1-m5n.metal 83.59% <ø> (ø)
6.1-m6a.metal 82.93% <ø> (-0.01%) ⬇️
6.1-m6g.metal 80.28% <ø> (-0.01%) ⬇️
6.1-m6i.metal 83.59% <ø> (ø)
6.1-m7a.metal-48xl 82.92% <ø> (ø)
6.1-m7g.metal 80.28% <ø> (-0.01%) ⬇️
6.1-m7i.metal-24xl 83.61% <ø> (ø)
6.1-m7i.metal-48xl 83.61% <ø> (-0.01%) ⬇️
6.1-m8g.metal-24xl 80.28% <ø> (ø)
6.1-m8g.metal-48xl 80.28% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ShadowCurse ShadowCurse force-pushed the pull_latest_s3_artifacts branch 7 times, most recently from 1de4267 to 59fb38f Compare December 17, 2025 17:10
@ShadowCurse ShadowCurse self-assigned this Dec 17, 2025
@ShadowCurse ShadowCurse added Status: Awaiting review Indicates that a pull request is ready to be reviewed Type: Enhancement Indicates new feature requests labels Dec 17, 2025
Manciukic
Manciukic previously approved these changes Dec 18, 2025
@Manciukic Manciukic dismissed their stale review December 18, 2025 11:16

I selected approve by mistakr

@ShadowCurse ShadowCurse force-pushed the pull_latest_s3_artifacts branch 7 times, most recently from 075b628 to 2b3c8b9 Compare December 19, 2025 15:50
@ShadowCurse ShadowCurse force-pushed the pull_latest_s3_artifacts branch 2 times, most recently from 89f232b to ccd1bd1 Compare January 5, 2026 13:29
@ShadowCurse ShadowCurse force-pushed the pull_latest_s3_artifacts branch 3 times, most recently from e446012 to 5e9524c Compare January 8, 2026 15:55
The snapshot version check was iterating over last several FC versions
pulled from S3, but it was unnecessary since there were no cross FC
checks. Remove checks of old FC versions and only test the current
version. Also remove fixup state from `setup-ci-artifacts.sh` since
it is redundant now.

Signed-off-by: Egor Lazarchuk <[email protected]>
Instead of using fixed artifact path for a current FC version
pull newest artifacts from S3. This way we can update them
independently while keeping old versions around.

Unfortunately there is no simple way to query newest
added directory in S3, so do the next best thing of looking
through all files in all directories and determining the `newest`
directory be the `LastModified` status of files inside.

Signed-off-by: Egor Lazarchuk <[email protected]>
The old setup used `build/img` as the base directory
for artifacts pulled from S3. In S3 the artifacts directory
contains 1 subdirectory per architecture (x86_64 and aarch64).
This was causing final local artifacts path to be `build/img/x86_64`
or `build/img/aarch64`.

This commit changes the structure a to have a separate `build/artifacts`
directory with subdirectories containing different versions of
artifacts. The path to currently used artifacts will be placed in
`build/current_artifacts` file. This make is easy to switch between
multiple versions of artifacts without a need to delete/download them.
This also opens a door for A/B testing of artifacts.

Signed-off-by: Egor Lazarchuk <[email protected]>
Downloading artifacts is a separate step that should
not mess with currently selected artifacts.

Signed-off-by: Egor Lazarchuk <[email protected]>
Modify `download_ci_artifacts` to accept artifacts paths
as input and download by passing these paths to
`ensure_ci_artifacts`. `ensure_ci_artifacts` will default
to latest s3 artifacts if no args were provided.
`--force` still works and only deletes specified artifacts.

Signed-off-by: Egor Lazarchuk <[email protected]>
Add arguments names for binary paths for ab_test.py

Signed-off-by: Egor Lazarchuk <[email protected]>
@ShadowCurse ShadowCurse force-pushed the pull_latest_s3_artifacts branch 2 times, most recently from e9990c4 to 8ea0f52 Compare January 9, 2026 12:40
Manciukic
Manciukic previously approved these changes Jan 9, 2026
JackThomson2
JackThomson2 previously approved these changes Jan 9, 2026
Update `ab_test.py` with ability to accept custom artifacts for A and B
runs.

Additionally update `pipeline_perf.py` as well. Now REVISION_A_ARTIFACTS
and REVISION_B_ARTIFACTS environment variables specify custom artifacts
which will be used in A/B test

Signed-off-by: Egor Lazarchuk <[email protected]>
Some tests like style checks do not require artifacts to be present.

Signed-off-by: Egor Lazarchuk <[email protected]>
Add missing descriptions for additional arguments

Signed-off-by: Egor Lazarchuk <[email protected]>
The command is used internally in the `devtool` to make sure
there are at lest some current artifacts set up.
This behaviour is also required in the popular docker test,
so convert it to a callable command.

Signed-off-by: Egor Lazarchuk <[email protected]>
Add `--artifacts` option to `devtool test` to simplify changing
between different sets of artifacts.

Signed-off-by: Egor Lazarchuk <[email protected]>
- rename ensure_current_artifacts_are_set_up to
ensure_current_artifacts to shorten a name a bit
- rename LOCAL_ARTIFACTS_CURRENT_DIR_FILE to
  LOCAL_CURRENT_ARTIFACTS_FILE to make name more descriptive
- Simplify logs regarding artifacts status
- remove ` symbols from cmd_help as bash was interpreting them as actual
  commands to execute
- other minor renamings

Signed-off-by: Egor Lazarchuk <[email protected]>
`current_artifacts` is a name of the FILE that contains a path to
artifacts that should be used for test runs. Same name was used
for a DIRECTORY within devctr that contained artifacts copied
from a build/artifacts... To remove this confusion rename the
directory inside devctr to test_artifacts.

Signed-off-by: Egor Lazarchuk <[email protected]>
@ShadowCurse ShadowCurse dismissed stale reviews from JackThomson2 and Manciukic via e4c83a8 January 9, 2026 15:20
@ShadowCurse ShadowCurse force-pushed the pull_latest_s3_artifacts branch from a363aeb to e4c83a8 Compare January 9, 2026 15:20
@JackThomson2 JackThomson2 enabled auto-merge (rebase) January 9, 2026 16:01
@JackThomson2 JackThomson2 merged commit 9fb6fcc into firecracker-microvm:main Jan 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Awaiting review Indicates that a pull request is ready to be reviewed Type: Enhancement Indicates new feature requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants