fix(tests): accept quoted url values in url_present_in_outputs_yaml#241
Merged
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the url_present_in_outputs_yaml helper function in tests/helpers.py to support matching URLs enclosed in optional single or double quotes. This adjustment prevents false negatives when validating YAML configurations where URLs are quoted, such as those produced by Cribl Stream configmap templates. I have no feedback to provide as there were no review comments.
2 tasks
JacobPEvans-personal
added a commit
that referenced
this pull request
May 24, 2026
The ignorePatterns entry pointed at `kubernetes-monitoring` — the repo's previous name before c21d9ca renamed it to `orbstack-kubernetes`. The pattern hasn't matched any actual self-references since that rename, which means every github.com self-ref in CHANGELOG.md (release-please compare links), docs, and READMEs has been getting hit by markdown-link-check and randomly failing pre-commit with transient GitHub 502s. PRs #234, #237, #240, #241 have all hit this flake in the last 24 hours. Fix: update the pattern to the current repo name. Self-references are safe to skip because the CHANGELOG compare links and issue links are machine-generated by release-please and can't have typos; cross-repo links are still validated. Assisted-by: Claude <noreply@anthropic.com>
JacobPEvans-personal
added a commit
that referenced
this pull request
May 24, 2026
…242) The ignorePatterns entry pointed at `kubernetes-monitoring` — the repo's previous name before c21d9ca renamed it to `orbstack-kubernetes`. The pattern hasn't matched any actual self-references since that rename, which means every github.com self-ref in CHANGELOG.md (release-please compare links), docs, and READMEs has been getting hit by markdown-link-check and randomly failing pre-commit with transient GitHub 502s. PRs #234, #237, #240, #241 have all hit this flake in the last 24 hours. Fix: update the pattern to the current repo name. Self-references are safe to skip because the CHANGELOG compare links and issue links are machine-generated by release-please and can't have typos; cross-repo links are still validated. Assisted-by: Claude <noreply@anthropic.com>
87f83ea to
329b918
Compare
The configmap template for Cribl Stream wraps the HEC URL in double
quotes (k8s/monitoring/cribl-stream-standalone/configmap-cribl-config.yaml
line 12), so after sed substitution the deployed outputs.yml renders as:
url: "https://10.0.1.200:8088/services/collector"
The helper's regex required strictly unquoted values, giving a false
negative on every run and failing test_splunk_hec_url_matches_secret.
This has blocked PR #234 and #237 on E2E for two days.
Fix: allow an optional matching pair of single or double quotes around
the URL value. Tested against six representative cases (double-quoted,
single-quoted, unquoted, mismatched-quote, unsubstituted placeholder,
different URL) — all behave correctly.
Assisted-by: Claude <noreply@anthropic.com>
329b918 to
075dddc
Compare
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
The configmap template for Cribl Stream wraps the HEC URL in double quotes (`k8s/monitoring/cribl-stream-standalone/configmap-cribl-config.yaml:12`), so after `sed` substitution the deployed `outputs.yml` renders as:
```yaml
url: "https://10.0.1.200:8088/services/collector"
```
But the test helper's regex (`tests/helpers.py:151`) required strictly unquoted values:
```python
re.search(rf"^\surl:\s{re.escape(url)}\s*$", yaml_text, re.MULTILINE)
```
Result: false negative on every run. `test_splunk_hec_url_matches_secret` has failed continuously since this template/test pair was introduced, blocking the E2E gate on PRs #234 and #237.
Fix
Allow an optional matching pair of single or double quotes around the URL value:
```python
re.search(rf"""^\surl:\s(['"]?){re.escape(url)}\1\s*$""", yaml_text, re.MULTILINE)
```
The `\1` back-reference forces matching pairs only — `url: "..."` matches, `url: '...'` matches, `url: ...` matches, but `url: "...` (mismatched) does not.
Test plan
Assisted-by: Claude noreply@anthropic.com