Skip to content

fix: add refresh_regions utility and auto-refresh regions.json at build time. - #163

Merged
OMpawar-21 merged 4 commits into
developmentfrom
fix/DX-9040
Jun 19, 2026
Merged

fix: add refresh_regions utility and auto-refresh regions.json at build time.#163
OMpawar-21 merged 4 commits into
developmentfrom
fix/DX-9040

Conversation

@OMpawar-21

Copy link
Copy Markdown
Contributor
  • Add contentstack_management/region_refresh.py exposing a refresh_regions() function that downloads the latest regions manifest from the Contentstack CDN and overwrites the bundled data/regions.json.
  • Export refresh_regions at the package level so CI pipelines and tooling can call it programmatically (from contentstack_management import refresh_regions).
  • Hook setup.py with a custom BuildPyWithRegions command so regions.json is refreshed automatically on every python setup.py build / pip install, keeping the bundled region data current without a manual step.

…ld time.
- Add `contentstack_management/region_refresh.py` exposing a `refresh_regions()`
function that downloads the latest regions manifest from the Contentstack CDN
and overwrites the bundled `data/regions.json`.
- Export `refresh_regions` at the package level so CI pipelines and tooling can
call it programmatically (`from contentstack_management import refresh_regions`).
- Hook `setup.py` with a custom `BuildPyWithRegions` command so `regions.json`
is refreshed automatically on every `python setup.py build` / `pip install`,
keeping the bundled region data current without a manual step.
@OMpawar-21
OMpawar-21 requested a review from a team as a code ownerJune 17, 2026 21:24
@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

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

Check TypeCount (with fixes)Without fixesThresholdResult
🔴 Critical Severity0010✅ Passed
🟠 High Severity0125✅ Passed
🟡 Medium Severity03500✅ Passed
🔵 Low Severity001000✅ Passed

⏱️ SLA Breach Summary

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

SeverityBreaches (with fixes)Breaches (no fixes)SLA Threshold (with/no fixes)Status
🔴 Critical0015 / 30 days✅ Passed
🟠 High0030 / 120 days✅ Passed
🟡 Medium0090 / 365 days✅ Passed
🔵 Low00180 / 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: 1
  • Medium without fixes: 3
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

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

Check TypeCount (with fixes)Without fixesThresholdResult
🔴 Critical Severity0010✅ Passed
🟠 High Severity0125✅ Passed
🟡 Medium Severity03500✅ Passed
🔵 Low Severity001000✅ Passed

⏱️ SLA Breach Summary

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

SeverityBreaches (with fixes)Breaches (no fixes)SLA Threshold (with/no fixes)Status
🔴 Critical0015 / 30 days✅ Passed
🟠 High0030 / 120 days✅ Passed
🟡 Medium0090 / 365 days✅ Passed
🔵 Low00180 / 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: 1
  • Medium without fixes: 3
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

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

Check TypeCount (with fixes)Without fixesThresholdResult
🔴 Critical Severity0010✅ Passed
🟠 High Severity0125✅ Passed
🟡 Medium Severity03500✅ Passed
🔵 Low Severity001000✅ Passed

⏱️ SLA Breach Summary

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

SeverityBreaches (with fixes)Breaches (no fixes)SLA Threshold (with/no fixes)Status
🔴 Critical0015 / 30 days✅ Passed
🟠 High0030 / 120 days✅ Passed
🟡 Medium0090 / 365 days✅ Passed
🔵 Low00180 / 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: 1
  • Medium without fixes: 3
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

@OMpawar-21
OMpawar-21 marked this pull request as draft June 17, 2026 21:58
@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

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

Check TypeCount (with fixes)Without fixesThresholdResult
🔴 Critical Severity0010✅ Passed
🟠 High Severity0125✅ Passed
🟡 Medium Severity03500✅ Passed
🔵 Low Severity001000✅ Passed

⏱️ SLA Breach Summary

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

SeverityBreaches (with fixes)Breaches (no fixes)SLA Threshold (with/no fixes)Status
🔴 Critical0015 / 30 days✅ Passed
🟠 High0030 / 120 days✅ Passed
🟡 Medium0090 / 365 days✅ Passed
🔵 Low00180 / 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: 1
  • Medium without fixes: 3
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

@OMpawar-21
OMpawar-21 marked this pull request as ready for review June 19, 2026 04:07
@OMpawar-21
OMpawar-21 merged commit 3a84192 into developmentJun 19, 2026
8 checks passed
@OMpawar-21
OMpawar-21 deleted the fix/DX-9040 branch June 19, 2026 04:07
Sign up for freeto 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

@OMpawar-21@reeshika-h