Skip to content

fix: recover subscription discovery after transient empty results - #11

Open
Krishna-Chaitanya4 wants to merge 2 commits into
webdevops:mainfrom
Krishna-Chaitanya4:peruguyadav-microsoft-exporter-rbac-recovery-fix
Open

Krishna-Chaitanya4 wants to merge 2 commits into
webdevops:mainfrom
Krishna-Chaitanya4:peruguyadav-microsoft-exporter-rbac-recovery-fix

Conversation

@Krishna-Chaitanya4

@Krishna-Chaitanya4 Krishna-Chaitanya4 commented Oct 23, 2026 •

Copy link
Copy Markdown

Fix

Subscription discovery could remain empty after access became available: empty results were cached for an hour, and configured subscription iterators retained their initial list indefinitely.

  • Cache empty results for at most one minute, respecting shorter configured TTLs.
  • Refresh configured iterators through the cache while preserving subscription filtering.
  • Keep non-empty cache behavior and error handling unchanged.

Validation

Full Go tests and targeted vet passed. Regression tests fail before the iterator fix and pass afterward.

An isolated Kubernetes Job compared baseline and fixed code against mocked ARM responses. After 61 seconds, the baseline remained empty; the fixed client and configured iterator recovered with one additional request. Normal startup, persistently empty results, request bounds, and authorization errors also passed. Test resources were removed; existing workloads were unchanged.

Scope: Kubernetes-hosted library tests only. Live Azure RBAC propagation and a patched exporter deployment have not been validated.

Krishna Chaitanya and others added 2 commits October 23, 2026 10:53
Cache successful empty subscription lists for at most one minute while preserving shorter positive TTLs and normal non-empty caching. Avoid the cached-list wrapper overwriting the capped expiration.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Retain a defensive copy of configured subscription IDs instead of a permanent discovery snapshot. Preserve eager discovery and error timing, and refresh filtered results through the existing service-discovery cache.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Krishna-Chaitanya4 Krishna-Chaitanya4 changed the title fix: bound caching of empty subscription discovery results fix: recover subscription discovery after transient empty results Oct 23, 2026
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