deployment: add rules formatter makefile command to force literal style for rule summary and description - #1627
Open
jiekun wants to merge 7 commits into
Open
deployment: add rules formatter makefile command to force literal style for rule summary and description#1627jiekun wants to merge 7 commits into
jiekun wants to merge 7 commits into
Conversation
Member
Author
|
Hi I'd like to invite @AndrewChubatiuk to the 1st round review as you have extensive experience playing with the helm and template and probably |
…ill be removed with |-
…ill be removed with |-
jiekun
marked this pull request as ready for review
July 27, 2026 05:42
Contributor
There was a problem hiding this comment.
1 issue found across 5 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="deployment/docker/rules/Makefile">
<violation number="1" location="deployment/docker/rules/Makefile:7">
P2: `format-rules` can report success after a formatting failure in any non-final file because the loop does not propagate `yq`'s failure status. Propagating the error from each `yq` invocation would prevent partially formatted rules from being mistaken for a successful run.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| format-rules: | ||
| find $(RULES_DIR) -type f -name "*.yml" | while IFS= read -r f; do \ | ||
| echo "Processing $${f}"; \ | ||
| yq -i '.groups[].rules[].annotations.summary style="literal" | .groups[].rules[].annotations.description style="literal"' "$${f}"; \ |
Contributor
There was a problem hiding this comment.
P2: format-rules can report success after a formatting failure in any non-final file because the loop does not propagate yq's failure status. Propagating the error from each yq invocation would prevent partially formatted rules from being mistaken for a successful run.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At deployment/docker/rules/Makefile, line 7:
<comment>`format-rules` can report success after a formatting failure in any non-final file because the loop does not propagate `yq`'s failure status. Propagating the error from each `yq` invocation would prevent partially formatted rules from being mistaken for a successful run.</comment>
<file context>
@@ -0,0 +1,8 @@
+format-rules:
+ find $(RULES_DIR) -type f -name "*.yml" | while IFS= read -r f; do \
+ echo "Processing $${f}"; \
+ yq -i '.groups[].rules[].annotations.summary style="literal" | .groups[].rules[].annotations.description style="literal"' "$${f}"; \
+ done
</file context>
Suggested change
| yq -i '.groups[].rules[].annotations.summary style="literal" | .groups[].rules[].annotations.description style="literal"' "$${f}"; \ | |
| yq -i '.groups[].rules[].annotations.summary style="literal" | .groups[].rules[].annotations.description style="literal"' "$${f}" || exit 1; \ |
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.
add rules formatter makefile command to force literal style for rule summary and description