Skip to content

[Misc] GlobalAccountId to ProviderSubaccountId migration + Readme update#98

Merged
anirudhprasad-sap merged 8 commits intomainfrom
gaTopsa-values
Apr 29, 2026
Merged

[Misc] GlobalAccountId to ProviderSubaccountId migration + Readme update#98
anirudhprasad-sap merged 8 commits intomainfrom
gaTopsa-values

Conversation

@anirudhprasad-sap
Copy link
Copy Markdown
Contributor

@anirudhprasad-sap anirudhprasad-sap commented Apr 28, 2026

Migrate globalAccountId to providerSubaccountId in CAP Operator Helm Charts

New Feature

♻️ Refactor/Migration: Introduced an automatic migration mechanism that detects and replaces the deprecated globalAccountId field with providerSubaccountId in existing CAP Operator Helm chart files when running cds add cap-operator.

Changes

  • lib/add.js:

    • Added adoptIncompactibleChanges() method that detects if btp.globalAccountId still exists in chart/values.yaml and automatically migrates it to providerSubaccountId, updates chart/templates/cap-operator-cros.yaml if present, and refreshes values.schema.json from the plugin's bundled templates.
    • Integrated the migration into handleExistingChart() so it runs automatically when re-running cds add cap-operator on an existing chart.
    • Fixed the chart existence check to also verify the chart directory is non-empty before treating it as an existing chart.
    • Minor formatting fix for a multi-line filter condition.
  • test/add.test.js:

    • Added three new test cases covering:
      • Migration of globalAccountIdproviderSubaccountId in a simple chart.
      • Migration in a configurable template chart (including the CRO template file).
      • Verification that migration is skipped when the chart is already up to date.
  • 🔄 Regenerate and Update Summary
PR Bot Information

Version: 1.20.33

  • Event Trigger: pull_request.opened
  • Correlation ID: 3e2f169e-aad6-4495-a0a9-33f346f62e7d
  • Output Template: Default Template
  • File Content Strategy: Full file content
  • LLM: anthropic--claude-4.6-sonnet
  • Summary Prompt: Default Prompt

Copy link
Copy Markdown
Contributor

@hyperspace-insights hyperspace-insights Bot left a comment

Choose a reason for hiding this comment

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

The PR introduces a globalAccountId → providerSubaccountId migration and a guard for empty chart directories, but has several issues worth addressing: a misspelled method name (adoptIncompactibleChanges), a potentially confusing early-exit guard that silently conflates "btp absent" with "globalAccountId absent", a missing warning when the CRO template file doesn't exist but the schema is still overwritten, and a subtle fragility around double-writing values.schema.json during migration. The bare readdirSync('chart') path is also safer when anchored to cds.root.

PR Bot Information

Version: 1.20.33

  • LLM: anthropic--claude-4.6-sonnet
  • Event Trigger: pull_request.opened
  • File Content Strategy: Full file content
  • Correlation ID: 3e2f169e-aad6-4495-a0a9-33f346f62e7d

Comment thread lib/add.js Outdated
Comment thread lib/add.js Outdated
Comment thread lib/add.js
Comment thread lib/add.js
Comment thread lib/add.js Outdated
Comment thread lib/add.js Outdated
anirudhprasad-sap and others added 2 commits April 28, 2026 14:07
Co-authored-by: hyperspace-insights[bot] <209611008+hyperspace-insights[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@Pavan-SAP Pavan-SAP left a comment

Choose a reason for hiding this comment

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

@anirudhprasad-sap anirudhprasad-sap enabled auto-merge (squash) April 29, 2026 07:48
@sonarqubecloud
Copy link
Copy Markdown

@anirudhprasad-sap anirudhprasad-sap merged commit c086ef0 into main Apr 29, 2026
9 checks passed
@anirudhprasad-sap anirudhprasad-sap deleted the gaTopsa-values branch April 29, 2026 07:53
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