Repository navigation
docs: fix TES backend examples - #263
Merged
Merged
Conversation
The chart's values and README still listed TES backends as strings, which the config model rejects since #251, and the examples of the chart and of docs/configuration.md used the default auth (client_credentials) without the identity provider it needs. List backends as objects (url) and set client_credentials.issuer. Add a test that the documented examples with TES backends (YAML blocks of the READMEs and docs, and the commented config example of the chart's values), merged into the base config, validate against the config model. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Address review: fail if a source of examples drops out of the collection, compare the parsed backend URLs, and read the base config as UTF-8. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideThe PR updates all affected TES backend examples to the current structured configuration, including the required identity-provider settings for client-credentials authentication, and adds tests that collect, merge, and validate documentation examples against the application config model while guarding against collection gaps. Flow diagram for validating documented TES configuration examplesflowchart LR
Docs[Documentation YAML examples] --> Collect[Collect service_list examples]
Values[Chart values config example] --> Collect
Collect --> Merge[deep_merge with base config]
Merge --> Validate[Validate against CustomConfig]
Validate --> Assert[Assert expected backend URLs]
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
uniqueg
marked this pull request as ready for review
October 23, 2026 18:40
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #263 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 27 27
Lines 1849 1849
=========================================
Hits 1849 1849 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="tests/test_config_examples.py" line_range="26" />
<code_context>
+ *sorted((ROOT / "docs").glob("*.md")),
+]
+# YAML code blocks of Markdown files
+YAML_BLOCK = re.compile(r"^```yaml\n(.*?)^```", re.DOTALL | re.MULTILINE)
+# Sources that must contribute examples (collection by heuristics must not
+# silently miss them)
</code_context>
<issue_to_address>
**Some TES examples escape validation**
When a Markdown file uses a valid alternate YAML fence such as ` ```yaml title=example ` for a TES example and also has another collected example, `YAML_BLOCK` ignores valid YAML fences with an info string beyond the exact bare `yaml` form, so those TES configurations are never parsed or validated. `test_examples_collected` can still pass when that file has another collected example.
Recognize supported YAML fence info strings when collecting blocks, and assert that every YAML block containing `service_list:` is collected.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: tests/test_config_examples.py:26
Address review: also collect yml blocks and blocks whose fence has further info (e.g., a title), so no example escapes validation. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
Finishes #229: #251 removed the default TES backends; the chart's examples still listed backends in the old string form (
- "https://tes.example.org"), which the config model rejects since then.deployment/values.yaml(commentedconfigexample) anddeployment/README.md(values example): backends as objects (- url: ...), withclient_credentials.issuer, which the defaultauth: client_credentialsneeds (the config model rejects backends with that auth and no identity provider).docs/configuration.md: the TES instances example lacked the identity provider for the same reason; added it.tests/test_config_examples.py: every YAML block withservice_listinREADME.md,deployment/README.mdanddocs/*.md, and the commentedconfigexample of the chart's values, merged into the base config (deep_mergeof FOCA, as the app does), validates againstCustomConfig, with the listed backend URLs. The old examples fail it (3 of 4). A second test fails if one of the expected sources (deployment/README.md,deployment/values.yaml,docs/access-control.md,docs/configuration.md) drops out of the collection.No other old-form examples left (grepped docs, config files, Compose, test fixtures).
Review: quality review only (docs plus a small test with parsing logic; no app or chart template change). It found three lows (weak final assert, missing UTF-8 encoding, silent drop-out of examples); all fixed. Sourcery: YAML fences with info strings (
yml,yaml title=...) escaped collection; fixed.Verification
pytest: 664 passed, 76 skipped (Helm tests skipped: nohelmlocally; the chart change is in comments and the README only).origin/dev(README, configuration.md, values.yaml examples), passes on the branch.pre-commit runon the changed files (ruff, mypy, semgrep, ast-grep, ...): passed.mkdocs build --strict: passed.Declined review findings
None.
Open questions
None.
Closes #229
🤖 Generated with Claude Code