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
7 changes: 5 additions & 2 deletions .github/workflows/feed-refresh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ permissions:
jobs:
refresh:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
Expand Down Expand Up @@ -230,17 +231,19 @@ jobs:
fi

- name: Report feed refresh failure
if: failure()
if: failure() || cancelled()
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JOB_STATUS: ${{ job.status }}
RUN_EVENT: ${{ github.event_name }}
RUN_SHA: ${{ github.sha }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
title="Feed refresh automation failed"
body=$(printf '%s\n\n%s\n%s\n%s\n\n%s' \
body=$(printf '%s\n\n%s\n%s\n%s\n%s\n\n%s' \
"The feed freshness check failed. The committed feeds may now be stale." \
"Run: $RUN_URL" \
"Job status: $JOB_STATUS" \
"Event: $RUN_EVENT" \
"Commit: $RUN_SHA" \
"Inspect the failed step, repair the parser or workflow, then rerun feed-refresh from main.")
Expand Down
3 changes: 2 additions & 1 deletion refresh/test/run.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3112,7 +3112,8 @@ assert(refreshWorkflow.match(/--distributor aws-bedrock,vertex-ai,azure-ai-found
assert(refreshWorkflow.split('MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}').length === 3, 'workflow passes the Mistral credential to both check and regeneration')
assert(refreshWorkflow.split('COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}').length === 3 && refreshWorkflow.includes(' / COHERE_API_KEY enable'), 'workflow documents the Cohere credential and passes it to both check and regeneration')
assert(refreshWorkflow.includes('--distributor aws-bedrock,vertex-ai'), 'workflow refreshes every implemented distributor')
assert(refreshWorkflow.includes('issues: write') && refreshWorkflow.includes('if: failure()') && refreshWorkflow.includes('Feed refresh automation failed'), 'workflow gives failed refreshes a durable issue')
assert(refreshWorkflow.includes('issues: write') && refreshWorkflow.includes('if: failure() || cancelled()') && refreshWorkflow.includes('Feed refresh automation failed'), 'workflow gives failed or cancelled refreshes a durable issue')
assert(/^ timeout-minutes: \d+$/m.test(refreshWorkflow), 'workflow bounds the refresh job so a stuck run is cancelled and reported')
assert(refreshWorkflow.includes('gh issue comment "$issue" --body "$body"') && refreshWorkflow.includes('gh issue create --title "$title"'), 'workflow updates one failure issue instead of silently repeating failures')
assert(refreshWorkflow.includes('Resolve prior feed refresh failure') && refreshWorkflow.includes('gh issue close "$issue" --reason completed'), 'a successful refresh resolves the prior failure issue')
assert(refreshWorkflow.includes('$GITHUB_STEP_SUMMARY') && refreshWorkflow.includes('no material feed changes were found') && refreshWorkflow.includes('feed-generated date is intentionally unchanged'), 'a successful no-change refresh records an honest result without changing feed freshness')
Expand Down
Loading