Skip to content

Conversation

@s-prosvirnin
Copy link
Member

@s-prosvirnin s-prosvirnin commented Jan 8, 2026

Reference: failed ci/cd test.

Summary by CodeRabbit

  • Observability

    • Enhanced tracing instrumentation for storage operations to capture additional diagnostic metadata.
  • Tests

    • Updated test infrastructure to use an improved storage handling layer with caching capabilities.
    • Adjusted timeout configurations and storage initialization patterns in test scenarios.

✏️ Tip: You can customize this high-level summary in your review settings.

@s-prosvirnin s-prosvirnin requested review from a team and frisbeeman January 8, 2026 09:18
@coderabbitai
Copy link

coderabbitai bot commented Jan 8, 2026

Walkthrough

Tracing instrumentation is added to three S3 storage methods without altering control flow. Additionally, test storage initialization is refactored to wrap storage backends with a new CachedStorage wrapper and adjust timeout parameters across two test files.

Changes

Cohort / File(s) Summary
Tracing instrumentation
crates/icegate-jobmanager/src/storage/s3.rs
Added tracing attributes to get_job_by_meta, find_job_meta, and save_job methods; attributes include job_version, job_code, and skip parameters.
Storage wrapper refactoring
crates/icegate-jobmanager/src/tests/deadline_expiry_test.rs, crates/icegate-jobmanager/src/tests/two_jobs_test.rs
Refactored storage initialization to wrap S3Storage in Arc and new CachedStorage type; storage passed to ManagerEnv as trait object without additional Arc wrapping at call site; request_timeout adjusted from 200 ms to 100 ms in deadline test; Metrics::new_disabled() added to storage construction.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'fix jobmanager tests' is vague and generic, lacking specificity about which tests are being fixed or what the actual changes accomplish. Consider a more descriptive title that explains the core change, such as 'Add tracing instrumentation to S3 storage methods' or 'Refactor test storage initialization with CachedStorage wrapper'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
crates/icegate-jobmanager/src/tests/two_jobs_test.rs (1)

108-129: Minor: Unnecessary clone when casting to trait object.

On line 127, storage.clone() creates an unnecessary Arc clone. The storage variable is already an Arc<S3Storage> and can be directly cast without cloning since ownership is transferred immediately.

♻️ Suggested fix
     let storage = Arc::new(CachedStorage::new(
-        storage.clone() as Arc<dyn Storage>,
+        storage as Arc<dyn Storage>,
         Metrics::new_disabled(),
     ));
crates/icegate-jobmanager/src/tests/deadline_expiry_test.rs (1)

75-96: Minor: Unnecessary clone when casting to trait object.

Same as in two_jobs_test.rs, line 94's storage.clone() is unnecessary since ownership is transferred immediately.

♻️ Suggested fix
     let storage = Arc::new(CachedStorage::new(
-        storage.clone() as Arc<dyn Storage>,
+        storage as Arc<dyn Storage>,
         Metrics::new_disabled(),
     ));
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 83f7b2f and 5ac3b13.

📒 Files selected for processing (3)
  • crates/icegate-jobmanager/src/storage/s3.rs
  • crates/icegate-jobmanager/src/tests/deadline_expiry_test.rs
  • crates/icegate-jobmanager/src/tests/two_jobs_test.rs
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{rs,toml}

📄 CodeRabbit inference engine (AGENTS.md)

Use cargo build for debug builds, cargo build --release for release builds, and specific binary builds with cargo build --bin <name>

Files:

  • crates/icegate-jobmanager/src/storage/s3.rs
  • crates/icegate-jobmanager/src/tests/deadline_expiry_test.rs
  • crates/icegate-jobmanager/src/tests/two_jobs_test.rs
**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

**/*.rs: Run all tests with cargo test, specific tests with cargo test test_name, and use --nocapture flag to show test output
Use make fmt to check code format; DO NOT run via rustup because it doesn't respect rustfmt.toml
Use make clippy to run the linter with warnings as errors
Run make audit to perform security audits and use make install to install cargo-audit
Run make ci to execute all CI checks (check, fmt, clippy, test, audit)
Use rustfmt for code formatting with configuration in rustfmt.toml

Files:

  • crates/icegate-jobmanager/src/storage/s3.rs
  • crates/icegate-jobmanager/src/tests/deadline_expiry_test.rs
  • crates/icegate-jobmanager/src/tests/two_jobs_test.rs
**/*.{rs,toml,md}

📄 CodeRabbit inference engine (AGENTS.md)

Ensure each file ends with a newline; do not duplicate if it already exists

Files:

  • crates/icegate-jobmanager/src/storage/s3.rs
  • crates/icegate-jobmanager/src/tests/deadline_expiry_test.rs
  • crates/icegate-jobmanager/src/tests/two_jobs_test.rs
🧬 Code graph analysis (2)
crates/icegate-jobmanager/src/storage/s3.rs (2)
crates/icegate-jobmanager/src/core/job.rs (1)
  • version (342-344)
crates/icegate-jobmanager/src/tests/common/in_memory_storage.rs (1)
  • version (25-27)
crates/icegate-jobmanager/src/tests/deadline_expiry_test.rs (3)
crates/icegate-jobmanager/src/tests/common/manager_env.rs (2)
  • storage (90-92)
  • new (16-33)
crates/icegate-jobmanager/src/storage/s3.rs (1)
  • new (100-162)
crates/icegate-jobmanager/src/storage/cached.rs (1)
  • new (26-32)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Benchmark
  • GitHub Check: Build Release
  • GitHub Check: Test beta on ubuntu-latest
  • GitHub Check: Security Audit
  • GitHub Check: Test stable on ubuntu-latest
🔇 Additional comments (9)
crates/icegate-jobmanager/src/storage/s3.rs (3)

429-430: LGTM!

Tracing instrumentation is correctly applied. Skipping self and cancel_token is appropriate, and recording job_version from job_meta.version provides useful context for debugging storage operations.


470-471: LGTM!

The instrumentation correctly captures job_code as the identifying field for this operation, which aligns well with the method's purpose of finding job metadata by code.


514-515: LGTM!

Good choice to skip the job parameter to avoid serializing the entire job structure in traces. Capturing job_version from job.version() provides the necessary context for debugging save operations.

crates/icegate-jobmanager/src/tests/two_jobs_test.rs (2)

14-20: LGTM!

The new imports for Storage trait and CachedStorage wrapper are correctly added to support the refactored storage initialization pattern.


142-147: LGTM!

Storage is correctly passed to ManagerEnv::new without additional Arc wrapping, matching the expected signature storage: Arc<dyn Storage> per the relevant code snippets.

crates/icegate-jobmanager/src/tests/deadline_expiry_test.rs (4)

14-20: LGTM!

The imports correctly mirror the pattern established in two_jobs_test.rs for the Storage trait and CachedStorage wrapper.


22-22: LGTM!

The doc comment correctly describes the test's purpose of verifying task re-picking after deadline expiry.


98-109: LGTM!

The worker count increase and comment explaining the rationale for "small resources system" is helpful context. Storage is correctly passed to ManagerEnv.


128-134: [No action required - method exists]

The attempts() method is properly defined on the Task type. Line 102 declares it in the ImmutableTask trait, and line 343 contains its implementation. The test code on line 129 is correct and will compile without errors.

Likely an incorrect or invalid review comment.

@s-prosvirnin s-prosvirnin merged commit e812f50 into main Jan 8, 2026
8 checks passed
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