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
Open
Ewerton Scaboro da Silva (ewertons) wants to merge 1 commit into
Ewerton Scaboro da Silva (ewertons) wants to merge 1 commit into
Conversation
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 started reviewing on behalf of
Ewerton Scaboro da Silva (ewertons)
September 21, 2026 23:16
View session
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The link poll reads the namespace with
-AllowFailure, so a read that fails returns$nulland 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 printendpoint 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 withADR 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-Modulereports 10 parts, 16 exported commands, shim intact.