Skip to content

feat(mapt-provisioner): add spot-eviction-tolerance to SNC script#70

Merged
rishupk merged 1 commit into
mainfrom
feat+snc-spot-eviction-tolerance
Jun 22, 2026
Merged

feat(mapt-provisioner): add spot-eviction-tolerance to SNC script#70
rishupk merged 1 commit into
mainfrom
feat+snc-spot-eviction-tolerance

Conversation

@rishupk

@rishupk rishupk commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Adds --spot-eviction-tolerance flag to provision_snc.sh, matching the RHEL AI script pattern. Defaults to highest when --spot is used — SNC installs take ~22min and spot eviction mid-install is costly.

E2E tested in Claudio: provisioned SNC with --profile ai,nvidia --spot --tags team=aipcc,env=test, verified cluster health (node ready, GPU allocatable, CUDA validated, RHOAI stack healthy), then destroyed successfully.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
Signed-off-by: Rishabh Kothari rkothari@redhat.com

Summary by CodeRabbit

  • New Features
    • Added --spot-eviction-tolerance CLI option for provisioning. When Spot instances are enabled, tolerance automatically defaults to highest if not specified.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: daa018d9-de88-4de4-b127-5a168168c4f2

📥 Commits

Reviewing files that changed from the base of the PR and between 5c0954c and d515a11.

📒 Files selected for processing (1)
  • claudio-plugin/skills/mapt-provisioner/scripts/provision_snc.sh

📝 Walkthrough

Walkthrough

The provision_snc.sh script gains a --spot-eviction-tolerance CLI option backed by a SPOT_EVICTION_TOLERANCE variable. When --spot is set but no tolerance is provided, it defaults to "highest". The resolved value is appended to the mapt aws openshift-snc create command when non-empty.

Changes

Spot Eviction Tolerance for SNC Provisioning

Layer / File(s) Summary
Variable declaration, help text, and argument parsing
claudio-plugin/skills/mapt-provisioner/scripts/provision_snc.sh
Adds the SPOT_EVICTION_TOLERANCE variable (initialized empty), documents --spot-eviction-tolerance in the usage output with its accepted values, and parses the option from CLI arguments.
Default logic and command construction
claudio-plugin/skills/mapt-provisioner/scripts/provision_snc.sh
Defaults SPOT_EVICTION_TOLERANCE to "highest" when --spot is active and no value was supplied, then conditionally appends --spot-eviction-tolerance <value> to the mapt aws openshift-snc create invocation.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 Hoppity-hop through the cloud we go,
A tolerance knob for Spot's ebb and flow.
Set it to "highest" and never you fret,
The bunny ensures no instance is lost yet!
With a twitch of a flag, the script's complete—
Eviction? Pff, hardly a hop to beat. 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding spot-eviction-tolerance support to the SNC provisioner script, which aligns perfectly with the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat+snc-spot-eviction-tolerance

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.

@rishupk rishupk changed the base branch from feat+mapt-list-versions-skill to main June 22, 2026 12:10
- Add --spot-eviction-tolerance flag matching RHEL AI script pattern
- Default to highest when --spot is used (SNC installs take ~22min, eviction is costly)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Rishabh Kothari <rkothari@redhat.com>
@rishupk rishupk force-pushed the feat+snc-spot-eviction-tolerance branch from 1d0a53c to d515a11 Compare June 22, 2026 12:11
@rishupk rishupk merged commit 2fec532 into main Jun 22, 2026
14 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.

2 participants