fix(ci): correct GitHub Actions versions and increase quality job timeout#201
Conversation
…flows Substitui actions/checkout@v6→@v4, setup-node@v6→@v4, upload-artifact@v7→@v4 e denoland/setup-deno@v2→@v1 (com deno-version: v2.x) que impediam todos os jobs de CI de executar. Arquivos afetados: ci.yml, e2e.yml, branch-protection-sentinel.yml, codeql.yml, security.yml, deploy-edge-functions.yml. https://claude.ai/code/session_01WcZw7BgEJPoKKTsfrQaMfh
The tsc + vitest suite consistently exceeds the 45-minute limit, causing the Lint, Typecheck & Test job to be cancelled on every PR. 75 minutes gives sufficient headroom for both steps to complete. https://claude.ai/code/session_01WcZw7BgEJPoKKTsfrQaMfh
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
WalkthroughPR padroniza versões de ações do GitHub (checkout, setup-node, upload-artifact) em seis workflows, ajusta timeouts e versão do Deno, e melhora tratamento de erros em migração SQL que remove features de gamificação. ChangesManutenção e Padronização
🎯 2 (Simple) | ⏱️ ~8 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
…cation The migration did a bare DELETE FROM feature_flags and system_settings without checking whether those tables exist, causing MIGRATIONS_FAILED on every Supabase Preview branch that runs migrations from scratch. Wraps both DELETEs in DO $$ BEGIN ... EXCEPTION WHEN undefined_table END $$. https://claude.ai/code/session_01WcZw7BgEJPoKKTsfrQaMfh
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 03b9aeea48
ℹ️ 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".
| - name: Upload E2E Report | ||
| if: always() | ||
| uses: actions/upload-artifact@v7 | ||
| uses: actions/upload-artifact@v4 |
There was a problem hiding this comment.
Make artifact uploads rerun-safe
When this job fails in Run Critical E2E, the if: always() artifact step still creates playwright-report; rerunning failed jobs then tries to upload the same artifact name in the same workflow run, and upload-artifact@v4 rejects duplicate artifact names unless overwrite: true is set or the name is made unique (the v4 README documents that same-named uploads now fail: https://github.com/actions/upload-artifact/tree/v4#not-uploading-to-the-same-artifact). This can make a rerun stay red even after the tests pass; the same pattern exists in the E2E workflow's static artifact names.
Useful? React with 👍 / 👎.
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: actions/checkout@v4 |
There was a problem hiding this comment.
Keep checkout credentials out of the worktree
This workflow runs on pull_request and then executes repository-controlled scripts, but downgrading to checkout@v4 restores the default behavior of persisting the Actions token in local git config; GitHub's checkout v6 README says v6 stores credentials under $RUNNER_TEMP instead of .git/config, while v4 documents that the auth token is persisted in local git config. A PR that changes an early script such as scripts/smoke-tests.mjs or an npm lifecycle/test script can read that config before post-job cleanup, so use checkout@v6 on ubuntu-latest or set persist-credentials: false where authenticated git is not needed.
Useful? React with 👍 / 👎.
| WHERE flag_name = 'enable_gamification'; | ||
| DO $$ BEGIN | ||
| DELETE FROM public.feature_flags WHERE flag_name = 'enable_gamification'; | ||
| EXCEPTION WHEN undefined_table THEN NULL; |
There was a problem hiding this comment.
Fix the next fresh-migration failure too
For a fresh preview database where feature_flags has not been created yet, swallowing undefined_table here only moves the failure to the next migration: 20250103_02_rls_organizations.sql still unconditionally runs ALTER TABLE public.feature_flags/public.system_settings at lines 104-105, while those tables are created later in 20250103_complete_schema.sql at lines 849 and 861. This means the stated preview/fresh-DB migration fix still aborts immediately after this file unless the later RLS migration is guarded or reordered as well.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
This PR restores CI workflow execution by replacing invalid GitHub Actions versions with valid major versions, increases the main quality job timeout, and attempts to harden a legacy gamification-removal migration.
Changes:
- Replaces invalid workflow action tags with supported versions.
- Raises the
qualityCI job timeout from 45 to 75 minutes. - Wraps gamification cleanup deletes in migration exception blocks for missing tables.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/ci.yml |
Updates action versions and quality job timeout. |
.github/workflows/e2e.yml |
Updates checkout/setup-node/upload-artifact action versions. |
.github/workflows/security.yml |
Updates checkout action version. |
.github/workflows/deploy-edge-functions.yml |
Updates checkout action versions. |
.github/workflows/codeql.yml |
Updates checkout action version. |
.github/workflows/branch-protection-sentinel.yml |
Updates checkout action version. |
supabase/migrations/20250103_01_remove_gamification.sql |
Adds guards around cleanup deletes for missing tables. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| DO $$ BEGIN | ||
| DELETE FROM public.feature_flags WHERE flag_name = 'enable_gamification'; | ||
| EXCEPTION WHEN undefined_table THEN NULL; | ||
| END $$; |
| DO $$ BEGIN | ||
| DELETE FROM public.system_settings | ||
| WHERE setting_key IN ( | ||
| 'points_per_sale', | ||
| 'points_per_quote', | ||
| 'points_per_mockup' | ||
| ); | ||
| EXCEPTION WHEN undefined_table THEN NULL; |
Summary
@v6,@v7,setup-deno@v2) across 6 workflow files — these caused CI to be completely silent on every PR (zero jobs ran)qualityjob timeout from 45 → 75 minutes:tsc+vitest runcombined consistently exceeded the 45-minute limit, cancelling the job on every runAffected files
.github/workflows/ci.yml.github/workflows/e2e.yml.github/workflows/branch-protection-sentinel.yml.github/workflows/codeql.yml.github/workflows/security.yml.github/workflows/deploy-edge-functions.ymlTest plan
Lint, Typecheck & Testcompletes within 75 minutes without being cancelledhttps://claude.ai/code/session_01WcZw7BgEJPoKKTsfrQaMfh
Generated by Claude Code
Summary by cubic
Fixes CI by correcting action versions and raising the quality job timeout. Also hardens a migration to stop preview-branch failures.
actions/checkout@v6→@v4,actions/setup-node@v6→@v4,actions/upload-artifact@v7→@v4,denoland/setup-deno@v2→@v1(Deno v2.x).qualitytimeout 45→75 min to accommodatetsc+vitest run.20250103_01_remove_gamification.sqlwhenfeature_flagsorsystem_settingsdon’t exist, preventing fresh DB/preview migration failures.Written for commit 03b9aee. Summary will update on new commits.
Summary by CodeRabbit
Notas de Lançamento