Repository navigation
Conversation
4fb2fb7 to
49dfda1
Compare
|
Would appreciate a review on this. Thanks. |
49dfda1 to
30aeadd
Compare
|
@henry3260 would appreciate a review on this whenever you have a moment. Thanks! |
|
I wonder if it might be best to introduce a sub-sub command? |
Yea, fair callout. Will have a look at the sub command approach. |
30aeadd to
cdec9c2
Compare
|
@ashb I've implemented your suggestion. |
8824647 to
e40d435
Compare
|
Requesting another review on this. |
henry3260
left a comment
There was a problem hiding this comment.
Thanks, leave some comments
e40d435 to
d5f16bd
Compare
Thanks for the review as always! I've addressed the feedback. Would you mind triggering the CI please? |
henry3260
left a comment
There was a problem hiding this comment.
Thanks for working on this Justin!
Backport failed to create: airflow-ctl/v0-1-test. View the failure log Run detailsNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
You can attempt to backport this manually by running: cherry_picker 3f0cea0 airflow-ctl/v0-1-testThis should apply the commit to the airflow-ctl/v0-1-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continueIf you don't have cherry-picker installed, see the installation guide. |
This PR adds task state store commands to airflowctl. This would allow users to
get, list, set, update, delete, and clear key/values in a task instance's state
store via
airflowctl. Unit and integration tests were added for each command and theywere also tested against an actual state store via breeze.
The commands live under a
state-storesubgroup within thetaskinstancesgroup, sincethe state store is scoped to a single task instance. Under
taskinstances state-storewe have:list- list all state store entries for a task instanceget- retrieve a single entry by keyset- create or overwrite a key (PUT)update- update the value of an existing key (PATCH)delete- delete a single keyclear- delete all keys for a task instanceAll commands accept
--map-indexandclear-state-storeaccepts--all-map-indicesto clear across everymap index.
Couple of notes:
state-storesubgroup rather than exposed as flatlist-state-store,get-state-store, etc.taskinstances state-store listreads more clearly and keepsthem grouped together.
assetsalready has the same set of*-state-storecommands on main. Will open a follow-up PR to align them if this gets merged and we proceed with the sub-sub command approach. The commands haven't been released yet so it wouldn't be a breaking change.Was generative AI tooling used to co-author this PR?
{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.