Skip to content

devops: extend app-token fix to cicd.yml + cron.yml#117

Open
rsharath wants to merge 1 commit into
mainfrom
devops/fix-cicd-cron-workflows
Open

devops: extend app-token fix to cicd.yml + cron.yml#117
rsharath wants to merge 1 commit into
mainfrom
devops/fix-cicd-cron-workflows

Conversation

@rsharath

Copy link
Copy Markdown
Contributor

What

Two workflow files I overlooked in PR #115 / #116 have the SAME actions/create-github-app-token@v3 bugs we already fixed in release.yml:

File Trigger Was failing?
.github/workflows/cicd.yml Every push to main Yes — every merge to main since #113
.github/workflows/cron.yml Weekly schedule + workflow_dispatch Would fail Friday 2:30 AM UTC

Both had:

client-id: ${{ secrets.HIGHFLAME_GITHUB_APP_ID }}   # wrong field — secret is numeric App ID
repositories: |
  - ${{ github.repository }}                        # `-` prefix + owner/repo form
  - ${{ env.DEVOPS_REPO }}

Failed with: Repository '- highflame-ai/ramparts' includes owner '- highflame-ai', which does not match the resolved owner 'highflame-ai'.

Fix

Same pattern release.yml already uses:

app-id: ${{ secrets.HIGHFLAME_GITHUB_APP_ID }}      # deprecated alias OK
repositories: |
  ${{ github.event.repository.name }}               # bare name
  ${{ env.DEVOPS_REPO }}                            # already bare

How I missed this earlier

Every prior review (PRs #113 / #115 / #116, three sub-agent code reviews) scoped to release.yml + release-plz.yml and didn't grep the rest of .github/workflows/ for the same actions/create-github-app-token@v3 pattern. Sub-agent review on #115 was explicitly scoped to release.yml only.

Lesson learned: when a bug is found in one workflow file, grep all workflows for the same uses: action + config pattern. Future workflow audits will start with grep -rn 'actions/create-github-app-token' .github/workflows/ and check each block.

Pre-flight dry-run before pushing

  • YAML parse for all 6 workflows ✅
  • grep across workflows: NO remaining - ${{ github.repository }} and NO remaining client-id: for any create-github-app-token block

This is the same pre-flight checklist I should have run BEFORE pushing #115 (then I would have found these two files immediately by searching for the same pattern).

Test plan

  • CI green on the PR
  • After merge, confirm the next push to main runs cicd.yml successfully (the highflame-trigger job hits the downstream workflow without the app-token error)
  • Spot-check the next cron run (or trigger manually via workflow_dispatch)

PR #115 fixed the `actions/create-github-app-token@v3` config in
release.yml. PR #116's release-pipeline overhaul kept that fix
clean. But TWO other workflows that use the same action had the
identical bugs and were left untouched in both PRs:

  .github/workflows/cicd.yml   — runs on every push to main
  .github/workflows/cron.yml   — runs weekly (and on workflow_dispatch)

Both had:

  client-id: ${{ secrets.HIGHFLAME_GITHUB_APP_ID }}   # wrong field
  repositories: |
    - ${{ github.repository }}                        # `-` prefix + owner/repo form
    - ${{ env.DEVOPS_REPO }}

cicd.yml has been failing on every push to main since #113 landed
(it triggered on push, the trigger step died at the app-token,
the deploy-trigger never fired downstream). The cron version
would fail the next time it runs (Friday at 2:30 AM UTC).

Applied the same fix pattern used in release.yml:

  app-id: ${{ secrets.HIGHFLAME_GITHUB_APP_ID }}      # deprecated alias OK; secret is numeric App ID
  repositories: |
    ${{ github.event.repository.name }}               # bare name
    ${{ env.DEVOPS_REPO }}                            # already bare

Pre-flight dry-run before pushing this time:
  - cargo fmt --check                                ✅
  - cargo clippy --all-features --all-targets -- -D warnings -D unused  ✅
    (no Rust changes, expected clean — verified anyway)
  - YAML parse for all 6 workflows                   ✅
  - grep across all workflows: NO remaining `- ${{ github.repository }}`
    or `client-id:` for the create-github-app-token action

How I missed this on the earlier passes: every previous review
focused on release.yml + release-plz.yml and didn't grep the rest
of `.github/workflows/` for the same `actions/create-github-app-token@v3`
pattern. Sub-agent review on PR #115 was scoped to release.yml
only. Lesson: when a bug is found in one workflow file, grep all
workflows for the same action and config pattern. Won't repeat.
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

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