ci: scope generation validation to generation-affecting files only#173
Conversation
Skip validate + zero-diff jobs for dependency-only PRs (mypy, pylint, etc.) since dev dependency updates cannot affect Speakeasy-generated code. Generation-affecting paths: .speakeasy/**, gen.yaml, overlays/**, scripts/**, poe_tasks.toml, src/**, .genignore, .github/speakeasy/**, and the generation workflow itself. Co-Authored-By: AJ Steers <aj@airbyte.io>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
README.md is an input to prepare_readme.py which produces the tracked README-PYPI.md, so changes to it can cause generation drift. Co-Authored-By: AJ Steers <aj@airbyte.io>
There was a problem hiding this comment.
Pull request overview
This PR adjusts the Test (Full) GitHub Actions workflow to avoid running Speakeasy generation validation on PRs that only touch non-generation-related files (notably Dependabot dev dependency bumps), reducing failures when SPEAKEASY_API_KEY is unavailable.
Changes:
- Scoped the
dorny/paths-filter“generation” filter from “almost everything” to a curated set of generation-related paths. - Added explanatory comments documenting why path filtering is done at the job level and why dependency-only PRs should skip generation validation.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # The path filter is scoped to generation-affecting files only (Speakeasy config, | ||
| # gen.yaml, overlays, scripts, src/, etc.). Dev dependency updates (mypy, pylint, | ||
| # etc.) skip the generation validation since they cannot affect generated code. |
There was a problem hiding this comment.
☑️ Resolved in c4a2572. Reworded the comment to explain both reasons: dev deps don't change generated artifacts, and Dependabot PRs lack SPEAKEASY_API_KEY.
Co-Authored-By: AJ Steers <aj@airbyte.io>
…s as skipped The validate job in test-full.yml now always calls generate-command.yml (no if: condition). The Generate SDK job inside generate-command.yml checks the new should_run input and skips itself internally. This ensures the job name appears in CI as 'skipped' rather than never being created, which satisfies required check merge requirements. Co-Authored-By: AJ Steers <aj@airbyte.io>
| - 'README.md' | ||
| - 'scripts/**' | ||
| - 'poe_tasks.toml' | ||
| - 'src/**' |
There was a problem hiding this comment.
I think it's better to move this into the generate workflow. It's no longer needed here and it is needed there. Rather than calculate here and pass the Boolean, just calculate it there.
There was a problem hiding this comment.
☑️ Resolved in 38c2f1c. Moved the path filter entirely into generate-command.yml:
- New
check-pathsjob insidegenerate-command.ymlruns only duringdry_runmode Generate SDKjob:if: always() && (!inputs.dry_run || needs.check-paths.outputs.should_run == 'true')test-full.ymlsimplified — no morecheck-pathsjob orshould_runinput, just callsgenerate-command.ymldirectly
The generation workflow now owns its path filtering logic: - New check-paths job runs only during dry_run mode - Generate SDK job skips if dry_run and no generation-affecting files changed - test-full.yml simplified to just call generate-command.yml + zero-diff This ensures the Generate SDK job name always appears in CI (as skipped or passed), satisfying required check merge requirements. Co-Authored-By: AJ Steers <aj@airbyte.io>
Summary
Fixes generation validation failures on Dependabot dependency PRs (e.g. #170 mypy bump) where
SPEAKEASY_API_KEYis unavailable and the generation check is unnecessary.Two changes:
Path filter narrowed —
check-pathsintest-full.ymlnow matches only generation-affecting files (.speakeasy/**,gen.yaml,overlays/**,src/**,scripts/**,README.md, etc.) instead of'**' - README - docs/. Dev-only dependency bumps (pyproject.toml/uv.lock) no longer trigger generation validation.Skip condition moved into
generate-command.yml— newshould_runboolean input (defaulttrue) onworkflow_call. TheGenerate SDKjob checksif: ${{ inputs.should_run != false }}and skips internally, so it reports as "skipped" in CI rather than never appearing — satisfying required check merge requirements.test-full.yml'svalidatejob always calls the inner workflow (noif:on the caller).Link to Devin session: https://app.devin.ai/sessions/854c664803f3400387fdaa02e123b888
Requested by: Aaron ("AJ") Steers (@aaronsteers)