Skip to content

Add asset state store commands to airflowctl - #70771

Merged
henry3260 merged 3 commits into
apache:mainfrom
justinpakzad:feature/airflowctl-asset-state-store
Sep 7, 2026
Merged

henry3260 merged 3 commits into
apache:mainfrom
justinpakzad:feature/airflowctl-asset-state-store

Conversation

@justinpakzad

@justinpakzad justinpakzad commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

This PR adds asset state store commands to airflowctl. This would allow users to get, list, delete, clear, and set key/values in an asset state store. All of the new commands correspond to existing endpoints that are available via the REST API. Unit and integration tests were added for each command and they were also tested against an actual state store via breeze.

Note - another way to structure this would be by introducing new operations/command groups (e.g., StateStoreOperations or AssetsStateStoreOperations), I felt grouping them under assets made the most sense. Open to suggestions though.

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@justinpakzad

Copy link
Copy Markdown
Contributor Author

Would appreciate a review on this. Thanks.

@potiuk potiuk added the ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green. label Aug 13, 2026
@justinpakzad
justinpakzad force-pushed the feature/airflowctl-asset-state-store branch from c290886 to 3ca61b6 Compare August 25, 2026 22:16
@justinpakzad

Copy link
Copy Markdown
Contributor Author

Requesting review on this. Thanks.

@SameerMesiah97 SameerMesiah97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just 2 minor issues. Looks good otherwise.

@justinpakzad
justinpakzad force-pushed the feature/airflowctl-asset-state-store branch from 3ca61b6 to a5bfe53 Compare September 6, 2026 00:23
@justinpakzad

Copy link
Copy Markdown
Contributor Author

Just 2 minor issues. Looks good otherwise.

Appreciate the review as always. Addressed both comments.

@henry3260 henry3260 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.

Sorry for the late review
PR description lists "list, delete, clear, and set", but the diff also adds get-state-store. Might be worth mentioning it so the description matches the commands.

@justinpakzad
justinpakzad force-pushed the feature/airflowctl-asset-state-store branch from a5bfe53 to ce92006 Compare September 7, 2026 14:38
@justinpakzad

Copy link
Copy Markdown
Contributor Author

Sorry for the late review PR description lists "list, delete, clear, and set", but the diff also adds get-state-store. Might be worth mentioning it so the description matches the commands.

Thanks for the review! I've addressed the comments and added "get" to the list of commands specified in the description.

@henry3260 henry3260 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

@justinpakzad

Copy link
Copy Markdown
Contributor Author

Seems the test failure was a transient error. Would appreciate if someone can give it a rerun.

@henry3260
henry3260 merged commit fb512ef into apache:main Sep 7, 2026
185 of 186 checks passed
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Backport failed to create: airflow-ctl/v0-1-test. View the failure log Run details

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
❌ airflow-ctl/v0-1-test Commit Link

You can attempt to backport this manually by running:

cherry_picker fb512ef airflow-ctl/v0-1-test

This should apply the commit to the airflow-ctl/v0-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.

henry3260 added a commit that referenced this pull request Sep 8, 2026
…70771) (#72742)

Manual backport. This branch's core API spec (3.2.1) does not include the
asset state-store endpoints, so the AssetStateStore* datamodels were added
to generated.py by hand instead of via datamodel-codegen, and the assets
help SVG was regenerated from this branch. The field_bool_default_datamodels
context from main and the unrelated queued-event delete tests were left out
because the tasks clear backport is not on this branch.

(cherry picked from commit fb512ef)

Co-authored-by: Justin Pakzad <[email protected]>
regarmukesh3g pushed a commit to regarmukesh3g/airflow that referenced this pull request Sep 27, 2026
shahar1 pushed a commit that referenced this pull request Nov 19, 2026
…70771) (#72742)

Manual backport. This branch's core API spec (3.2.1) does not include the
asset state-store endpoints, so the AssetStateStore* datamodels were added
to generated.py by hand instead of via datamodel-codegen, and the assets
help SVG was regenerated from this branch. The field_bool_default_datamodels
context from main and the unrelated queued-event delete tests were left out
because the tasks clear backport is not on this branch.

(cherry picked from commit fb512ef)

Co-authored-by: Justin Pakzad <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:airflow-ctl backport-to-airflow-ctl/v0-1-test kind:documentation ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants