-
Notifications
You must be signed in to change notification settings - Fork 824
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 support for publishing private packages #4247
Conversation
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.
One concern I have here is that we are duplicating the responsibility for marking a package as private.
Is it the private setting in wasmer.toml?
Is it the CLI flag and the GraphQL argument?
What happens when the GraphQL specifies private, but not the package manifest?
Will the backend alter the manifest before persisting it?
What happens on a re-publish when you forget the private flag?
Does the API return an error then because the package is private?
Does it just accept it?
This all sounds quite confusing from a user stand point.
It would be cleaner, I think, if the manifest was the source of truth.
An additional --private
flag or the CLI arg could make sure the package is set to private in the manifest and error out. Similar for the GraphQL API.
Thoughts, @Michael-F-Bryan , @ayys ?
I agree that wasmer.toml should be the source of truth,
the graphql
For visibility, right now piblic packages cannot be made private, but private packages can be made public. So if you remove the
I agree that the |
@theduke this is my understanding. @ayys feel free to correct me if I'm wrong.
Yep. We added a
100% agreed. It's traceable and immediately obvious to anyone consuming the packages.
If there is disagreement between the manifest and the GraphQL mutation, the backend should return an error and publishing will fail.
To the best of my knowledge, no. Altering the manifest that someone has published is something we should try to avoid as much as possible. When I publish something, I want to be confident that my users get exactly what I published.
@ayys probably knows better than me, but I think this would silently make the package public.
I'd like to avoid a |
27e6708
to
5dfaa57
Compare
…the validator code
…rors abort publishing
5dfaa57
to
c4e4a23
Compare
This updates the
wasmer publish
command to allow users to publish private packages. When a package is private, you will only be able to access it if you have contributor access (e.g. because you are the owner, have been added as a contributor, or are part of a namespace that owns the package).