Skip to content

Conversation

@steveahnahn
Copy link
Contributor

Problem

Adds integration tests for airflowctl CLI commands. Currently, only 16 of 48 commands are tested.

Solution

Added 31 new command tests (now 47 total):

  • Config: +2 (list, lint)
  • Connections: +6 (get, update, test, import, delete x2)
  • Dags: +4 (get, pause, unpause, update)
  • Dag Runs: +2 (get, delete)
  • Pools: +7 (get, update, import, export, delete x2)
  • Variables: +10 (get, update, import, export, delete x3)

Added 3 JSON fixture files for import command testing (connections, pools, variables).

Commands not included

  1. inter-command dependencies: Commands like backfill get/pause/unpause and assets get-queued-events need IDs from prior create operations
  2. destructive operations: dags delete
  3. state requirements: Asset queue commands require Dags with asset dependencies to be in specific states

Related Issues

@bugraoz93 bugraoz93 added the full tests needed We need to run full set of tests for this PR to merge label Nov 26, 2025
@bugraoz93 bugraoz93 closed this Nov 26, 2025
@bugraoz93 bugraoz93 reopened this Nov 26, 2025
@bugraoz93
Copy link
Contributor

Closed and open to trigger full test to run airflowctl integration tests

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.

Looks good! Thanks for the PR. Let's see the CI before merge. Have you run the test with breeze locally?

@steveahnahn
Copy link
Contributor Author

Good call, I took another look with testing with breeze locally and it seems a lot of them were false positives. The test only checks for specific error strings, so many of the pre-existing tests were found to be using the wrong flags and were silently failing. New commit fixed the wrong CLI flags and positional args, some syntax bugs and ended up disabling a connection test that requires server configs.

Current state now passes correctly. A needed followup is to improve the test_airflowctl_commands.py file now that we're maintaining these airflowctl tests with the upcoming pre-commit pr.

@potiuk potiuk force-pushed the add-cli-cmds-to-integration-tests branch from 59276dd to 9374383 Compare November 28, 2025 01:53
@potiuk potiuk removed the full tests needed We need to run full set of tests for this PR to merge label Nov 28, 2025
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 Steve! Looks great!

@bugraoz93
Copy link
Contributor

Yes, a hook will make things more complete and in syntax.

Exactly we are checking specific errors that states when API returns error which checks if we are doing wrong calls on integration level with endpoints whcih all aising the same error. Additionally we are checking if command is wrong is a way that not with the correct parameters means help text apperas to warn. Maybe we need to add one or more case for false positives

@bugraoz93 bugraoz93 force-pushed the add-cli-cmds-to-integration-tests branch from 9374383 to f7a9d7a Compare November 29, 2025 10:49
@bugraoz93 bugraoz93 merged commit ed10c59 into apache:main Nov 29, 2025
9 checks passed
RoyLee1224 pushed a commit to RoyLee1224/airflow that referenced this pull request Dec 3, 2025
* Add 31 missing airflowctl integration test commands

* fix integration test parameters
Copilot AI pushed a commit to jason810496/airflow that referenced this pull request Dec 5, 2025
* Add 31 missing airflowctl integration test commands

* fix integration test parameters
itayweb pushed a commit to itayweb/airflow that referenced this pull request Dec 6, 2025
* Add 31 missing airflowctl integration test commands

* fix integration test parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add all commands to airflowctl integration tests

3 participants