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

fix(ci): do not confirm on force for deletion #7106

Merged
merged 5 commits into from
Jan 24, 2023

Conversation

anshbansal
Copy link
Collaborator

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Jan 23, 2023
Copy link
Collaborator

@hsheth2 hsheth2 left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -199,7 +199,7 @@ def delete(
)
remove_references = click.confirm("Do you want to delete these references?")

if remove_references:
if force or remove_references:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why does force also remove references? I think that all deletes should remove references but not sure if thats communicated in docs

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The -f option in CLI is used to bypass checks for CI. If someone was trying to delete many URNs then this will cause them to need to do yes for each one of them.

I was trying to do this for 90 URNs
datahub delete --urn URN -f

For almost more than half of them of them I had to press y to confirm. Usually all CLIs tools bypass all confirmations when -f is used. I am making the behaviour consistent with that.

@anshbansal
Copy link
Collaborator Author

Work on fixing the failing cypress is being done in #7116

@anshbansal anshbansal merged commit ab84863 into master Jan 24, 2023
@anshbansal anshbansal deleted the aseem-do-not-confirm-on-force branch January 24, 2023 11:44
ericyomi pushed a commit to ericyomi/datahub that referenced this pull request Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ingestion PR or Issue related to the ingestion of metadata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants