Skip to content

[Fix] Reject workspace_id with a leading zero in provider_config#5763

Draft
tanmay-db wants to merge 1 commit into
spog-wsid-error-sourcesfrom
spog-wsid-leading-zero
Draft

[Fix] Reject workspace_id with a leading zero in provider_config#5763
tanmay-db wants to merge 1 commit into
spog-wsid-error-sourcesfrom
spog-wsid-leading-zero

Conversation

@tanmay-db

Copy link
Copy Markdown
Contributor

A provider_config.workspace_id like "0470576644108500" passed the StringIsNotEmpty validation and, because strconv.ParseInt tolerates leading zeros, routed to the correct workspace. But the literal padded value was written verbatim to state, where it no longer matched the canonical numeric ID returned by the API, poisoning every downstream string comparison (perpetual diffs, failed workspace_id reconciliation, spurious ForceNew).

workspaceIDValidateFunc now rejects all-digit values with a leading zero and suggests the canonical form, while leaving non-numeric connection IDs untouched so the platform gateway can still disambiguate them server-side.

Co-authored-by: Isaac

Changes

Tests

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • using Go SDK
  • using TF Plugin Framework
  • has entry in NEXT_CHANGELOG.md file

A provider_config.workspace_id like "0470576644108500" passed the
StringIsNotEmpty validation and, because strconv.ParseInt tolerates leading
zeros, routed to the correct workspace. But the literal padded value was
written verbatim to state, where it no longer matched the canonical numeric
ID returned by the API, poisoning every downstream string comparison
(perpetual diffs, failed workspace_id reconciliation, spurious ForceNew).

workspaceIDValidateFunc now rejects all-digit values with a leading zero and
suggests the canonical form, while leaving non-numeric connection IDs
untouched so the platform gateway can still disambiguate them server-side.

Co-authored-by: Isaac
@tanmay-db tanmay-db temporarily deployed to test-trigger-is May 29, 2026 09:09 — with GitHub Actions Inactive
@tanmay-db tanmay-db temporarily deployed to test-trigger-is May 29, 2026 09:09 — with GitHub Actions Inactive
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