Skip to content

Commit 0fd08c0

Browse files
authored
ci: enable ATIF S3 storage tests (NVIDIA#168)
#### Overview Enable CI coverage for the ATIF S3 storage integration test by running it against an ephemeral S3-compatible service. - [x] I confirm this contribution is my own work, or I have the right to submit it under this project's license. - [x] I searched existing issues and open pull requests, and this does not duplicate existing work. #### Details - Add an `adobe/s3mock:5.0.0` service to the Linux Rust CI lane. - Pre-create the ATIF test bucket in S3Mock and enable `NEMO_RELAY_RUN_S3_TESTS` for `linux-amd64`. - Export local S3 endpoint, region, dummy credentials, HTTP allowance, and path-style addressing for the existing ATIF S3 integration test. Validation run locally: - `ruby -e 'require "yaml"; YAML.load_file(".github/workflows/ci_rust.yml"); puts "yaml-ok"'` - `cargo test -p nemo-relay --test atif_storage_integration` - `uv run pre-commit run --files .github/workflows/ci_rust.yml` - `git diff --check` Note: local Docker is not installed in this environment, so the live S3Mock container path is expected to be validated by CI. #### Where should the reviewer start? Start with `.github/workflows/ci_rust.yml`, especially the new `s3` service and the environment exported when `matrix.run_s3_tests` is true. #### Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to) - Relates to: none ## Summary by CodeRabbit * **Chores** * CI enhanced to run S3 integration tests on supported Linux AMD64 runners with S3 mock service; environment variables for S3 access are now provided during those tests. * **Tests** * Integration test expectation updated: uploaded trajectory metadata now reports schema version "ATIF-v1.7". [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/NVIDIA/NeMo-Relay/pull/168?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) Authors: - Will Killian (https://github.com/willkill07) Approvers: - David Gardner (https://github.com/dagardner-nv) URL: NVIDIA#168
1 parent 5687372 commit 0fd08c0

2 files changed

Lines changed: 26 additions & 6 deletions

File tree

.github/workflows/ci_rust.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,34 +44,50 @@ jobs:
4444
--health-interval 5s
4545
--health-timeout 3s
4646
--health-retries 10
47+
s3:
48+
image: ${{ matrix.s3_service_image }}
49+
env:
50+
COM_ADOBE_TESTING_S3MOCK_STORE_INITIAL_BUCKETS: nemo-relay-atif-ci
51+
ports:
52+
- 9090:9090
53+
options: >-
54+
--health-cmd "wget --spider -q http://localhost:9090/favicon.ico || exit 1"
55+
--health-interval 5s
56+
--health-timeout 3s
57+
--health-retries 20
4758
strategy:
4859
fail-fast: false
4960
matrix:
5061
include:
5162
- platform: linux-amd64
5263
runner: ubuntu-latest
5364
run_redis_tests: true
54-
redis_service_image: redis:7.4.7-alpine
55-
run_s3_tests: false
65+
redis_service_image: redis:7.4.7-alpine@sha256:02f2cc4882f8bf87c79a220ac958f58c700bdec0dfb9b9ea61b62fb0e8f1bfcf
66+
run_s3_tests: true
67+
s3_service_image: adobe/s3mock:5.0.0@sha256:c461c8f4234bd63540d2f3a3cabce69d814c78dc890a5af08727525a028e23da
5668
- platform: linux-arm64
5769
runner: ubuntu-24.04-arm
5870
run_redis_tests: false
5971
redis_service_image: ''
72+
s3_service_image: ''
6073
run_s3_tests: false
6174
- platform: macos-arm64
6275
runner: macos-15
6376
run_redis_tests: false
6477
redis_service_image: ''
78+
s3_service_image: ''
6579
run_s3_tests: false
6680
- platform: windows-amd64
6781
runner: windows-2022
6882
run_redis_tests: false
6983
redis_service_image: ''
84+
s3_service_image: ''
7085
run_s3_tests: false
7186
- platform: windows-arm64
7287
runner: windows-11-arm
7388
run_redis_tests: false
7489
redis_service_image: ''
90+
s3_service_image: ''
7591
run_s3_tests: false
7692

7793
steps:
@@ -145,11 +161,15 @@ jobs:
145161
if [ "${{ matrix.run_redis_tests }}" = "true" ]; then
146162
export NEMO_RELAY_RUN_REDIS_TESTS=1
147163
fi
148-
# ATIF S3 storage integration tests stay disabled by default. Toggle a
149-
# matrix entry's `run_s3_tests` to `true` once a CI-managed bucket and
150-
# the AWS_*/NEMO_RELAY_S3_TEST_BUCKET secrets are wired through.
151164
if [ "${{ matrix.run_s3_tests }}" = "true" ]; then
152165
export NEMO_RELAY_RUN_S3_TESTS=1
166+
export NEMO_RELAY_S3_TEST_BUCKET=nemo-relay-atif-ci
167+
export AWS_ACCESS_KEY_ID=nemo-relay
168+
export AWS_SECRET_ACCESS_KEY=nemo-relay
169+
export AWS_REGION=us-east-1
170+
export AWS_ENDPOINT_URL=http://127.0.0.1:9090
171+
export AWS_ALLOW_HTTP=true
172+
export AWS_VIRTUAL_HOSTED_STYLE_REQUEST=false
153173
fi
154174
just "${args[@]}" test-rust
155175

crates/core/tests/integration/atif_storage_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ fn atif_storage_uploads_trajectory_to_s3() {
200200
let value: Json = serde_json::from_slice(&body).expect("uploaded payload should be JSON");
201201
assert_eq!(
202202
value["schema_version"].as_str(),
203-
Some("ATIF-v1.6"),
203+
Some("ATIF-v1.7"),
204204
"uploaded artifact should be an ATIF trajectory"
205205
);
206206
let expected_session_id = session_id.to_string();

0 commit comments

Comments
 (0)