-
Notifications
You must be signed in to change notification settings - Fork 42
Fix a crash during dry-run for Dynamo scenario #757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Mark all installables as installed in dry-run + fix mark_as_installed() behavior for multiple items.
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughInstaller now collects per-item results when marking items as installed and uses them to populate successful installs; CLI dry-run mode simulates installations by marking prepared items as installed; a test was added to verify two identical File instances are both marked installed with matching paths. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
Greptile SummaryThis PR fixes a crash during dry-run for Dynamo scenarios by ensuring all installables have their
Confidence Score: 5/5
Important Files Changed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 files reviewed, 1 comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
src/cloudai/_core/base_installer.py(1 hunks)src/cloudai/cli/handlers.py(1 hunks)tests/test_base_installer.py(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-16T19:47:41.994Z
Learnt from: amaslenn
Repo: NVIDIA/cloudai PR: 754
File: src/cloudai/_core/registry.py:226-234
Timestamp: 2025-12-16T19:47:41.994Z
Learning: In this repository, prefer expressing behavioral documentation through tests rather than docstrings. Tests act as living, verified documentation. Reserve docstrings for interfaces or high-level descriptions, and avoid duplicating behavior that is already covered by tests.
Applied to files:
src/cloudai/cli/handlers.pytests/test_base_installer.pysrc/cloudai/_core/base_installer.py
🧬 Code graph analysis (3)
src/cloudai/cli/handlers.py (2)
src/cloudai/workloads/slurm_container/slurm_container.py (1)
installables(47-48)src/cloudai/_core/base_installer.py (1)
mark_as_installed(261-278)
tests/test_base_installer.py (4)
tests/test_slurm_installer.py (1)
installer(31-35)src/cloudai/systems/slurm/slurm_installer.py (1)
SlurmInstaller(39-367)src/cloudai/_core/installables.py (1)
File(149-167)src/cloudai/_core/base_installer.py (1)
mark_as_installed(261-278)
src/cloudai/_core/base_installer.py (3)
src/cloudai/_core/installables.py (1)
Installable(25-32)src/cloudai/_core/install_status_result.py (1)
InstallStatusResult(22-52)tests/test_base_installer.py (1)
mark_as_installed_one(58-59)
⏰ 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). (1)
- GitHub Check: Greptile Review
🔇 Additional comments (2)
src/cloudai/_core/base_installer.py (1)
271-276: LGTM! Proper fix for multiple identical items.The method now correctly collects per-item results from
mark_as_installed_oneand passes them to_populate_successful_install, ensuring that multiple identical items (e.g., duplicate File instances) all receive their installed_path correctly. This aligns with the pattern used ininstall()andis_installed()methods.tests/test_base_installer.py (1)
296-309: LGTM! Comprehensive test for the fix.The test correctly validates that
mark_as_installedhandles multiple identical File instances properly, ensuring both receive theirinstalled_pathand share the same path. This directly supports the PR objective of fixing mark_as_installed behavior for multiple items.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
src/cloudai/cli/handlers.py(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-16T19:47:41.994Z
Learnt from: amaslenn
Repo: NVIDIA/cloudai PR: 754
File: src/cloudai/_core/registry.py:226-234
Timestamp: 2025-12-16T19:47:41.994Z
Learning: In this repository, prefer expressing behavioral documentation through tests rather than docstrings. Tests act as living, verified documentation. Reserve docstrings for interfaces or high-level descriptions, and avoid duplicating behavior that is already covered by tests.
Applied to files:
src/cloudai/cli/handlers.py
🧬 Code graph analysis (1)
src/cloudai/cli/handlers.py (1)
src/cloudai/_core/base_installer.py (1)
mark_as_installed(261-278)
⏰ 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). (2)
- GitHub Check: Greptile Review
- GitHub Check: Run pytest (3.12)
Summary
Mark all installables as installed in dry-run + fix
mark_as_installed()behavior for multiple items.Fixes internal bug.
Test Plan
Additional Notes
—