Skip to content

fix(sdk): cloud=lightning preferring sched-test clusters over baremetal - #59

Merged
justusschock merged 4 commits into
mainfrom
fix/lightning-provider-prefer-baremetal
Jul 29, 2026
Merged

justusschock merged 4 commits into
mainfrom
fix/lightning-provider-prefer-baremetal

Conversation

@tchaton

@tchaton tchaton commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • --cloud=<provider> could resolve to an arbitrary account of that provider because provider→account mapping used last-writer-wins when multiple accounts share a tag.
  • Prefer canonical public accounts for provider aliases:
    • LIGHTNING → lightning-baremetal
    • AWS → lightning-public-prod
    • GCP → gcp-lightning-public-prod
    • LAMBDA_LABS → lightning-lambda-prod
    • NEBIUS → lightning-nebius-prod
    • VOLTAGE_PARK → lightning-voltagepark-prod
  • For non-global mapping (data connections), still prefer BYOC/private over public globals.
  • Add regression tests.

Test plan

  • pytest tests/api/test_cluster_api.py
  • Confirm --cloud=lightning resolves to lightning-baremetal
  • Confirm --cloud=aws / gcp / etc. resolve to the public prod accounts above when present
  • Confirm data connections still bind to BYOC when both BYOC and public accounts exist

Prefer the canonical lightning-baremetal account when multiple MACHINE
clusters share the LIGHTNING provider alias, instead of last-writer-wins.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extend the LIGHTNING baremetal preference to AWS, GCP, Lambda, Nebius,
and Voltage Park. Keep BYOC preferred for non-global mapping used by
data connections.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tchaton tchaton changed the title Fix --cloud=lightning preferring sched-test clusters over baremetal Fix provider aliases to prefer canonical public cloud accounts Jul 29, 2026
@tchaton tchaton changed the title Fix provider aliases to prefer canonical public cloud accounts fix(sdk): cloud=lightning preferring sched-test clusters over baremetal Jul 29, 2026
tchaton and others added 2 commits July 29, 2026 14:38
Covers staging/local environments where prod IDs like lightning-baremetal
are absent: mapping and resolve_cloud_account keep the first available account.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@justusschock
justusschock enabled auto-merge (squash) July 29, 2026 13:43
@justusschock
justusschock merged commit d185fd1 into main Jul 29, 2026
24 checks passed
@justusschock
justusschock deleted the fix/lightning-provider-prefer-baremetal branch July 29, 2026 13:52
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