Bug 1922845
| Summary: | using "blueprints undo" creates a new, empty blueprint | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Micah Abbott <miabbott> |
| Component: | osbuild-composer | Assignee: | Brian Lane <bcl> |
| Status: | CLOSED ERRATA | QA Contact: | Release Test Team <release-test-team-automation> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.3 | CC: | atodorov, jrusz, miabbott, obudai |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | 8.0 | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | osbuild-composer-45-1.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-05-10 13:49:28 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: | |||
Looks like the change happened according to `state.json`:
```
jq .changes < state.json
{
"": {
"c59a32fcbab1f9174b208e460aa234b285173ae9": {
"commit": "c59a32fcbab1f9174b208e460aa234b285173ae9",
"message": "my-first-blueprint.toml reverted to commit 84dbb06fb0407b4cfcbf8cd903af2269186c177c",
"revision": null,
"timestamp": "2021-01-31T15:50:38Z"
}
},
"my-first-blueprint": {
"7728dc2dc46f85478be17beb90e8bd6bc6373eae": {
"commit": "7728dc2dc46f85478be17beb90e8bd6bc6373eae",
"message": "Recipe my-first-blueprint, version 0.0.3 saved.",
"revision": null,
"timestamp": "2021-01-30T15:29:42Z"
},
"84dbb06fb0407b4cfcbf8cd903af2269186c177c": {
"commit": "84dbb06fb0407b4cfcbf8cd903af2269186c177c",
"message": "Recipe my-first-blueprint, version 0.0.3 saved.",
"revision": null,
"timestamp": "2021-01-30T14:57:50Z"
},
"855754b889614a61b224ef3035287341d50e3936": {
"commit": "855754b889614a61b224ef3035287341d50e3936",
"message": "Recipe my-first-blueprint, version 0.0.4 saved.",
"revision": null,
"timestamp": "2021-01-30T15:29:59Z"
},
"91d7d253badef3830f08c7a9f317a11898d10d49": {
"commit": "91d7d253badef3830f08c7a9f317a11898d10d49",
"message": "Recipe my-first-blueprint, version 0.0.5 saved.",
"revision": null,
"timestamp": "2021-01-31T15:26:42Z"
},
"a2568affc9e6038e99e8cc16bde7149508eaa87d": {
"commit": "a2568affc9e6038e99e8cc16bde7149508eaa87d",
"message": "Recipe my-first-blueprint, version 0.0.2 saved.",
"revision": null,
"timestamp": "2021-01-30T14:51:25Z"
},
"c8dc6292d2c8dca35eec3835afdf45c398eec3a1": {
"commit": "c8dc6292d2c8dca35eec3835afdf45c398eec3a1",
"message": "Recipe my-first-blueprint, version 0.0.1 saved.",
"revision": null,
"timestamp": "2021-01-30T14:31:45Z"
}
},
"second-blueprint": {
"1734deb6bdfd539a3d12944b05664e37f0cc79dd": {
"commit": "1734deb6bdfd539a3d12944b05664e37f0cc79dd",
"message": "Recipe second-blueprint, version 0.0.0 saved.",
"revision": null,
"timestamp": "2021-01-31T15:21:04Z"
},
"74209a1c3689fdb703c7cc8acf0176905d35dfdf": {
"commit": "74209a1c3689fdb703c7cc8acf0176905d35dfdf",
"message": "Recipe second-blueprint, version 0.0.1 saved.",
"revision": null,
"timestamp": "2021-01-31T15:21:42Z"
},
"df6bd76085d46cbcc3b4afd18e4ddabd126b0a98": {
"commit": "df6bd76085d46cbcc3b4afd18e4ddabd126b0a98",
"message": "Recipe second-blueprint, version 0.0.2 saved.",
"revision": null,
"timestamp": "2021-01-31T15:24:36Z"
},
"e91332a5cd07c4890b78f7d9e3cd89df82af7430": {
"commit": "e91332a5cd07c4890b78f7d9e3cd89df82af7430",
"message": "Recipe second-blueprint, version saved.",
"revision": null,
"timestamp": "2021-01-31T15:18:39Z"
}
}
}
```
I tried to hand edit state.json to remove the offending entry, but wasn't successful in making the web UI functional again. I ended up nuking `state.json` completely and rebooting the whole system. This is covered by unit tests: https://github.com/osbuild/osbuild-composer/runs/5367289789?check_suite_focus=true 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 (osbuild-composer 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:1841 |
I have a blueprint with multiple versions saved: ``` # composer-cli blueprints changes my-first-blueprint my-first-blueprint 2021-01-31T15:26:42Z 91d7d253badef3830f08c7a9f317a11898d10d49 Recipe my-first-blueprint, version 0.0.5 saved. 2021-01-30T15:29:59Z 855754b889614a61b224ef3035287341d50e3936 Recipe my-first-blueprint, version 0.0.4 saved. 2021-01-30T15:29:42Z 7728dc2dc46f85478be17beb90e8bd6bc6373eae Recipe my-first-blueprint, version 0.0.3 saved. 2021-01-30T14:57:50Z 84dbb06fb0407b4cfcbf8cd903af2269186c177c Recipe my-first-blueprint, version 0.0.3 saved. 2021-01-30T14:51:25Z a2568affc9e6038e99e8cc16bde7149508eaa87d Recipe my-first-blueprint, version 0.0.2 saved. 2021-01-30T14:31:45Z c8dc6292d2c8dca35eec3835afdf45c398eec3a1 Recipe my-first-blueprint, version 0.0.1 saved. ``` When I try to use the `blueprints undo` function, the blueprint appears unchanged and also creates a new, empty blueprint. ``` # composer-cli blueprints undo my-first-blueprint 84dbb06fb0407b4cfcbf8cd903af2269186c177c # composer-cli blueprints changes my-first-blueprint my-first-blueprint 2021-01-31T15:26:42Z 91d7d253badef3830f08c7a9f317a11898d10d49 Recipe my-first-blueprint, version 0.0.5 saved. 2021-01-30T15:29:59Z 855754b889614a61b224ef3035287341d50e3936 Recipe my-first-blueprint, version 0.0.4 saved. 2021-01-30T15:29:42Z 7728dc2dc46f85478be17beb90e8bd6bc6373eae Recipe my-first-blueprint, version 0.0.3 saved. 2021-01-30T14:57:50Z 84dbb06fb0407b4cfcbf8cd903af2269186c177c Recipe my-first-blueprint, version 0.0.3 saved. 2021-01-30T14:51:25Z a2568affc9e6038e99e8cc16bde7149508eaa87d Recipe my-first-blueprint, version 0.0.2 saved. 2021-01-30T14:31:45Z c8dc6292d2c8dca35eec3835afdf45c398eec3a1 Recipe my-first-blueprint, version 0.0.1 saved. # composer-cli blueprints list my-first-blueprint second-blueprint # composer-cli blueprints list | wc -l 3 ``` Note, this empty blueprint causes the web UI to stop functioning; it cannot render this magically created blueprint and returns an error "The iterator does not provide a 'throw' method"