-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add --force-publish-chart and default to not overwriting #102
Add --force-publish-chart and default to not overwriting #102
Conversation
3607255
to
b86ded3
Compare
Can you add a test for the "with force" case as well? |
Co-authored-by: Tim Head <betatim@gmail.com>
a055d75
to
f9fcbb1
Compare
Thank you for your review @betatim ! ❤️ 🎉 Everything addressed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only thought is whether attempting to overwrite an existing version chart should return an error code instead of being silently ignored, in the same way that publishing the same version of a Pypi or Conda package will fail by default?
OTOH the current behaviour of always overwriting is different from those package managers, so maybe it doesn't matter.
While it is printing a message about either overwriting when force is applied and skipping publication if force isn't applied, I agree it is almost silent. I think I like it as it is, if we would start failing, it would be a very breaking change that can force people to default to I think skipping is the most sensible default, and it would be the most logical default matching how we do with Yeah having considered it a bit now I think the current PR implementation reflects the desired behavior. |
This feature help us avoid publishing the same chart version twice unless
--force-publish-chart
is passed. This mirrors the--push
and--force-push
behavior of docker images.There are several reasons to not push an already existing chart:
Closes #60 (the need for this kind of feature)
Closes #73 (implementation planning)
Closes #75 (an old PR to do this pretty much)
Review notes
This is the relevant implementation changing the default behavior to check unless --force-publish-chart has been passed.
https://github.com/jupyterhub/chartpress/pull/102/files#diff-b221c94b491bd2ffe6ebc5416067fd58b378f4eda722e75754468ed9f24aefefR587-R601