Skip to content

config-remote-sync: report deployed ids when a selector matches nothing - #6115

Open
ilyakuz-db wants to merge 2 commits into
mainfrom
fix/configsync-no-deployed-id-diagnostics
Open

config-remote-sync: report deployed ids when a selector matches nothing#6115
ilyakuz-db wants to merge 2 commits into
mainfrom
fix/configsync-no-deployed-id-diagnostics

Conversation

@ilyakuz-db

Copy link
Copy Markdown
Contributor

Changes

When bundle config-remote-sync --select-ids matches no deployed resource, the error only said which id was missing:

Error: no deployed jobs resource with id 122663429424943

That single line can't distinguish the cases it actually covers, and they have completely different fixes:

  • the bundle's resource state is missing or empty (never deployed / state not uploaded),
  • the state belongs to a different bundle or target than expected,
  • the id is genuinely stale (resource deleted or recreated).

The error now also reports what the state did contain:

Error: no deployed jobs resource with id no-such-id-123; deployed jobs ids in state: 111, 222
Error: no deployed pipelines resource with id 456; the deployment state contains no pipelines resources (deployed resources by type: jobs=2)
Error: no deployed jobs resource with id 789; the deployment state contains no resources with ids (the bundle may not be deployed, or its resource state is missing)

Only resource types and ids are included. Ids are opaque workspace identifiers; resource keys, names and paths come from user configuration and are never reported. The id list is capped at 10 (... (and N more)) so the message stays readable and fits the truncation limit on the error string recorded in telemetry.

Why

This error shows up in production and is currently very hard to act on — the message looks identical whether the state is empty, belongs to another bundle, or holds a different id set, so diagnosing it requires reproducing with --log-level debug. Including the id set makes the common cases self-evident from the error alone.

Tests

Unit tests for the three message shapes plus the truncation path, and the existing select_basic acceptance snapshot updated (it already covered both the wrong-id and wrong-type cases, on both engines).

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

Files: acceptance/bundle/config-remote-sync/select_basic/output.txt, acceptance/bundle/config-remote-sync/select_basic/test.toml
Eligible: @andrewnester, @anton-107, @denik, @janniklasrose, @lennartkats-db, @pietern, @shreyas-goenka

/bundle/ - needs approval

Files: bundle/configsync/select.go, bundle/configsync/select_test.go
Eligible: @andrewnester, @anton-107, @denik, @janniklasrose, @lennartkats-db, @pietern, @shreyas-goenka

Any maintainer (@andrewnester, @anton-107, @denik, @pietern, @shreyas-goenka, @simonfaltum, @renaudhartert-db, @janniklasrose, @lennartkats-db) can approve all areas.
See OWNERS for ownership rules.

@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: bddf697

Run: 30628792827

Env 🟨​KNOWN 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 3 1 4 325 1065 6:30
🟨​ aws windows 3 1 4 324 1064 7:07
🟨​ azure linux 3 1 4 325 1064 6:42
🟨​ azure windows 3 1 4 324 1063 6:37
💚​ gcp linux 1 5 324 1066 4:41
💚​ gcp windows 1 5 323 1065 5:50
8 interesting tests: 4 SKIP, 3 KNOWN, 1 RECOVERED
Test Name aws linux aws windows azure linux azure windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestFetchRepositoryInfoAPI_FromRepo 🟨​K 🟨​K 🟨​K 🟨​K 🙈​S 🙈​S
🟨​ TestFetchRepositoryInfoAPI_FromRepo/root 🟨​K 🟨​K 🟨​K 🟨​K
🟨​ TestFetchRepositoryInfoAPI_FromRepo/subdir 🟨​K 🟨​K 🟨​K 🟨​K
Top 3 slowest tests (at least 2 minutes):
duration env testname
4:13 aws windows TestAccept
4:08 gcp windows TestAccept
3:20 azure windows TestAccept

@ilyakuz-db
ilyakuz-db requested review from andrewnester and denik July 31, 2026 12:41
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