Skip to content

fix: pass region string directly in updateLaunchConfig.mjs instead of broken enum lookup#38

Merged
cs-raj merged 1 commit into
mainfrom
fix/DX-9383
Jun 30, 2026
Merged

fix: pass region string directly in updateLaunchConfig.mjs instead of broken enum lookup#38
cs-raj merged 1 commit into
mainfrom
fix/DX-9383

Conversation

@cs-raj

@cs-raj cs-raj commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Problem

updateLaunchConfig.mjs was using a TypeScript enum reverse-lookup to
resolve the region value:

region: Region[process.env.NEXT_PUBLIC_CONTENTSTACK_REGION]

The Region enum in @contentstack/delivery-sdk only has three keys:
EU, AZURE_EU, GCP_EU. Any other value — NA, azure-na, gcp-na, or even
lowercase eu — resolves to undefined, so the SDK was silently receiving
no region at all. Cache priming on Contentstack Launch deployments was
broken for every region except exact uppercase EU.

The app itself was unaffected at runtime since lib/contentstack.ts
already passed the string directly.

Fix

Drop the enum lookup, pass the env var string directly — the same
approach used everywhere else in the codebase. Also removed the now
unused Region import.

@cs-raj cs-raj requested a review from a team as a code owner June 30, 2026 09:02
@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 22 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

ℹ️ Vulnerabilities Without Available Fixes (Informational Only)

The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:

  • Critical without fixes: 0
  • High without fixes: 0
  • Medium without fixes: 22
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

@cs-raj cs-raj merged commit ce57200 into main Jun 30, 2026
6 checks passed
@cs-raj cs-raj deleted the fix/DX-9383 branch June 30, 2026 09:16
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