Description
Issue description
Recently we've had an issue when the component had to be quickly rollback to the previous version.
The procedure required going back in the git history and then manually publishing the component.
It was an error prone and not so quick solution.
Expected behaviour
It would be nice to have some kind of rollback mechanism in place which would republish specified version of component (with the latest version of it)
The command could look like:
oc rollback <componentPath> <rollbackVersion> [newVersion]
where
rollbackVersion
is the existing version of component (the one we want to republish)
newVersion
is the republished version of component (defaulting to the latest one with increased patch - when semver is supported)
Questions/possible issues
- How to implement?
download the specified version of component and then publish with new version (Q: Does the
package.json
file in the component package need to be updated as well?) - How can we distinguish between "normal" and "republished" (rolled back) version of component?
We could add build metadata that would add something like
+rb.1.3.4
to the version of component during the rollback (https://semver.org/#spec-item-10) - What if semver is not supported?
We can require semver to be supported or newVersion to be specified
Other Comments
I'd like to gather some opinions/comments before [possibly] starting implementing this feature.