-
Notifications
You must be signed in to change notification settings - Fork 122
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
No option to remove/delete a component from OC during product development phase #524
Comments
thanks for this issue @NapoleanReigns and sorry for the delay. The way we recommend to deal with an unwanted component, is marking it as "deprecated" and so far this way worked quite well for us. But it looks like other OpenComponents users might be interested in having this possibility. I am personally not against adding this feature. Let's see if someone else would like to add more on this. |
Hi @NapoleanReigns The way we handle this, is to have publishing done by our CI - and each component has a Pull Request including the version upgrade. This allows us to avoid situations like someone erroneously publishing a component with the wrong version. If you ask me, that's the way I would recommend to setup your pipeline. Delegating to automation the publishing also allows you to make sure nobody publishes faulty components from his machine (perhaps with unchecked source code) and you can make sure all the tests run before your change to go to prod. Nevertheless, if you want to "unpublish" a component manually, because something bad happened, you can at the moment
Now let's talk about the "unpublish" functionality aka "deprecate". This is my proposal: CLI
RegistryLet's imagine I have [email protected] and [email protected] (deprecated)
I think a mechanism like that would be really cool also in case of security issues. If you would find a vulnerability or a serious bug in a component, you could just deprecate it live, basically "automatically" rolling back (if consumers consume weak versions of it, for instance 1.x.x`) |
I agree with @matteofigus, but I'll rather not use the I'll also suggest we keep the same command for both blocking and unblocking but simply passing a flag, i.e
This is ugly by design as this shouldn't be a feature but merely an extra measure for the cases like the ones illustrated by Sourabh (also cause they could be avoided by setting up a different publishing pipeline as Matteo pointed out) |
A similar feature may be useful when you have to disable / remove a certain component version from the registry. Without a command to to disable a specific component version, when a component is "compromised" you'll need to manually delete the affected version(s) by removing the folder as suggested here by @matteofigus. |
I setup our pipeline so that branches are automatically set to experimental and are only allowed to be deployed to the dev registry with a name of {branchName}-{componentName}. Once the branch is merged to master and the branch is deleted, the branch component files are removed from the CDN by a clean up job. The pipeline also auto increments the patch version if it already exits in the registry. |
I’d like to revisit this. I do like @matteofigus suggestion of deprecate and undeprecate. Mostly for the case of a component is thought to be complete. Gets published & and the team finds an issue and quickly needs to rollback. Right now the only solution is to delete and bounce, which can have negative effects for a short while between the delete and the bounce. (Which is how we clean up branches in our dev env with an automated “janitor” process). I see @nickbalestra ‘s concern for consumers that are looking for an specific version vs a X version. Perhaps there can be a compromise where users requesting X version to not get the latest deprecated version. 1.6.2 published A possible concern is if no prior version exists. |
The other day i ran into a problem. Our team has been following a process where we usually publish our components with 1.* versioning pattern. One of our team members published the same component but with a higher version 6.0 by mistake.
In a usual development environment i would want to remove the ill versioned component (delete)
and continue my development versioning with the next consecutive number say 1.7 after 1.6.
How do i remove the ill versioned components from the library as well as registry!
I do respect the idea behind immutable components. As much as i want to have it this way in a production environment, i would also like to have an option to delete/unpublish/remove the components from oc registry n library during my development phase. Having said that, there should also be a configuration setting to disable to option for production environments.
Don't you think it's a must have feature/option in this kind of framework. Please share your thoughts.
The text was updated successfully, but these errors were encountered: