Skip to content

Conversation

@dheerajturaga
Copy link
Member

The check-airflowctl-command-coverage pre-commit hook was not being
triggered when files in the airflow-ctl-tests/ directory were modified.
This meant that changes to integration tests could be committed without
verifying that all airflowctl CLI commands had test coverage.

Root cause:
The hook was only defined in airflow-ctl/.pre-commit-config.yaml with
file patterns attempting to match ../airflow-ctl-tests/ paths. However,
prek subproject configs cannot reference files in sibling directories
using relative paths - they can only match files within their own
directory tree.

  The check-airflowctl-command-coverage pre-commit hook was not being
  triggered when files in the airflow-ctl-tests/ directory were modified.
  This meant that changes to integration tests could be committed without
  verifying that all airflowctl CLI commands had test coverage.

  Root cause:
  The hook was only defined in airflow-ctl/.pre-commit-config.yaml with
  file patterns attempting to match ../airflow-ctl-tests/ paths. However,
  prek subproject configs cannot reference files in sibling directories
  using relative paths - they can only match files within their own
  directory tree.
Copy link
Contributor

@bugraoz93 bugraoz93 left a comment

Choose a reason for hiding this comment

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

Adding it to airflow-ctl-tests/...yaml makes a lot of sense! Thanks @dheerajturaga!

I still believe No reason to be in root hooks. So how about reverting the change on root and airflow-ctl/...yaml changes that and keeping the addition to airflow-ctl-tests/...yaml? What do you think?

Copy link
Contributor

@bugraoz93 bugraoz93 left a comment

Choose a reason for hiding this comment

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

Thanks for the update!

@dheerajturaga dheerajturaga merged commit 2a0497b into apache:main Jan 25, 2026
70 checks passed
@github-actions
Copy link

Backport failed to create: v3-1-test. View the failure log Run details

Status Branch Result
v3-1-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 2a0497b v3-1-test

This should apply the commit to the v3-1-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

suii2210 pushed a commit to suii2210/airflow that referenced this pull request Jan 26, 2026
…ts (apache#61023)

* Fix airflow-ctl-tests files not triggering pre-commit integration tests

  The check-airflowctl-command-coverage pre-commit hook was not being
  triggered when files in the airflow-ctl-tests/ directory were modified.
  This meant that changes to integration tests could be committed without
  verifying that all airflowctl CLI commands had test coverage.

  Root cause:
  The hook was only defined in airflow-ctl/.pre-commit-config.yaml with
  file patterns attempting to match ../airflow-ctl-tests/ paths. However,
  prek subproject configs cannot reference files in sibling directories
  using relative paths - they can only match files within their own
  directory tree.

* Bugra's suggestions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:airflow-ctl area:dev-tools backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants