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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AL-2360] Added dataset.delete_branch() feature #2499

Merged
merged 5 commits into from Aug 4, 2023
Merged

Conversation

nvoxland
Copy link
Contributor

@nvoxland nvoxland commented Jul 25, 2023

馃殌 馃殌 Pull Request

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Creates a new ds.delete_branch(branch_name) function which deletes the given branch name.

You cannot delete branches:

  • You are currently on
  • The main branch,
  • Non-leaf branches
  • That have been previously merged into another branch

Things to be aware of

  • Simplified the requirements down to only "simple" branches to avoid complex history-rewriting
  • It locks the version_control_info.json and the branches to delete before operating
  • It takes CommitMaps referencing a branch's commits into account

Things to worry about

Is there complex version histories this doesn't handle correctly?

Additional Context

@tatevikh tatevikh changed the title Added dataset.delete_branch() feature [AL-2360] Added dataset.delete_branch() feature Jul 25, 2023
@nvoxland nvoxland requested review from FayazRahman and davidbuniat and removed request for farizrahman4u August 1, 2023 19:16
@nvoxland
Copy link
Contributor Author

nvoxland commented Aug 1, 2023

I pushed up a new version that takes CommitMap references into account and further limits what branches can be deleted to avoid logic/cleanup complexities.

Reviewers: please check the test to see if there is complex version control behaviors I'm not taking into account.

@tatevikh tatevikh requested a review from adolkhan August 3, 2023 16:10
@nvoxland nvoxland merged commit 5792546 into main Aug 4, 2023
6 of 9 checks passed
@nvoxland nvoxland deleted the branch_delete branch August 4, 2023 16:05
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.

None yet

3 participants