Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action delete API rework - support for action file deletion #5360

Merged
merged 14 commits into from
Sep 21, 2021

Conversation

mahesh-orch
Copy link
Contributor

@mahesh-orch mahesh-orch commented Sep 17, 2021

  • Action delete API modification to have option to delete action database entry without removing files from disk
  • From CLI st2 action delete <pack>.<action> will delete database entry only
  • From CLI st2 action delete --remove-files <pack>.<action> will delete database entry and files.
  • If action DELETE method has additional argument as {"remove_files": true} in the body then it will remove related action files from disk along with database entry.
  • {"remove_files": false} or no additional argument in action DELETE method body will remove only database entry.

@pull-request-size pull-request-size bot added the size/L PR that changes 100-499 lines. Requires some effort to review. label Sep 17, 2021
st2api/st2api/controllers/v1/actions.py Outdated Show resolved Hide resolved
st2common/st2common/openapi.yaml.j2 Outdated Show resolved Hide resolved
st2common/st2common/openapi.yaml Outdated Show resolved Hide resolved
st2client/st2client/commands/action.py Show resolved Hide resolved
st2client/st2client/commands/action.py Outdated Show resolved Hide resolved
@mahesh-orch
Copy link
Contributor Author

@m4dcoder I have added unit tests, updated existing unit test and done other minor changes as suggested. Please review. Thanks.

Copy link
Contributor

@m4dcoder m4dcoder left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@amanda11 amanda11 left a comment

Choose a reason for hiding this comment

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

Just a minor comment on wording in the schema, but @nzlosh point more important.

st2common/st2common/openapi.yaml.j2 Outdated Show resolved Hide resolved
@mahesh-orch
Copy link
Contributor Author

@nzlosh I have changed CLI action delete optional argument -rf to -r.
@amanda11 I have updated the description of ActionDeleteSchema remove-files argument.
Please review. Thanks.

@m4dcoder m4dcoder merged commit ab52921 into StackStorm:master Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L PR that changes 100-499 lines. Requires some effort to review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants