You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs: add personal-dev troubleshooting section and CI validation tests - #7367
docs/personal-dev.md is the entry point for every engineer setting up a personal dev environment, but nothing keeps it honest. When a make target is renamed or removed, the guide silently rots and the next person to follow it hits a failure that looks like a broken environment rather than a stale doc.
This adds an executable check so documentation drift fails in CI instead of being discovered by the next onboarding engineer, and fills the largest gap in the guide itself: what to do when setup times out or errors.
The problem is not hypothetical. Rebasing this branch onto current main immediately surfaced that infra.tracing — documented and valid at the branch's original base — had been removed upstream by 776552a ("fix: Remove Jaeger tracing infrastructure") with no replacement. That is exactly the class of drift this suite is meant to catch.
What
The test suite
test/docs/personal-dev-readme-test.sh — assertions over docs/personal-dev.md: required sections exist, documented make targets resolve via make -n, the az version floor and PERSIST flag are documented, cleanup retention periods and resource-group naming patterns match, Azure IDs are well-formed GUIDs, and internal links resolve on disk.
make test-docs — local entry point.
test/docs/README.md — how to run and extend the suite.
A troubleshooting section in the guide
Setup is long-running and talks to a lot of Azure APIs, so partial failures are routine, but the guide covered only the happy path. The new section documents levers that already existed and were undiscoverable: that re-running is resumable via the .step-cache; the three artifacts a run leaves behind (_artifacts/junit_entrypoint.xml, timing/steps.yaml, _artifacts/config.yaml); make visualize and make graph/entrypoint/Region; and LOG_LEVEL.
It separates the two timeouts that are easy to confuse — --deployment-timeout-seconds (default 180) governs waiting for an earlier deployment of the same pipeline, not the deployment itself, while unbounded --concurrency is the likelier cause of throttling-driven failures.
TEST_MODE=dry-run (the default, and what CI runs) makes assertions about documentation only: no tooling, no network, no Azure access. Verified under a stripped network namespace — 11/11, exit 0. TEST_MODE=full adds local az / kubectl availability checks — 13/13. An unrecognised value exits 2 rather than silently falling back.
Because dry-run needs no tooling, the CI job installs neither Azure CLI nor kubectl. There are no external downloads in this workflow.
Link checking is offline. Targets carrying a URI scheme (http:, https:, mailto:, ...) and same-page #anchor links are skipped rather than fetched; everything else resolves against the filesystem relative to the file under test. The trade-off is deliberate — dead external URLs are not caught, in exchange for a suite that cannot fail because a third-party site is slow, rate-limiting, or behind a login.
Link extraction uses an awkmatch() loop. The greedy grep pattern it replaces collapsed every link on a line into a single match and kept only the last, silently dropping high-level-architecture.md from validation. awk rather than grep -P because BSD grep on macOS has no PCRE. Net: 6 of 8 links verified, up from 4.
Markdown linting is scoped, deliberately
Linting **/*.md is not viable here: roughly 3348 lines across 198 files exceed the 120-column limit, all predating this config. An unscoped job would fail on every PR for reasons unrelated to the change under review.
The lint step runs against the intersection of two constraints — files the change actually touches, and an allowlist (docs/personal-dev.md, test/docs/) — and is skipped when that set is empty. Widen the allowlist as more docs are brought up to standard, rather than relaxing the rules.
To make that allowlist honest rather than a trap, this PR also reflows 22 over-length lines in docs/personal-dev.md. That change is whitespace only: a word-level diff shows no prose added or removed outside the new section.
MD028 is disabled. GitHub alert blocks (> [!NOTE], > [!CAUTION]) are adjacent blockquotes separated by a blank line, which the rule reports as a blank inside one blockquote. The pattern is idiomatic and used throughout these docs.
CI/CD changes (called out per CONTRIBUTING.md §6)
This PR adds .github/workflows/docs-validation.yml, a new GitHub Actions workflow with two jobs. Reviewers should look at this closely:
One third-party action, pinned to a release tag: nosborn/github-action-markdown-cli@v3.3.0. The changed-file list is computed with plain git diff rather than pulling in a second action.
No curl | sh, no external downloads, no secrets consumed.
fetch-depth: 0 on the lint job's checkout, required for the base diff to resolve. Base revision comes from the pull_request event, falling back to the previous commit when absent or unresolvable (first push to a branch, force push).
It also adds a new executable script under test/docs/. Per our own review policy, new executable scripts in tooling directories warrant explicit human review.
Verification
Scenario
Result
TEST_MODE=dry-run, no network namespace
11/11, exit 0
TEST_MODE=full
13/13, exit 0
TEST_MODE=bogus
exit 2, diagnostic on stderr
make test-docs
11/11, exit 0
Run from outside the repo root
11/11, exit 0
Fixture with a broken link sharing a line with a valid one
correctly fails, names the broken target
Lint gate simulated against this PR's own diff
lints both in-scope files, exit 0
Base-SHA fallback: empty / all-zeros / bogus
degrades to HEAD^, no crash under set -euo pipefail
Non-goals
Does not validate README.md or any doc other than docs/personal-dev.md. Does not execute any documented command that touches Azure — assertions are static plus make -n. Does not verify external URLs or heading anchors. Does not bring the other 197 files with lint violations up to standard.
Tracking
No existing Jira ticket. Filed as developer-experience maintenance work; happy to attach one if the team prefers a tracked item before this leaves Draft.
I'm waiting for a Azure member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.
Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
The reason will be displayed to describe this comment to others. Learn more.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
The workflow does not trigger when Makefile changes, so the target-removal scenario this suite is intended to catch can merge without running the documentation tests. Add the root Makefile to both event path filters (and keep the push filter aligned with the PR filter).
Ensure tests cover all documented make targets
test/docs/personal-dev-readme-test.sh:119
The hard-coded list is not “all documented make targets”: it omits the documented pipeline/<name> target and both make -C dev-infrastructure ...-miwi-pg-connect commands. It also lets future commands be added to the guide without being tested. Extract make invocations from the document (including -C) or add a completeness assertion so the suite actually detects this drift.
The validation workflow does not run when the root Makefile changes. Renaming or removing one of the documented targets would therefore skip this check entirely, which defeats the primary drift scenario this workflow is intended to catch. Include Makefile changes in both PR and push path filters.
Validate all documented Make targets
test/docs/personal-dev-readme-test.sh:119
This hard-coded list is not complete: docs/personal-dev.md:119 and :126 also document make -C dev-infrastructure cs-miwi-pg-connect and maestro-miwi-pg-connect. Either target can disappear while this test remains green, despite the test claiming to validate all documented make targets. Extract the invocations from the document or include directory/target pairs in the validation.
This issue also appears on line 125 of the same file.
Compare documented retention values with policy
test/docs/personal-dev-readme-test.sh:158
This only checks that the documentation still contains two hard-coded strings; it never compares them with the authoritative olderThan values in tooling/cleanup-sweeper/resourcegroups.policy.yaml. A policy retention change would leave stale documentation and this test would still pass. Derive or compare the documented values against that policy and trigger the workflow when the policy changes.
Validate documented cleanup patterns against policy
test/docs/personal-dev-readme-test.sh:167
These regexes validate only the -svc and -mgmt examples, not the cleanup-sensitive prefixes and -shared-resources suffix that the guide links to resourcegroups.policy.yaml for. Changes to the actual cleanup naming rules can therefore leave the guide stale without failing this test. Compare the documented cleanup patterns with the policy source instead.
Moises Cassidy (moisescassidy)
changed the title
test: add documentation tests for the personal-dev guide
docs: add personal-dev troubleshooting section and CI validation tests
Oct 8, 2026
The reason will be displayed to describe this comment to others. Learn more.
Please rename this workflow to Docs: Validate Documentation so it follows the purpose-based Actions sidebar naming convention in PR #8297. The filename and triggers can stay as they are.
Adds an executable check so documentation drift fails in CI instead of
being discovered by the next onboarding engineer, and fills the largest
gap in the guide: what to do when setup times out or errors.
- test/docs/personal-dev-readme-test.sh — assertions over
docs/personal-dev.md (make targets via make -n, az version floor,
PERSIST flag, cleanup retention, resource-group patterns, GUIDs,
internal links)
- make test-docs — local entry point (via bash, no exec-bit dependency)
- test/docs/README.md — how to run and extend the suite
- .github/workflows/docs-validation.yml — markdown lint + README tests
(pinned to SHAs, baseline fallback when only config changes)
- .markdownlint.json — lint config (MD060 disabled for tables)
- docs/personal-dev.md — reflow to 120 cols, add troubleshooting section
covering .step-cache, _artifacts, timing, LOG_LEVEL, timeouts,
concurrency, and cleanup
Co-Authored-By: Claude Code <noreply@anthropic.com>
This pull-request has been approved by: moisescassidy Once this PR has been reviewed and has the lgtm label, please assign roivaz for approval. For more information see the Code Review Process.
The full list of commands accepted by this bot can be found here.
Details
Needs approval from an approver in each of these files:
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unresolved validation flaws can trigger real builds, mishandle timeouts, fail on macOS, and miss documentation drift involving Make targets, Makefile-only changes, and multiline links.
if ! timeout 10 make -n "${target}" &>/dev/null; then
rc=$?
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
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.
Why
docs/personal-dev.mdis the entry point for every engineer setting up a personal dev environment, but nothing keeps it honest. When amaketarget is renamed or removed, the guide silently rots and the next person to follow it hits a failure that looks like a broken environment rather than a stale doc.This adds an executable check so documentation drift fails in CI instead of being discovered by the next onboarding engineer, and fills the largest gap in the guide itself: what to do when setup times out or errors.
The problem is not hypothetical. Rebasing this branch onto current
mainimmediately surfaced thatinfra.tracing— documented and valid at the branch's original base — had been removed upstream by 776552a ("fix: Remove Jaeger tracing infrastructure") with no replacement. That is exactly the class of drift this suite is meant to catch.What
The test suite
test/docs/personal-dev-readme-test.sh— assertions overdocs/personal-dev.md: required sections exist, documentedmaketargets resolve viamake -n, theazversion floor andPERSISTflag are documented, cleanup retention periods and resource-group naming patterns match, Azure IDs are well-formed GUIDs, and internal links resolve on disk.make test-docs— local entry point.test/docs/README.md— how to run and extend the suite.A troubleshooting section in the guide
Setup is long-running and talks to a lot of Azure APIs, so partial failures are routine, but the guide covered only the happy path. The new section documents levers that already existed and were undiscoverable: that re-running is resumable via the
.step-cache; the three artifacts a run leaves behind (_artifacts/junit_entrypoint.xml,timing/steps.yaml,_artifacts/config.yaml);make visualizeandmake graph/entrypoint/Region; andLOG_LEVEL.It separates the two timeouts that are easy to confuse —
--deployment-timeout-seconds(default 180) governs waiting for an earlier deployment of the same pipeline, not the deployment itself, while unbounded--concurrencyis the likelier cause of throttling-driven failures.CI
.github/workflows/docs-validation.yml— markdown lint + README tests..markdownlint.json— lint config.The suite is hermetic
TEST_MODE=dry-run(the default, and what CI runs) makes assertions about documentation only: no tooling, no network, no Azure access. Verified under a stripped network namespace — 11/11, exit 0.TEST_MODE=fulladds localaz/kubectlavailability checks — 13/13. An unrecognised value exits 2 rather than silently falling back.Because dry-run needs no tooling, the CI job installs neither Azure CLI nor kubectl. There are no external downloads in this workflow.
Link checking is offline. Targets carrying a URI scheme (
http:,https:,mailto:, ...) and same-page#anchorlinks are skipped rather than fetched; everything else resolves against the filesystem relative to the file under test. The trade-off is deliberate — dead external URLs are not caught, in exchange for a suite that cannot fail because a third-party site is slow, rate-limiting, or behind a login.Link extraction uses an
awkmatch()loop. The greedygreppattern it replaces collapsed every link on a line into a single match and kept only the last, silently droppinghigh-level-architecture.mdfrom validation.awkrather thangrep -Pbecause BSD grep on macOS has no PCRE. Net: 6 of 8 links verified, up from 4.Markdown linting is scoped, deliberately
Linting
**/*.mdis not viable here: roughly 3348 lines across 198 files exceed the 120-column limit, all predating this config. An unscoped job would fail on every PR for reasons unrelated to the change under review.The lint step runs against the intersection of two constraints — files the change actually touches, and an allowlist (
docs/personal-dev.md,test/docs/) — and is skipped when that set is empty. Widen the allowlist as more docs are brought up to standard, rather than relaxing the rules.To make that allowlist honest rather than a trap, this PR also reflows 22 over-length lines in
docs/personal-dev.md. That change is whitespace only: a word-level diff shows no prose added or removed outside the new section.MD028is disabled. GitHub alert blocks (> [!NOTE],> [!CAUTION]) are adjacent blockquotes separated by a blank line, which the rule reports as a blank inside one blockquote. The pattern is idiomatic and used throughout these docs.CI/CD changes (called out per CONTRIBUTING.md §6)
This PR adds
.github/workflows/docs-validation.yml, a new GitHub Actions workflow with two jobs. Reviewers should look at this closely:permissions: contents: read.nosborn/github-action-markdown-cli@v3.3.0. The changed-file list is computed with plaingit diffrather than pulling in a second action.curl | sh, no external downloads, no secrets consumed.fetch-depth: 0on the lint job's checkout, required for the base diff to resolve. Base revision comes from thepull_requestevent, falling back to the previous commit when absent or unresolvable (first push to a branch, force push).It also adds a new executable script under
test/docs/. Per our own review policy, new executable scripts in tooling directories warrant explicit human review.Verification
TEST_MODE=dry-run, no network namespaceTEST_MODE=fullTEST_MODE=bogusmake test-docsHEAD^, no crash underset -euo pipefailNon-goals
Does not validate
README.mdor any doc other thandocs/personal-dev.md. Does not execute any documented command that touches Azure — assertions are static plusmake -n. Does not verify external URLs or heading anchors. Does not bring the other 197 files with lint violations up to standard.Tracking
No existing Jira ticket. Filed as developer-experience maintenance work; happy to attach one if the team prefers a tracked item before this leaves Draft.