Skip to content

Commit f243560

Browse files
Fricounetbergwolfdependabot[bot]imeoerZephyrcf
authored
[v2.4-dd] Merge v2.4.2 from upstream (#20)
* tests: replace fmt.Println with log for better logging Replace all occurrences of fmt.Println with log.Println across multiple test files and the proxy main.go to standardize logging output and improve log formatting. Add log output for command execution functions in tool/util.go to enhance debugging and traceability during test runs. Configure log flags and output in tests/main_test.go to include timestamps and file info in logs. Signed-off-by: Peng Tao <bergwolf@hyper.sh> * ci: add Dependabot configuration for weekly updates Add a new Dependabot configuration file to automate dependency updates for gomod, cargo, and GitHub Actions workflows on a weekly schedule. This helps keep dependencies up to date and improves project security and stability. Signed-off-by: Peng Tao <bergwolf@hyper.sh> * security: add ignore rule for RUSTSEC-2025-0141 │ bincode 1.3.3 registry+https://github.com/rust-lang/crates.io-index │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ unmaintained advisory detected │ ├ ID: RUSTSEC-2025-0141 ├ Advisory: https://rustsec.org/advisories/RUSTSEC-2025-0141 ├ Due to a doxxing and harassment incident, the bincode team has taken the decision to cease development permanently. The team considers version 1.3.3 a complete version of bincode that is not in need of any updates. Add a new ignore entry for the security advisory RUSTSEC-2025-0141 in deny.toml. This advisory is ignored because no safe upgrade is available, and the team considers version 1.3.3 of bincode stable and not requiring updates. Signed-off-by: Peng Tao <bergwolf@hyper.sh> * build(deps): bump golang.org/x/crypto in /contrib/nydusify Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.37.0 to 0.45.0. - [Commits](golang/crypto@v0.37.0...v0.45.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-version: 0.45.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump github.com/opencontainers/selinux in /contrib/nydusify Bumps [github.com/opencontainers/selinux](https://github.com/opencontainers/selinux) from 1.12.0 to 1.13.0. - [Release notes](https://github.com/opencontainers/selinux/releases) - [Commits](opencontainers/selinux@v1.12.0...v1.13.0) --- updated-dependencies: - dependency-name: github.com/opencontainers/selinux dependency-version: 1.13.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump actions/stale from 9.1.0 to 10.1.1 Bumps [actions/stale](https://github.com/actions/stale) from 9.1.0 to 10.1.1. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](actions/stale@5bef64f...9971854) --- updated-dependencies: - dependency-name: actions/stale dependency-version: 10.1.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump actions/upload-artifact from 4 to 6 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 6. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v4...v6) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump actions/download-artifact from 4 to 7 Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 7. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v4...v7) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump goreleaser/goreleaser-action from 6.2.1 to 6.4.0 Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 6.2.1 to 6.4.0. - [Release notes](https://github.com/goreleaser/goreleaser-action/releases) - [Commits](goreleaser/goreleaser-action@90a3faa...e435ccd) --- updated-dependencies: - dependency-name: goreleaser/goreleaser-action dependency-version: 6.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump golangci/golangci-lint-action from 6 to 9 Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6 to 9. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](golangci/golangci-lint-action@v6...v9) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-version: '9' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump github.com/containerd/containerd in /contrib/nydusify Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.7.27 to 1.7.29. - [Release notes](https://github.com/containerd/containerd/releases) - [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md) - [Commits](containerd/containerd@v1.7.27...v1.7.29) --- updated-dependencies: - dependency-name: github.com/containerd/containerd dependency-version: 1.7.29 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump crc from 3.2.1 to 3.4.0 Bumps [crc](https://github.com/mrhooray/crc-rs) from 3.2.1 to 3.4.0. - [Commits](mrhooray/crc-rs@3.2.1...3.4.0) --- updated-dependencies: - dependency-name: crc dependency-version: 3.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump procfs from 0.17.0 to 0.18.0 Bumps [procfs](https://github.com/eminence/procfs) from 0.17.0 to 0.18.0. - [Release notes](https://github.com/eminence/procfs/releases) - [Commits](eminence/procfs@v0.17.0...v0.18.0) --- updated-dependencies: - dependency-name: procfs dependency-version: 0.18.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump google.golang.org/protobuf in /smoke Bumps google.golang.org/protobuf from 1.32.0 to 1.33.0. --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-version: 1.33.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump github.com/containerd/containerd/v2 in /smoke Bumps [github.com/containerd/containerd/v2](https://github.com/containerd/containerd) from 2.1.2 to 2.1.5. - [Release notes](https://github.com/containerd/containerd/releases) - [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md) - [Commits](containerd/containerd@v2.1.2...v2.1.5) --- updated-dependencies: - dependency-name: github.com/containerd/containerd/v2 dependency-version: 2.1.5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump github.com/opencontainers/selinux in /smoke Bumps [github.com/opencontainers/selinux](https://github.com/opencontainers/selinux) from 1.12.0 to 1.13.0. - [Release notes](https://github.com/opencontainers/selinux/releases) - [Commits](opencontainers/selinux@v1.12.0...v1.13.0) --- updated-dependencies: - dependency-name: github.com/opencontainers/selinux dependency-version: 1.13.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump golang.org/x/crypto from 0.37.0 to 0.45.0 in /smoke Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.37.0 to 0.45.0. - [Commits](golang/crypto@v0.37.0...v0.45.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-version: 0.45.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Upgrade golangci-lint to v2.1 for golangci-lint-action@v9 compatibility Signed-off-by: imeoer <yansong.ys@antgroup.com> * build(deps): bump codecov/codecov-action from 4 to 5 Signed-off-by: Zephyrcf <zinsist777@gmail.com> * build(deps): bump actions/checkout from 4 to 6 Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Commits](actions/checkout@v4...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * docs: update version 3 containerd config format for snapshotter Signed-off-by: Yang Kaiyong <yangkaiyong.yky@antgroup.com> * smoke: optimize PrepareImage to reuse existing local image Modify PrepareImage to first attempt pulling the image from the local registry. If the image exists locally, return early to avoid redundant pulls and pushes. This reduces unnecessary network operations and speeds up test setup when the image is already available in the local registry. Signed-off-by: Peng Tao <bergwolf@hyper.sh> * smoke: fix unmount command to use lazy unmount Update the Umount method to use "umount -l" for lazy unmounting, preventing errors if the mount point is busy or in use during tests. This improves test reliability and cleanup. Signed-off-by: Peng Tao <bergwolf@hyper.sh> * Fix clippy errors in api, upgrade, storage, rafs, and service crates for Rust 1.93.0 Co-authored-by: imeoer <1524576+imeoer@users.noreply.github.com> * Fix remaining clippy errors in builder, service, and binary crates for Rust 1.93.0 Co-authored-by: imeoer <1524576+imeoer@users.noreply.github.com> * Fix cargo fmt formatting issues Co-authored-by: imeoer <1524576+imeoer@users.noreply.github.com> * Revert is_multiple_of() to use modulo operator for Rust 1.84.0 compatibility Co-authored-by: imeoer <1524576+imeoer@users.noreply.github.com> * security: remove ignore for RUSTSEC-2024-0436 advisory RUSTSEC-2024-0436 refers to crate paste that is no longer a dependency of nydus. Signed-off-by: Peng Tao <bergwolf@hyper.sh> * deps: update bytes crate to version 1.11.1 to fix RUSTSEC-2026-0007 Upgrade the bytes dependency from version 1.9.0 to 1.11.1 to address the security advisory RUSTSEC-2024-0436. This update includes important fixes and improvements to ensure safer and more reliable handling of byte buffers. Advisory: https://rustsec.org/advisories/RUSTSEC-2026-0007 Signed-off-by: Peng Tao <bergwolf@hyper.sh> * ci: enable coverage instrumentation and reporting Add support for code coverage collection and reporting in the CI workflow by enabling debug mode and coverage flags during test and smoke runs. Update GitHub Actions to run tests with coverage instrumentation and upload coverage artifacts from the coverage directory. Makefile and smoke/Makefile are updated to pass coverage-related environment variables and flags to cargo and test binaries. Add new targets to generate coverage reports using grcov and configure Rust profiles for debug builds with coverage instrumentation. Signed-off-by: Peng Tao <bergwolf@hyper.sh> * ci: remove incorrect 'files' parameter from codecov upload step The action searches for codecov files automatically. Signed-off-by: Peng Tao <bergwolf@hyper.sh> * ci: drop nydus-unit-test-coverage There is no need to run the nydus unit tests twice, once in nydus-unit-test-coverage, the other in nydus-unit-test. Signed-off-by: Peng Tao <bergwolf@hyper.sh> * ci: generate coverage for both UT and smoke tests Introduce a new nydus-build-debug job to build debug binaries with coverage enabled, upload profraw files for build, smoke, unit test, and takeover stages. Add a nydus-coverage job to aggregate coverage data from various test jobs, generate combined codecov report, and upload coverage artifacts. Update existing jobs to enable debug mode and upload corresponding coverage files, improving code coverage tracking and analysis in CI workflows. Signed-off-by: Peng Tao <bergwolf@hyper.sh> * ci: update coverage upload to use coverage.info files Replace profraw artifact uploads with coverage.info files generated by make generate-codecov in smoke, unit test, and takeover jobs for more accurate coverage reporting. Simplify artifact download steps in nydus-coverage job to match new coverage info files and ensure correct coverage data is uploaded to Codecov. Signed-off-by: Peng Tao <bergwolf@hyper.sh> * fix soundness issue of `nydus_storage::utils::alloc_buf` Signed-off-by: lihuan <lihuan0530@gmail.com> * nydusd: upgrade rust-vmm dependencies to latest versions Update all rust-vmm crate dependencies to their latest versions: - vhost: 0.11.0 -> 0.15.0 - vhost-user-backend: 0.15.0 -> 0.21.0 - virtio-bindings: 0.1 -> 0.2.7 - virtio-queue: 0.12.0 -> 0.17.0 - vm-memory: 0.14.1 -> 0.17.1 - vmm-sys-util: 0.12.1 -> 0.15.0 - fuse-backend-rs: 0.13.1 -> 0.14.0 virtiofs DAX is dropped as part of upgrading fuse-backend-rs, since the feature never made it to the spec. Remove virtio-v5_0_0 feature flag from virtio-bindings dependency as it's no longer needed. Update virtiofs.rs to use the new event API (EventConsumer/EventNotifier) instead of the deprecated EventFd, and adapt to API changes in vhost-user-backend including the start() method now taking a mutable listener reference. Signed-off-by: Peng Tao <bergwolf@hyper.sh> * ci: switch smoke tests to release builds The llvm profraw tracing files constantly caused ENOSPC error on github smoke action. Let's switch back to release build to run smoke tests. Signed-off-by: Peng Tao <bergwolf@hyper.sh> * docs(maintainers) add Fricounet to maintainer list Ref: dragonflyoss/community#142 Signed-off-by: imeoer <yansong.ys@antgroup.com> * chore: bump crate versions Bump minor versions for workspace crates: - nydus-api: 0.4.0 -> 0.4.1 - nydus-storage: 0.7.1 -> 0.7.2 - nydus-utils: 0.5.0 -> 0.5.1 - nydus-rafs: 0.4.0 -> 0.4.1 Update all dependent crates across the workspace. Signed-off-by: Yang Kaiyong <yangkaiyong.yky@antgroup.com> * fix: ignore RUSTSEC-2026-0009 for time crate in cargo deny check Co-authored-by: imeoer <1524576+imeoer@users.noreply.github.com> * tests: improve unit test coverage across multiple modules Add comprehensive unit tests to improve code coverage across builder, rafs, logger, storage and other core modules. The new tests cover edge cases, error conditions, and previously untested functionality. Key improvements include: - Enhanced test coverage for Attributes parsing with various edge cases (relative paths, hex formats, whitespace handling) - Expanded HashChunkDict tests covering chunk management, blob indexing, and argument parsing - Comprehensive V5IoChunk tests for flag combinations, CRC32 handling, and type conversions - Logger tests for formatting functions, file name extraction, and verbosity level mapping - Additional tests for storage backend, cache deduplication, device operations, and metadata handling Signed-off-by: Peng Tao <bergwolf@hyper.sh> * api: support hot reload of registry authentication Add HTTP API endpoints to update and query daemon configuration at runtime without restarting nydusd. This is particularly useful for refreshing registry credentials when tokens expire. Key changes: - Add GET/PUT /api/v1/config endpoints for configuration management - Add config module in utils for centralized configuration updates - Add smoke test cases for hot reload configuration API - Update documentation with hot reload usage examples Signed-off-by: imeoer <yansong.ys@antgroup.com> * fix soundness issue of `nydus_utils::FileMapState::get_slice(_mut)` Signed-off-by: lihuan <lihuan0530@gmail.com> * docs: deprecate local approvers and maintainers files - remove local lists for approvers and maintainers - add migration notices pointing to community repository - include links to updated lists in community repo Signed-off-by: mingcheng <mingcheng@apache.org> * ci(ut): add ut for test coverage Signed-off-by: imeoer <yansong.ys@antgroup.com> * ci: add ut tests for coverage 1. add unit tests with a coverage rate of 70%; 2. setup codecov gate: overall coverage >= 70%, and changed lines coverage >= 90%; Signed-off-by: imeoer <yansong.ys@antgroup.com> * chore: update CODEOWNERS to use nydus-approvers team Signed-off-by: Gaius <gaius.qi@gmail.com> * build(deps): bump containerd/nydus-snapshotter from 0.15.9 to 0.15.12 in contrib/nydusify Signed-off-by: Yang Kaiyong <yangkaiyong.yky@antgroup.com> * ci: align cargo-deny with pinned rust toolchain Signed-off-by: 106umao <106umao@users.noreply.github.com> * ci: upgrade setup-go to v6 Signed-off-by: 106umao <106umao@users.noreply.github.com> * fix(deps): bump tar to fix cargo-deny security vulnerability Signed-off-by: Zephyr <zinsist777@gmail.com> * ci: Only run if ubuntu-latest-16-cores will be available Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * ci: Only publish codecov if credentials are avail Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * [registry] Move config auth refresh to background thread The per-request refresh_cached_auth_from_config call can cause a thundering herd on the auth server when config changes while multiple requests are in flight as each concurrent request independently calls get_token(). Additionally, performing the refresh in the hot request path adds latency to the first request after a config update. Move the check to the existing refresh token thread, polling every 5 seconds. This keeps a single thread responsible for auth updates while still picking up config changes promptly. Signed-off-by: Baptiste Girard-Carrabin <baptiste.girardcarrabin@datadoghq.com> * [registry] Remove disable_token_refresh feature This was introduced in dragonflyoss#1784 to silence noisy 401/403 errors from the refresh thread using expired tokens when prefetch was enabled. With the config auth refresh now handled properly, the thread no longer produces spurious errors on credential changes, so the workaround is no longer needed. Always starting the refresh thread also ensures that config auth updates via the API are picked up promptly regardless of whether prefetch is enabled. Signed-off-by: Baptiste Girard-Carrabin <baptiste.girardcarrabin@datadoghq.com> * nydusify commit: fix mount option parsing in manager.go (#19) The Inspect() function parsed snapshot mount options by hardcoded array index, assuming Options[0]=workdir, Options[1]=upperdir, Options[2]=lowerdir. The nydus snapshotter can return a "volatile" flag at index 0, shifting all other options by one position. This produced malformed overlay mount data ("lowerdir=upperdir=/path:...") causing "no such file or directory" errors. Replace hardcoded indices with prefix-based iteration, matching the pattern already used in overlay_linux.go:GetOverlayLayers. Extract parseMountOptions() helper with unit tests covering volatile prefix, different orderings, and error cases. Signed-off-by: Eric Mountain <eric.mountain@datadoghq.com> * chore: sync go.mod after rebase Signed-off-by: Eric Mountain <eric.mountain@datadoghq.com> * test: cover Inspect parseMountOptions paths for codecov gate Add TestInspectParseMountOptionsPaths covering the two branches in Inspect that were missing: parseMountOptions returning an error, and the full success path returning LowerDirs/UpperDir. Signed-off-by: Eric Mountain <eric.mountain@datadoghq.com> * [Registry] Disable HTTPS-to-HTTP fallback unless skip_verify is set When skip_verify is false (the default), TLS errors now propagate as-is instead of silently falling back to plaintext HTTP. This prevents unintended exposure of image pull traffic in production environments. The fallback is still available when skip_verify is true, aligning with nerdctl's --insecure-registry semantics. Fixes: dragonflyoss#1910 Signed-off-by: Baptiste Girard-Carrabin <baptiste.girardcarrabin@datadoghq.com> * chore: bump acceleration-service to v0.2.26 Signed-off-by: chengyue <yue.cheng.ted@gmail.com> * [doc] Document skip_verify controls HTTP fallback Update docs, config examples, and the RegistryConfig doc comment to note that skip_verify also gates HTTPS-to-HTTP fallback on TLS errors. Signed-off-by: Baptiste Girard-Carrabin <baptiste.girardcarrabin@datadoghq.com> * Revert "[registry] Add skip_http_fallback config option (#18)" This reverts commit 3d01b05. --------- Signed-off-by: Peng Tao <bergwolf@hyper.sh> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: imeoer <yansong.ys@antgroup.com> Signed-off-by: Zephyrcf <zinsist777@gmail.com> Signed-off-by: Yang Kaiyong <yangkaiyong.yky@antgroup.com> Signed-off-by: lihuan <lihuan0530@gmail.com> Signed-off-by: mingcheng <mingcheng@apache.org> Signed-off-by: Gaius <gaius.qi@gmail.com> Signed-off-by: 106umao <106umao@users.noreply.github.com> Signed-off-by: Zephyr <zinsist777@gmail.com> Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> Signed-off-by: Baptiste Girard-Carrabin <baptiste.girardcarrabin@datadoghq.com> Signed-off-by: Eric Mountain <eric.mountain@datadoghq.com> Signed-off-by: chengyue <yue.cheng.ted@gmail.com> Co-authored-by: Peng Tao <bergwolf@hyper.sh> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: imeoer <yansong.ys@antgroup.com> Co-authored-by: Zephyrcf <zinsist777@gmail.com> Co-authored-by: Yang Kaiyong <yangkaiyong.yky@antgroup.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: imeoer <1524576+imeoer@users.noreply.github.com> Co-authored-by: lihuan <lihuan0530@gmail.com> Co-authored-by: mingcheng <mingcheng@apache.org> Co-authored-by: Gaius <gaius.qi@gmail.com> Co-authored-by: 106umao <106umao@users.noreply.github.com> Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com> Co-authored-by: Eric Mountain <eric.mountain@datadoghq.com> Co-authored-by: chengyue <yue.cheng.ted@gmail.com>
1 parent 3cb378d commit f243560

214 files changed

Lines changed: 15789 additions & 1223 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
# standard @username or @org/team-name format. You can also refer to a user by an
44
# email address that has been added to their GitHub account, for example user@example.com
55

6-
* @dragonflyoss/nydus-reviewers
6+
* @dragonflyoss/nydus-approvers
77
.github @dragonflyoss/nydus-maintainers

.github/codecov.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ coverage:
33
project:
44
default:
55
enabled: yes
6-
target: auto # auto compares coverage to the previous base commit
7-
# adjust accordingly based on how flaky your tests are
8-
# this allows a 0.2% drop from the previous base commit coverage
9-
threshold: 0.2%
10-
patch: false
6+
target: 70%
7+
threshold: 0%
8+
patch:
9+
default:
10+
enabled: yes
11+
target: 90%
12+
threshold: 0%
1113

1214
comment:
1315
layout: "reach, diff, flags, files"
@@ -20,4 +22,4 @@ codecov:
2022
wait_for_ci: true
2123

2224
# When modifying this file, please validate using
23-
# curl -X POST --data-binary @codecov.yml https://codecov.io/validate
25+
# curl -X POST --data-binary @codecov.yml https://codecov.io/validate

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "gomod"
4+
directory: "/contrib/"
5+
schedule:
6+
interval: "weekly"
7+
8+
- package-ecosystem: "cargo"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
13+
- package-ecosystem: "github-actions"
14+
# Workflow files stored in the default location of `.github/workflows`
15+
# You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.
16+
directory: "/"
17+
schedule:
18+
interval: "weekly"

.github/workflows/benchmark.yml

Lines changed: 79 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,45 @@ env:
1313
CARGO_TERM_COLOR: always
1414

1515
jobs:
16+
has:
17+
runs-on: ubuntu-slim
18+
outputs:
19+
latest-16: ${{ env.HAS_LATEST_16 }}
20+
env:
21+
HAS_LATEST_16: ${{ (github.repository_owner == 'dragonflyoss' || vars.HAS_LATEST_16) && '1' || '' }}
22+
steps:
23+
- run: |
24+
true
1625
contrib-build:
17-
runs-on: ubuntu-latest
26+
runs-on: ubuntu-latest-16-cores
27+
needs:
28+
- has
29+
if: needs.has.outputs.latest-16
1830
steps:
1931
- name: Checkout
20-
uses: actions/checkout@v4
32+
uses: actions/checkout@v6
2133
- name: Setup Golang
22-
uses: actions/setup-go@v5
34+
uses: actions/setup-go@v6
2335
with:
2436
go-version-file: 'go.work'
2537
cache-dependency-path: "**/*.sum"
2638
- name: Build Contrib
2739
run: |
2840
make -e DOCKER=false nydusify-release
2941
- name: Upload Nydusify
30-
uses: actions/upload-artifact@v4
42+
uses: actions/upload-artifact@v6
3143
with:
3244
name: nydusify-artifact
3345
path: contrib/nydusify/cmd/nydusify
3446

3547
nydus-build:
36-
runs-on: ubuntu-latest
48+
runs-on: ubuntu-latest-16-cores
49+
needs:
50+
- has
51+
if: needs.has.outputs.latest-16
3752
steps:
3853
- name: Checkout
39-
uses: actions/checkout@v4
54+
uses: actions/checkout@v6
4055
- name: Rust Cache
4156
uses: Swatinem/rust-cache@v2
4257
with:
@@ -47,15 +62,18 @@ jobs:
4762
run: |
4863
make release
4964
- name: Upload Nydus Binaries
50-
uses: actions/upload-artifact@v4
65+
uses: actions/upload-artifact@v6
5166
with:
5267
name: nydus-artifact
5368
path: |
5469
target/release/nydus-image
5570
target/release/nydusd
5671
5772
benchmark-description:
58-
runs-on: ubuntu-latest
73+
runs-on: ubuntu-latest-16-cores
74+
needs:
75+
- has
76+
if: needs.has.outputs.latest-16
5977
steps:
6078
- name: Description
6179
run: |
@@ -65,8 +83,12 @@ jobs:
6583
echo "| ubuntu-22.04 | 2-core CPU (x86_64) | 7GB |" >> $GITHUB_STEP_SUMMARY
6684
6785
benchmark-oci:
68-
runs-on: ubuntu-latest
69-
needs: [contrib-build, nydus-build]
86+
runs-on: ubuntu-latest-16-cores
87+
if: needs.has.outputs.latest-16
88+
needs:
89+
- has
90+
- contrib-build
91+
- nydus-build
7092
strategy:
7193
matrix:
7294
include:
@@ -84,14 +106,14 @@ jobs:
84106
tag: 8-al2022-jdk
85107
steps:
86108
- name: Checkout
87-
uses: actions/checkout@v4
109+
uses: actions/checkout@v6
88110
- name: Download Nydus
89-
uses: actions/download-artifact@v4
111+
uses: actions/download-artifact@v7
90112
with:
91113
name: nydus-artifact
92114
path: target/release
93115
- name: Download Nydusify
94-
uses: actions/download-artifact@v4
116+
uses: actions/download-artifact@v7
95117
with:
96118
name: nydusify-artifact
97119
path: contrib/nydusify/cmd
@@ -106,14 +128,18 @@ jobs:
106128
export SNAPSHOTTER=overlayfs
107129
sudo -E make smoke-benchmark
108130
- name: Save BenchMark Result
109-
uses: actions/upload-artifact@v4
131+
uses: actions/upload-artifact@v6
110132
with:
111133
name: benchmark-oci-${{ matrix.image }}
112134
path: smoke/${{ matrix.image }}-oci.json
113135

114136
benchmark-fsversion-v5:
115-
runs-on: ubuntu-latest
116-
needs: [contrib-build, nydus-build]
137+
runs-on: ubuntu-latest-16-cores
138+
needs:
139+
- has
140+
- contrib-build
141+
- nydus-build
142+
if: needs.has.outputs.latest-16
117143
strategy:
118144
matrix:
119145
include:
@@ -131,14 +157,14 @@ jobs:
131157
tag: 8-al2022-jdk
132158
steps:
133159
- name: Checkout
134-
uses: actions/checkout@v4
160+
uses: actions/checkout@v6
135161
- name: Download Nydus
136-
uses: actions/download-artifact@v4
162+
uses: actions/download-artifact@v7
137163
with:
138164
name: nydus-artifact
139165
path: target/release
140166
- name: Download Nydusify
141-
uses: actions/download-artifact@v4
167+
uses: actions/download-artifact@v7
142168
with:
143169
name: nydusify-artifact
144170
path: contrib/nydusify/cmd
@@ -152,14 +178,18 @@ jobs:
152178
export BENCHMARK_METRIC_FILE=${{ matrix.image }}-fsversion-v5.json
153179
sudo -E make smoke-benchmark
154180
- name: Save BenchMark Result
155-
uses: actions/upload-artifact@v4
181+
uses: actions/upload-artifact@v6
156182
with:
157183
name: benchmark-fsversion-v5-${{ matrix.image }}
158184
path: smoke/${{ matrix.image }}-fsversion-v5.json
159185

160186
benchmark-fsversion-v6:
161-
runs-on: ubuntu-latest
162-
needs: [contrib-build, nydus-build]
187+
runs-on: ubuntu-latest-16-cores
188+
needs:
189+
- has
190+
- contrib-build
191+
- nydus-build
192+
if: needs.has.outputs.latest-16
163193
strategy:
164194
matrix:
165195
include:
@@ -177,14 +207,14 @@ jobs:
177207
tag: 8-al2022-jdk
178208
steps:
179209
- name: Checkout
180-
uses: actions/checkout@v4
210+
uses: actions/checkout@v6
181211
- name: Download Nydus
182-
uses: actions/download-artifact@v4
212+
uses: actions/download-artifact@v7
183213
with:
184214
name: nydus-artifact
185215
path: target/release
186216
- name: Download Nydusify
187-
uses: actions/download-artifact@v4
217+
uses: actions/download-artifact@v7
188218
with:
189219
name: nydusify-artifact
190220
path: contrib/nydusify/cmd
@@ -198,14 +228,18 @@ jobs:
198228
export BENCHMARK_METRIC_FILE=${{ matrix.image }}-fsversion-v6.json
199229
sudo -E make smoke-benchmark
200230
- name: Save BenchMark Result
201-
uses: actions/upload-artifact@v4
231+
uses: actions/upload-artifact@v6
202232
with:
203233
name: benchmark-fsversion-v6-${{ matrix.image }}
204234
path: smoke/${{ matrix.image }}-fsversion-v6.json
205235

206236
benchmark-zran:
207-
runs-on: ubuntu-latest
208-
needs: [contrib-build, nydus-build]
237+
runs-on: ubuntu-latest-16-cores
238+
needs:
239+
- has
240+
- contrib-build
241+
- nydus-build
242+
if: needs.has.outputs.latest-16
209243
strategy:
210244
matrix:
211245
include:
@@ -223,14 +257,14 @@ jobs:
223257
tag: 8-al2022-jdk
224258
steps:
225259
- name: Checkout
226-
uses: actions/checkout@v4
260+
uses: actions/checkout@v6
227261
- name: Download Nydus
228-
uses: actions/download-artifact@v4
262+
uses: actions/download-artifact@v7
229263
with:
230264
name: nydus-artifact
231265
path: target/release
232266
- name: Download Nydusify
233-
uses: actions/download-artifact@v4
267+
uses: actions/download-artifact@v7
234268
with:
235269
name: nydusify-artifact
236270
path: contrib/nydusify/cmd
@@ -244,14 +278,20 @@ jobs:
244278
export BENCHMARK_METRIC_FILE=${{ matrix.image }}-zran.json
245279
sudo -E make smoke-benchmark
246280
- name: Save BenchMark Result
247-
uses: actions/upload-artifact@v4
281+
uses: actions/upload-artifact@v6
248282
with:
249283
name: benchmark-zran-${{ matrix.image }}
250284
path: smoke/${{ matrix.image }}-zran.json
251285

252286
benchmark-result:
253-
runs-on: ubuntu-latest
254-
needs: [benchmark-oci, benchmark-fsversion-v5, benchmark-fsversion-v6, benchmark-zran]
287+
runs-on: ubuntu-latest-16-cores
288+
needs:
289+
- has
290+
- benchmark-oci
291+
- benchmark-fsversion-v5
292+
- benchmark-fsversion-v6
293+
- benchmark-zran
294+
if: needs.has.outputs.latest-16
255295
strategy:
256296
matrix:
257297
include:
@@ -269,24 +309,24 @@ jobs:
269309
tag: 8-al2022-jdk
270310
steps:
271311
- name: Checkout
272-
uses: actions/checkout@v4
312+
uses: actions/checkout@v6
273313
- name: Download benchmark-oci
274-
uses: actions/download-artifact@v4
314+
uses: actions/download-artifact@v7
275315
with:
276316
name: benchmark-oci-${{ matrix.image }}
277317
path: benchmark-result
278318
- name: Download benchmark-fsversion-v5
279-
uses: actions/download-artifact@v4
319+
uses: actions/download-artifact@v7
280320
with:
281321
name: benchmark-fsversion-v5-${{ matrix.image }}
282322
path: benchmark-result
283323
- name: Download benchmark-fsversion-v6
284-
uses: actions/download-artifact@v4
324+
uses: actions/download-artifact@v7
285325
with:
286326
name: benchmark-fsversion-v6-${{ matrix.image }}
287327
path: benchmark-result
288328
- name: Download benchmark-zran
289-
uses: actions/download-artifact@v4
329+
uses: actions/download-artifact@v7
290330
with:
291331
name: benchmark-zran-${{ matrix.image }}
292332
path: benchmark-result

0 commit comments

Comments
 (0)