Bug 2023264
| Summary: | composer-cli blueprints delete not fully deleting blueprints | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Marko Myllynen <myllynen> |
| Component: | weldr-client | Assignee: | Brian Lane <bcl> |
| Status: | CLOSED ERRATA | QA Contact: | Release Test Team <release-test-team-automation> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.5 | CC: | jrusz, obudai |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | weldr-client-35.5-1.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-05-10 14:10:24 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
(In reply to Marko Myllynen from comment #0) > So here the outcome of blueprint deletion is somewhat inconsistent and > perhaps not as expected: > > 1) Listing blueprints after deleting the last or only blueprint shows > nothing but if the name of the blueprint is known then its changes can still > be listed. So looks like the blueprint deletion has been partial. This is normal, the previous API server used git on the backend so things were never really ever deleted. osbuild-composer emulates this behavior, mostly. If you do 'composer-cli blueprints undo 53991553ed960fab415e9ef85c1603d2a0c91535' it will restore that version. If there is a bug here it is that osbuild-composer doesn't make a change entry for delete like lorax-composer did. I'm not sure how important that is but feel free to file a bug for it. > > 2) After deleting a blueprint and pushing a new blueprint with the same name > its history consists of the current and previous changes. That's expected. It's as if you never deleted it and pushed a new version of it. > > 3) Saving a deleted or non-existent blueprint fails as expected but the > output message in completely unhelpful. The exit code is set properly which > is good. The error (using composer-cli from weldr-client in 8.6.0) is now: ERROR: UnknownBlueprint: test: (this comes from the API server, composer-cli just passes these back to the user). > > If this is working as intended then this should be explained in the manual > page or elsewhere now when blueprint deletion seems partial it is perhaps a > bit unexpected. Thanks. Yeah, I can update the documentation in weldr-client to make that more clear. > > Version-Release number of selected component (if applicable): > composer-cli-28.14.62-1.el8.x86_64 > osbuild-composer-33.2-1.el8.x86_64 FYI weldr-client-35.4 is now available in 8.6.0 and it should be used for future tests. https://github.com/osbuild/weldr-client/pull/38 (needs to be added upstream first, then rebase weldr-client) Thanks for looking into this. I now tried with weldr-client-35.3-2.el8.x86_64 and agree what with the above documentation update things look as expected. But I get an error with weldr-client which doesn't happen with composer-cli, see https://bugzilla.redhat.com/show_bug.cgi?id=2033192. Thanks. Upstream documentation updated and there are no other issues to test. Moving to VERIFIED. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (weldr-client bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:1886 |
Description of problem: image-builder@localhost ~]$ composer-cli blueprints list [image-builder@localhost ~]$ composer-cli blueprints push test.toml [image-builder@localhost ~]$ composer-cli blueprints list test [image-builder@localhost ~]$ vi test.toml [image-builder@localhost ~]$ composer-cli blueprints push test.toml [image-builder@localhost ~]$ composer-cli blueprints changes test test 2021-11-15T12:25:13Z 53991553ed960fab415e9ef85c1603d2a0c91535 Recipe test, version 2021.11.15+12.25.00 saved. 2021-11-15T12:24:58Z 05c83c18d33dc1e8a9f65d0d612f56f18c0fd409 Recipe test, version 2021.11.15+12.24.00 saved. [image-builder@localhost ~]$ composer-cli blueprints delete test [image-builder@localhost ~]$ composer-cli blueprints list [image-builder@localhost ~]$ composer-cli blueprints changes test test 2021-11-15T12:25:13Z 53991553ed960fab415e9ef85c1603d2a0c91535 Recipe test, version 2021.11.15+12.25.00 saved. 2021-11-15T12:24:58Z 05c83c18d33dc1e8a9f65d0d612f56f18c0fd409 Recipe test, version 2021.11.15+12.24.00 saved. [image-builder@localhost ~]$ composer-cli blueprints save test foo.toml 2021-11-15 12:26:06,893: test: [image-builder@localhost ~]$ echo $? 1 [image-builder@localhost ~]$ vi test.toml [image-builder@localhost ~]$ composer-cli blueprints push test.toml [image-builder@localhost ~]$ composer-cli blueprints list test [image-builder@localhost ~]$ composer-cli blueprints changes test test 2021-11-15T12:26:28Z 95c37a6e79633e7e3525b698e8d3fb68b986bf88 Recipe test, version 2021.11.15+12.26.00 saved. 2021-11-15T12:25:13Z 53991553ed960fab415e9ef85c1603d2a0c91535 Recipe test, version 2021.11.15+12.25.00 saved. 2021-11-15T12:24:58Z 05c83c18d33dc1e8a9f65d0d612f56f18c0fd409 Recipe test, version 2021.11.15+12.24.00 saved. [image-builder@localhost ~]$ So here the outcome of blueprint deletion is somewhat inconsistent and perhaps not as expected: 1) Listing blueprints after deleting the last or only blueprint shows nothing but if the name of the blueprint is known then its changes can still be listed. So looks like the blueprint deletion has been partial. 2) After deleting a blueprint and pushing a new blueprint with the same name its history consists of the current and previous changes. 3) Saving a deleted or non-existent blueprint fails as expected but the output message in completely unhelpful. The exit code is set properly which is good. If this is working as intended then this should be explained in the manual page or elsewhere now when blueprint deletion seems partial it is perhaps a bit unexpected. Thanks. Version-Release number of selected component (if applicable): composer-cli-28.14.62-1.el8.x86_64 osbuild-composer-33.2-1.el8.x86_64