Bug 2217653

Summary: Adding packages through the web interface generates an invalid config
Product: Red Hat Enterprise Linux 9 Reporter: Jason N. <jnagin>
Component: cockpit-composerAssignee: Jacob <jkozol>
Status: NEW --- QA Contact: Yi He <yih>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.2CC: obudai
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description Jason N. 2023-06-26 20:32:00 UTC
Description of problem:
When you add a package to the blueprint through Cockpit, it will generate an invalid toml file that cannot be used to create a RHEL for Edge Commit.


Version-Release number of selected component (if applicable):
cockpit-composer.noarch                          45-1.el9_2                       @rhel-9-for-x86_64-appstream-rpms
osbuild-composer.x86_64                          76-2.el9_2.2                     @rhel-9-for-x86_64-appstream-rpms
osbuild-composer-core.x86_64                     76-2.el9_2.2                     @rhel-9-for-x86_64-appstream-rpms
osbuild-composer-dnf-json.x86_64                 76-2.el9_2.2                     @rhel-9-for-x86_64-appstream-rpms
osbuild-composer-worker.x86_64                   76-2.el9_2.2                     @rhel-9-for-x86_64-appstream-rpms

How reproducible:
Always

Steps to Reproduce:
1. Install cockpit-composer
2. Create an empty blueprint
3. Edit the blueprint and add any package
4. Try to create a RHEL for Edge Commit

The config is visible using composer-cli blueprints show *blueprint_name*

Actual results:
name = "test"
description = ""
version = "0.0.3"
modules = []
groups = []
distro = ""

[[packages]]
name = "podman"

[customizations]

[[customizations.user]]
name = "core"
key = "*ssh_key*"
groups = ["wheel"]

Expected results:
name = "test"
description = ""
version = "0.0.3"
modules = []
groups = []
distro = ""

[[packages]]
name = "podman"
version = "*"

[customizations]

[[customizations.user]]
name = "core"
key = "*ssh_key*"
groups = ["wheel"]

Additional info:
The package version is missing from the toml. Without it, the error message "failed to create osbuild manifest: Custom mountpoints are not supported for ostree types" is displayed immediately when you attempt to create the image. This has been tested in RHEL8.8, 9.1, and 9.2. All of them have the same result.