Skip to content

Add filter for observability environment output#4736

Open
backspace wants to merge 1 commit intomainfrom
grafana-config-environment-filter
Open

Add filter for observability environment output#4736
backspace wants to merge 1 commit intomainfrom
grafana-config-environment-filter

Conversation

@backspace
Copy link
Copy Markdown
Contributor

When I’ve been trying to review observability PRs I’ve been repeatedly confused by these errors:

CleanShot 2026-05-08 at 17 49 03@2x

Today I realised that --env local is being ignored. This is Claude’s suggestion about how to fix that, I can confirm it works for me locally, but I can’t vouch for its sensibility:

CleanShot 2026-05-08 at 17 49 45@2x

@backspace backspace requested a review from lukemelia May 8, 2026 22:50
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Observability diff (vs staging)

No dashboard / folder changes detected against the staging Grafana.

(Run: https://github.com/cardstack/boxel/actions/runs/25583379584)

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d47e41cf7d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


# Catch typos early; otherwise the rendered file would have an empty `contexts:`
# mapping and grafanactl would emit a confusing error.
if ! grep -qE "^ ${target_env}:[[:space:]]*\$" "$src"; then
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Escape env name before regex existence check

The new typo guard uses grep -E with unescaped user input, so any regex metacharacters in target_env can produce false positives. For example, ./scripts/render-config.sh 'prod.*' currently passes this check, emits an empty contexts: block, and only fails later with a less actionable context/config error, which defeats the stated goal of catching bad env names early. Treat target_env as a literal string (or avoid regex matching) so invalid names are always rejected at this step.

Useful? React with 👍 / 👎.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Host Test Results

    1 files      1 suites   1h 47m 2s ⏱️
2 643 tests 2 628 ✅ 15 💤 0 ❌
2 662 runs  2 647 ✅ 15 💤 0 ❌

Results for commit d47e41c.

Realm Server Test Results

    1 files      1 suites   17m 18s ⏱️
1 297 tests 1 297 ✅ 0 💤 0 ❌
1 376 runs  1 376 ✅ 0 💤 0 ❌

Results for commit d47e41c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant