chore: retire the legacy examples/ directory#6334
Draft
desimone wants to merge 2 commits into
Draft
Conversation
The examples/ directory at the root of pomerium/pomerium has been silently drifting for years: most subdirectories haven't been touched since 2020-2022, several were duplicated in (and superseded by) the documentation site's own content/examples/ tree, and a few of the configs were outright broken (example-config base64 keys long since rotated, helm scripts using helm del --purge, kubernetes manifests pinned to pomerium:main). The one subdirectory worth keeping (mutual-tls) was migrated to pomerium/documentation in PR #2193 along with the three docs links that referenced this directory. After both PRs land, no part of our workspace links to the legacy examples directory; one external third-party link (sighupio/module-auth) is acceptable as out-of-scope. Cleanup of stale maintenance exceptions left behind: - go.mod: drop ./examples from the ignore (...) block. - .golangci.yml (3 sites): drop ^examples/ from a path-alternation regex and remove the two examples$ entries from the linter and formatter exclusion lists. - .pre-commit-config.yaml: drop examples/.* from the end-of-file-fixer exclusion alternation and remove the standalone check-yaml exclude. Verified the entire YAML tree parses cleanly afterwards (zero offenders in integration/tpl/files/, config/testdata/, or anywhere else), so the hook does not need a replacement scoped exclusion. - Makefile: remove the now-dead `sed -i.bak '/\/examples\/:/d' coverage.txt` line in the cover target. Verified: make build, make test, make lint, make cover all clean. yamlcheck across the full tree clean. git diff --check clean. Cross-repo grep across documentation, pomerium, pomerium-zero, pomerium-console, cli, ingress-controller in active branches returns zero hits for github.com/pomerium/pomerium/.../examples.
External tutorials, blog posts, and third-party catalog entries that link to github.com/pomerium/pomerium/tree/main/examples/* will 404 once the rest of this directory is retired. Leaving a single README at examples/README.md points anyone who lands here at the new home in the documentation repo, avoiding a hard 404 for soft third-party traffic. Per reviewer feedback on the parent commit. Tagged-version links (tree/v0.30.0/examples/...) keep working — only main/master ones break.
✅ Acceptance Test Summary
Feature Coverage
⏱️ Slowest Tests
📋 All Tests by CategoryAuthentication (19)
Authorization (28)
Headers (21)
|
Coverage Report for CI Build 25617805785Coverage decreased (-0.01%) to 45.424%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions25 previously-covered lines in 8 files lost coverage.
Coverage Stats
💛 - Coveralls |
2 tasks
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.
Summary
Remove the stale example content from the root
examples/directory and leave anexamples/README.mdstub pointing readers topomerium/documentation/content/examples/. Most of these examples hadn't been maintained since 2020-2022 and either duplicated content already in the docs repo, referenced removed features such as forward-auth, used deprecated tooling, or depended on dev-tag images. The one example still worth preserving,mutual-tls/, was migrated in pomerium/documentation#2193, so this PR depends on that landing first.The PR also removes the remaining root
examples/references ingo.mod,.golangci.yml,.pre-commit-config.yaml, and theMakefilecover:target. Tag-pinned links (tree/v0.30.0/examples/...) keep working, and links tomain/examples/...land on the redirect stub instead of a hard 404.Related issues
Depends on pomerium/documentation#2193. PR is draft until that merges.
User Explanation
Code that used to live at
github.com/pomerium/pomerium/tree/main/examples/...now lives atgithub.com/pomerium/documentation/tree/main/content/examples/.... The redirect stub gives anyone landing on the old URL a pointer to the new home.Checklist
chore)AI assistance
Drafted and reviewed with Claude and codex; verified the diff and ran
make build,make test,make lint, andmake coverlocally.