Skip to content

Say when the ADR link timed out because the namespace could not be read - #452

Open
Ewerton Scaboro da Silva (ewertons) wants to merge 1 commit into
masterfrom
fix/adr-link-diagnosability
Open

Ewerton Scaboro da Silva (ewertons) wants to merge 1 commit into
masterfrom
fix/adr-link-diagnosability

Conversation

@ewertons

Copy link
Copy Markdown
Contributor

The link poll reads the namespace with -AllowFailure, so a read that fails returns $null and every endpoint state below it renders as nothing. A namespace that cannot be read therefore looks exactly like a link that has not started: both print endpoint states: for the whole 900 s and then fail with the same message.

This is live in the certificate-management e2e: the link PUT is accepted, then 60 consecutive polls print Waiting for ADR namespace link (endpoint states: ). with no other output, and the run fails with ADR namespace link did not complete within 900 seconds (endpoint states: ). Nothing in the log says whether the namespace was unreadable or the link never progressed, and the two call for opposite responses.

Count the reads and the failures, report them while waiting, and say so plainly in the timeout when every read failed.

No behaviour change: the timeout stays terminal and is still surfaced rather than answered by recreating the namespace.

Verified with a new flow test that reproduces the failure — link accepted, every later GET fails — and asserts the timeout names it as a read failure. 47 flow assertions and the unit suite pass; Validate-Module reports 10 parts, 16 exported commands, shim intact.

The link poll reads the namespace with -AllowFailure, so a read that fails
returns $null and every endpoint state below it renders as nothing. A namespace
that cannot be READ therefore looks exactly like a link that has not started:
both print 'endpoint states: ' for the whole timeout and then fail with the same
message, with no indication which happened. The two call for opposite responses.

Count the reads and the failures, report them while waiting, and say so plainly
in the timeout when every read failed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The reviewed changes improve timeout diagnostics without changing behavior.

Review effort: Lite
Findings: None

What changed in this PR

Improves ADR namespace-link polling diagnostics by distinguishing unreadable namespaces from stalled links.

Changes:

  • Counts namespace reads and failures.
  • Reports failures while polling.
  • Identifies all-read failures in timeout messages.
File Description
scripts/​AzIotSdkTest/​parts/​Dps.ps1 Adds namespace read-failure tracking and diagnostics.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants