Skip to content

Run UI compile checks in CI when only an OpenAPI spec changes - #70643

Merged
pierrejeambrun merged 1 commit into
apache:mainfrom
shahar1:fix-selective-checks-ui-openapi
Jul 29, 2026
Merged

Run UI compile checks in CI when only an OpenAPI spec changes#70643
pierrejeambrun merged 1 commit into
apache:mainfrom
shahar1:fix-selective-checks-ui-openapi

Conversation

@shahar1

@shahar1 shahar1 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

#68919 changed _private_ui.yaml without regenerating the UI TypeScript client and CI stayed green: selective checks decide whether to skip the ts-compile-lint-* hooks from file groups that did not cover the UI codegen input specs, while the hooks' own files: triggers match any yaml under the openapi directories. The stale committed client then masked a type error that broke main for every PR running full static checks (fixed by #70637). The same gap applied to v2-simple-auth-manager-generated.yaml: a spec-only change also skipped the simple auth manager UI hook.

This tracks the codegen-input specs in their own UI_OPENAPI_FILES group, used only in the hook-skip rule — deliberately not in API_CODEGEN_FILES, which would force the full test matrix for every UI-endpoint change. It also removes the ts-compile-lint-ui trigger for the simple auth manager spec: that pattern was copied in when the hook was created (#51725), a month after the spec was renamed v1→v2 (#50705), so it has never matched a file — #53636 fixed the sibling hook's copy but missed this one — and the main UI codegen does not consume that spec (ui/openapi-merge.json).

Verified: replaying #68919's exact file list now runs both hooks with full-tests-needed=false; differential SelectiveChecks runs across 50+ file-set/event/branch scenarios show the only changed output anywhere is skip-prek-hooks, and only for the spec files. The regression test pins each group pattern individually (mutation-tested), plus a targeted not in assertion that survives mechanical refreshes of the skip-list constants.

related: #68919

Note

Land #70637 first: this PR itself triggers full static checks (dev/breeze is in ENVIRONMENT_FILES), which run the UI hook against the currently stale client on main.

Review notes (three independent review rounds; remaining items are cosmetic, taken or left at maintainer discretion): the doc parenthetical "a generated spec still does" could name the REST API spec explicitly; "superset of the first hook's triggers" in the group comment could carry an extra "openapi" qualifier; a prek hook asserting the hook triggers stay ⊆ UI_FILES ∪ UI_OPENAPI_FILES would guard this drift class permanently and is left as a possible follow-up.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Fable 5)

Generated-by: Claude Code (Fable 5) following the guidelines

@shahar1

shahar1 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

CC: @seanghaeli

apache#68919 changed _private_ui.yaml without regenerating the TypeScript client
and CI stayed green: selective checks decide whether to skip the
ts-compile-lint-* hooks from file groups that do not cover the UI codegen
input specs, while the hooks themselves trigger on any yaml under the
openapi directories. The stale client then masked a type error that broke
main for every PR running full static checks. The same gap applied to
v2-simple-auth-manager-generated.yaml, so a spec-only change also skipped
the simple auth manager UI hook. Track the codegen-input specs in their own
file group so spec-only changes run the UI hooks without forcing the full
test matrix, and drop the main UI hook trigger for the simple auth manager
spec: that pattern was copied in when the hook was created (apache#51725), a
month after the spec was renamed v1 to v2 (apache#50705), so it has never matched
a file - apache#53636 fixed the sibling hook's copy but missed this one. The main
UI codegen does not consume that spec either.
@shahar1
shahar1 force-pushed the fix-selective-checks-ui-openapi branch from 2791035 to d86ee7f Compare July 29, 2026 05:40

@pierrejeambrun pierrejeambrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for fixing it

@pierrejeambrun pierrejeambrun added this to the Airflow 3.3.1 milestone Jul 29, 2026
@pierrejeambrun
pierrejeambrun merged commit b43a87e into apache:main Jul 29, 2026
155 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-3-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-3-test PR Link

@shahar1
shahar1 deleted the fix-selective-checks-ui-openapi branch July 29, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants