Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 29 additions & 10 deletions .github/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ RedHatInsights/ccx-notification-service:
dest: .github/workflows/linters.yaml
- source: workflows_examples/bots-auto-merge.yaml
dest: .github/workflows/bots-auto-merge.yaml
- source: workflows_examples/gotests.yaml
- source: workflows_examples/gotests.yaml.tmpl
dest: .github/workflows/gotests.yaml
Comment on lines +8 to 9
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot May 7, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find the workflow(s) that consume sync.yml and identify the sync action used
rg -n "repo-file-sync\|sync-action\|BetaHuhn\|sync\.yml" --type yaml -A3 -B3

# Also check for any custom scripts that might pre-process .tmpl files
fd -e sh -e py | xargs rg -l "tmpl\|nunjucks\|jinja" 2>/dev/null

Repository: RedHatInsights/processing-tools

Length of output: 59


🏁 Script executed:

# Find all GitHub Actions workflows
find .github/workflows -name "*.yml" -o -name "*.yaml" 2>/dev/null | head -20

Repository: RedHatInsights/processing-tools

Length of output: 457


🏁 Script executed:

# Search for any references to sync.yml or sync action in workflows
cat .github/workflows/*.yml .github/workflows/*.yaml 2>/dev/null | grep -E "sync|\.yml" -i -A2 -B2 | head -50

Repository: RedHatInsights/processing-tools

Length of output: 734


🏁 Script executed:

# Check if there's documentation about sync configuration
find . -name "README*" -o -name "*.md" | xargs grep -l "sync\|workflow" 2>/dev/null | head -10

Repository: RedHatInsights/processing-tools

Length of output: 185


🏁 Script executed:

# Read the sync.yml file to see all entries and their configuration
cat .github/sync.yml

Repository: RedHatInsights/processing-tools

Length of output: 7444


🏁 Script executed:

# Check the gotests.yaml.tmpl to see if it has template directives
cat workflows_examples/gotests.yaml.tmpl

Repository: RedHatInsights/processing-tools

Length of output: 443


🏁 Script executed:

# Check the workflows_examples README for context
cat workflows_examples/README.md

Repository: RedHatInsights/processing-tools

Length of output: 231


Add template: true to all 10 entries syncing gotests.yaml.tmpl.

The file workflows_examples/gotests.yaml.tmpl contains Jinja2 template directives ({% if coverage_threshold is defined %}, {{ coverage_threshold }}) that must be processed before deployment. The BetaHuhn/repo-file-sync-action requires an explicit template: true field to enable template rendering—the .tmpl file extension alone does not trigger processing.

Without template: true, the raw template syntax will be written verbatim to .github/workflows/gotests.yaml in all 10 target repositories, producing invalid YAML and breaking those GitHub Actions workflows.

Required fix: add template: true to each of these entries
- source: workflows_examples/gotests.yaml.tmpl
  dest: .github/workflows/gotests.yaml
+ template: true

Apply to all 10 affected repositories:

  • ccx-notification-service (line 8)
  • ccx-notification-writer (line 18)
  • content-service (line 48)
  • insights-operator-gathering-conditions-service (line 115)
  • insights-operator-utils (line 125)
  • insights-results-aggregator-cleaner (line 143)
  • insights-results-aggregator-exporter (line 156)
  • insights-results-aggregator-mock (line 166)
  • insights-results-smart-proxy (line 189)
  • parquet-factory (line 205)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- source: workflows_examples/gotests.yaml.tmpl
dest: .github/workflows/gotests.yaml
- source: workflows_examples/gotests.yaml.tmpl
dest: .github/workflows/gotests.yaml
template: true
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/sync.yml around lines 8 - 9, The sync entries that map "source:
workflows_examples/gotests.yaml.tmpl" to various "dest:
.github/workflows/gotests.yaml" are missing the required template rendering
flag; for each occurrence of that mapping add "template: true" alongside the
source/dest pair so the BetaHuhn/repo-file-sync-action will render the Jinja2
before writing; update all ten entries that reference
workflows_examples/gotests.yaml.tmpl (the ones listed in the review) to include
template: true.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

template:
coverage_threshold: 67

RedHatInsights/ccx-notification-writer:
- CODEOWNERS
Expand All @@ -15,8 +17,10 @@ RedHatInsights/ccx-notification-writer:
dest: .github/workflows/linters.yaml
- source: workflows_examples/bots-auto-merge.yaml
dest: .github/workflows/bots-auto-merge.yaml
- source: workflows_examples/gotests.yaml
- source: workflows_examples/gotests.yaml.tmpl
dest: .github/workflows/gotests.yaml
template:
coverage_threshold: 62

RedHatInsights/ccx-upgrades-data-eng:
- CODEOWNERS
Expand Down Expand Up @@ -45,8 +49,10 @@ RedHatInsights/content-service:
dest: .github/workflows/linters.yaml
- source: workflows_examples/bots-auto-merge.yaml
dest: .github/workflows/bots-auto-merge.yaml
- source: workflows_examples/gotests.yaml
- source: workflows_examples/gotests.yaml.tmpl
dest: .github/workflows/gotests.yaml
template:
coverage_threshold: 67

RedHatInsights/data-pipeline:
- CODEOWNERS
Expand Down Expand Up @@ -112,8 +118,10 @@ RedHatInsights/insights-operator-gathering-conditions-service:
dest: .github/workflows/linters.yaml
- source: workflows_examples/bots-auto-merge.yaml
dest: .github/workflows/bots-auto-merge.yaml
- source: workflows_examples/gotests.yaml
- source: workflows_examples/gotests.yaml.tmpl
dest: .github/workflows/gotests.yaml
template:
coverage_threshold: 85

RedHatInsights/insights-operator-utils:
- CODEOWNERS
Expand All @@ -122,8 +130,10 @@ RedHatInsights/insights-operator-utils:
dest: .github/workflows/linters.yaml
- source: workflows_examples/bots-auto-merge.yaml
dest: .github/workflows/bots-auto-merge.yaml
- source: workflows_examples/gotests.yaml
- source: workflows_examples/gotests.yaml.tmpl
dest: .github/workflows/gotests.yaml
template:
coverage_threshold: 69

RedHatInsights/insights-results-aggregator:
- CODEOWNERS
Expand All @@ -140,8 +150,10 @@ RedHatInsights/insights-results-aggregator-cleaner:
dest: .github/workflows/linters.yaml
- source: workflows_examples/bots-auto-merge.yaml
dest: .github/workflows/bots-auto-merge.yaml
- source: workflows_examples/gotests.yaml
- source: workflows_examples/gotests.yaml.tmpl
dest: .github/workflows/gotests.yaml
template:
coverage_threshold: 84

# RedHatInsights/insights-results-aggregator-data:
# - CODEOWNERS
Expand All @@ -153,8 +165,10 @@ RedHatInsights/insights-results-aggregator-exporter:
dest: .github/workflows/linters.yaml
- source: workflows_examples/bots-auto-merge.yaml
dest: .github/workflows/bots-auto-merge.yaml
- source: workflows_examples/gotests.yaml
- source: workflows_examples/gotests.yaml.tmpl
dest: .github/workflows/gotests.yaml
template:
coverage_threshold: 59

RedHatInsights/insights-results-aggregator-mock:
- CODEOWNERS
Expand All @@ -163,8 +177,9 @@ RedHatInsights/insights-results-aggregator-mock:
dest: .github/workflows/linters.yaml
- source: workflows_examples/bots-auto-merge.yaml
dest: .github/workflows/bots-auto-merge.yaml
- source: workflows_examples/gotests.yaml
- source: workflows_examples/gotests.yaml.tmpl
dest: .github/workflows/gotests.yaml
template: {}

RedHatInsights/insights-results-aggregator-utils:
- CODEOWNERS
Expand All @@ -186,8 +201,10 @@ RedHatInsights/insights-results-smart-proxy:
dest: .github/workflows/linters.yaml
- source: workflows_examples/bots-auto-merge.yaml
dest: .github/workflows/bots-auto-merge.yaml
- source: workflows_examples/gotests.yaml
- source: workflows_examples/gotests.yaml.tmpl
dest: .github/workflows/gotests.yaml
template:
coverage_threshold: 72

RedHatInsights/obsint-mocks:
- CODEOWNERS
Expand All @@ -202,8 +219,10 @@ RedHatInsights/parquet-factory:
- renovate.json
- source: workflows_examples/bots-auto-merge.yaml
dest: .github/workflows/bots-auto-merge.yaml
- source: workflows_examples/gotests.yaml
- source: workflows_examples/gotests.yaml.tmpl
dest: .github/workflows/gotests.yaml
template:
coverage_threshold: 72

RedHatInsights/insights-behavioral-spec:
- CODEOWNERS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ on:
jobs:
gotests:
uses: RedHatInsights/processing-tools/.github/workflows/gotests.yaml@v0.4.3
{% if coverage_threshold is defined %}
with:
coverage_threshold: {{ coverage_threshold }}
{% endif %}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODECOV_TOKEN: {% raw %}${{ secrets.CODECOV_TOKEN }}{% endraw %}
Loading