Skip to content

fix: fix template edit overriding with flag defaults #11564

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

Merged
merged 3 commits into from
Jan 11, 2024
Merged

Conversation

sreya
Copy link
Collaborator

@sreya sreya commented Jan 11, 2024

This PR fixes a couple of bugs:

  • Fixes various flags default overriding template values even when not specified as part of the command
  • Fixes an issue where attempting to disabling the everyone group on a template wiped the groups permission ACL
  • Fixes a testing issue where seeding a template didn't set a proper object for user_acl

I know we recently refactored templates edit to have parity with templates create but I don't think we should be supporting the --private flag since that's really only intended for initial template creation. We should probably move it to templates push and indicate in the description that the flag is only intended when used in conjunction with --create. I'll fix that here

fixes #11563

@aaronlehmann
Copy link
Contributor

Thanks for fixing this. I ran into it a few days ago.

@sreya sreya requested a review from Emyrk January 11, 2024 01:24
Copy link
Member

@Emyrk Emyrk left a comment

Choose a reason for hiding this comment

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

👍

It would be nice to find a more shorthand syntax to handle this category of bug, but for now this is a good fix 👍

@sreya
Copy link
Collaborator Author

sreya commented Jan 11, 2024

Yeah the test for it is inherently brittle, but it'll help for now.

@sreya sreya merged commit aecdafd into main Jan 11, 2024
@sreya sreya deleted the jon/fixtemplateedit branch January 11, 2024 22:18
@github-actions github-actions bot locked and limited conversation to collaborators Jan 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: 'templates edit' updates unspecified fields with flag defaults
3 participants