Skip to content

[OPE-161] PagerDuty import: EU region support#97

Merged
singret merged 1 commit into
mainfrom
ope-161-pagerduty-eu-region
May 24, 2026
Merged

[OPE-161] PagerDuty import: EU region support#97
singret merged 1 commit into
mainfrom
ope-161-pagerduty-eu-region

Conversation

@singret
Copy link
Copy Markdown
Contributor

@singret singret commented May 24, 2026

Summary

  • Adds a Region selector (US / EU) to the PagerDuty import wizard and settings page
  • EU customers were silently failing with auth errors because the client was hardcoded to api.pagerduty.com; now routes to api.eu.pagerduty.com when EU is selected
  • Mirrors the existing Opsgenie region pattern exactly — no new patterns introduced

Changes

  • pdClientFactory updated to accept (apiKey, baseURL string) — base URL no longer hardcoded
  • pdBaseURL(region string) helper maps "eu" → EU endpoint, anything else → US (safe default)
  • Frontend: region radio group added to PagerDutyImportPanel before the API key field, matching Opsgenie's UI
  • PDMigrationRequest type updated with optional region field

Test plan

  • make validate passes (Go tests + frontend build)
  • TestPDBaseURL_DefaultsToUS — empty/us region resolves to US endpoint
  • TestPDBaseURL_EU — eu region resolves to EU endpoint
  • TestPreviewPagerDutyMigration_EURegion — preview handler accepts region=eu
  • TestImportPagerDutyMigration_EURegion — import handler accepts region=eu
  • All existing PagerDuty tests continue to pass
  • Region radio (US / EU) visible in import wizard, US selected by default

Closes OPE-161

Add a Region selector (US / EU) to the PagerDuty import wizard. EU
customers were silently failing because the client was hardcoded to
the US endpoint; now the handler resolves api.eu.pagerduty.com when
region=eu is passed.

- pdClientFactory now takes (apiKey, baseURL string) — no longer
  hardcodes the US base URL
- pdBaseURL() helper maps "eu" → EU endpoint, anything else → US
- Frontend mirrors the Opsgenie region radio group pattern
- Four new tests cover pdBaseURL(), EU preview, and EU import paths
@singret singret merged commit 70975ae into main May 24, 2026
4 checks passed
@singret singret deleted the ope-161-pagerduty-eu-region branch May 24, 2026 13:14
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.

1 participant