Skip to content

Conversation

@achilleas-k
Copy link
Member

@achilleas-k achilleas-k commented Sep 24, 2025

This PR converts the config-map.json file to a list.

The purpose of this change is to have more flexibility with configs that need to apply to multiple filter sets. For example, with the existing config map, it is not possible to apply the same config to the server-qcow2 file for Fedora and at the same time all image types for CentOS Stream 9, because the following is not possible:

{
    "configs/example.json": {
        "distros": [
            "fedora-*"
        ],
        "image-types": [
            "server-qcow2"
        ]
    },
    "configs/example.json": {
        "distros": [
            "centos-9"
        ]
    }
}

By converting the config map to a list, the above configuration is now possible as follows:

[
    {
        "path": "configs/example.json",
        "filters": {
            "distros": [
                "fedora-*"
            ],
            "image-types": [
                "server-qcow2"
            ]
        }
    },
    {
        "path": "configs/example.json",
        "filters": {
            "distros": [
                "centos-9"
            ]
        }
    }
]

@achilleas-k achilleas-k force-pushed the listify-the-config-map branch 2 times, most recently from 36e3c32 to d1fb2ae Compare September 25, 2025 16:41
@achilleas-k achilleas-k marked this pull request as ready for review September 25, 2025 16:41
@achilleas-k achilleas-k requested review from a team and thozza as code owners September 25, 2025 16:41
@achilleas-k achilleas-k force-pushed the listify-the-config-map branch 4 times, most recently from 9a9a688 to 2b0c901 Compare September 26, 2025 09:06
thozza
thozza previously approved these changes Sep 29, 2025
Copy link
Member

@thozza thozza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes a lot of sense. Also, nice cleanup 😉

@achilleas-k
Copy link
Member Author

This will probably conflict with some of the other open PRs and it's a pretty low priority right now. Not gonna set it to draft or anything, just people know.

croissanne
croissanne previously approved these changes Sep 30, 2025
@achilleas-k achilleas-k dismissed stale reviews from croissanne and thozza via 6baaa1d October 1, 2025 12:47
@achilleas-k achilleas-k force-pushed the listify-the-config-map branch from 2b0c901 to 6baaa1d Compare October 1, 2025 12:47
@achilleas-k
Copy link
Member Author

Rebased and fixed conflicts.

@supakeen supakeen enabled auto-merge October 1, 2025 13:31
supakeen
supakeen previously approved these changes Oct 1, 2025
@croissanne
Copy link
Member

LGTM but needs another round ;_; Let's prioritise this after the next rebase?

Converted the config-map.json file to a list with the following one-time
(python) script:

    import json

    with open("./test/config-map.json", mode="r", encoding="utf-8") as cm_fp:
        config_map = json.load(cm_fp)

    config_list = []
    for path, filters in config_map.items():
        item = {
            "path": path,
            "filters": filters,
        }
        config_list.append(item)

    with open("./test/config-list.json", mode="w", encoding="utf-8") as cl_fp:
        json.dump(config_list, cl_fp, indent=2)

The purpose of this change is to have more flexibility with configs that
need to apply to multiple filter sets.  For example, with the existing
config map, it is not possible to apply the same config to the
server-qcow2 file for Fedora  and at the same time all image
types for CentOS Stream 9, because the following is not possible:

    {
        "configs/example.json": {
            "distros": [
                "fedora-*"
            ],
            "image-types": [
                "server-qcow2"
            ]
        },
        "configs/example.json": {
            "distros": [
                "centos-9"
            ]
        }
    }

By converting the config map to a list, the above configuration is now
possible as follows:

    [
        {
            "path": "configs/example.json",
            "filters": {
                "distros": [
                    "fedora-*"
                ],
                "image-types": [
                    "server-qcow2"
                ]
            }
        },
        {
            "path": "configs/example.json",
            "filters": {
                "distros": [
                    "centos-9"
                ]
            }
        }
    ]
Adapt gen-manifests to use the new config list instead of the old config
map.
Adapt the scripts that generate configs and their tests to read the
config list instead of the config map.
Remove the old config map.
croissanne
croissanne previously approved these changes Oct 10, 2025
supakeen
supakeen previously approved these changes Oct 10, 2025
Remove any usage of a test configuration variant for specific distros
that was added to work around the issue of not being able to apply the
same config file to multiple filter sets.

This primarily consists of the following configs being replaced by
'empty':
- ec2-sap-empty
- empty-rhel
- empty-fedora
- empty-rhel7

The following were also identical and have been replaced by a new config
called 'jq-only':
- empty-rhel-vhd
- jq-only-rhel

The 'partitioning-lvm-r8' config was identical to the 'partitioning-lvm'
config.

In addition, the 'partitioning-plain-r8' config, while slightly
different than 'partitioning-plain', is now applied to the RHEL 8 filter
set.  The non-r8 variant includes a custom /boot/efi partition.

Manifest checksums have changed because the rng seed depends on the
config name for each manifest.
@achilleas-k achilleas-k dismissed stale reviews from supakeen and croissanne via 4199368 October 10, 2025 10:45
@achilleas-k achilleas-k force-pushed the listify-the-config-map branch from b85ba8a to 4199368 Compare October 10, 2025 10:45
@supakeen supakeen added this pull request to the merge queue Oct 10, 2025
Merged via the queue into osbuild:main with commit a0684b1 Oct 10, 2025
23 checks passed
@achilleas-k achilleas-k deleted the listify-the-config-map branch October 10, 2025 12:51
croissanne added a commit to croissanne/osbuild-composer that referenced this pull request Oct 21, 2025
Changes with 0.205.0
----------------
  - Convert the test config map to a config list (osbuild/images#1900)
    - Author: Achilleas Koutsou, Reviewers: Sanne Raymaekers, Simon de Vlieger
  - Repos: Add definitions for AlmaLinux 9.7, 9.8, 10.1 and 10.2 (osbuild/images#1926)
    - Author: Eduard Abdullin, Reviewers: Achilleas Koutsou, Brian C. Lane, Simon de Vlieger
  - Support uploading to OpenStack (osbuild/images#1921)
    - Author: Jakub Kadlčík, Reviewers: Michael Vogt, Simon de Vlieger
  - disk: make addPartitionsForBootMode() arch specific (osbuild/images#1928)
    - Author: Michael Vogt, Reviewers: Brian C. Lane, Simon de Vlieger
  - distro: add ova image type for bootc [HMS-9503] (osbuild/images#1938)
    - Author: Michael Vogt, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - fedora/minimal: drop uuids in partition tables (osbuild/images#1932)
    - Author: Simon de Vlieger, Reviewers: Brian C. Lane, Michael Vogt

Changes with 0.206.0
----------------
  - Update osbuild dependency commit ID to latest (osbuild/images#1945)
    - Author: SchutzBot, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - deps: bump blueprint to 1.16.0 (osbuild/images#1952)
    - Author: Simon de Vlieger, Reviewers: Achilleas Koutsou, Sanne Raymaekers
  - fedora: Drop tigervnc on F42 and later (osbuild/images#1942)
    - Author: Brian C. Lane, Reviewers: Simon de Vlieger, Tomáš Hozza
  - fedora: document root kickstart (osbuild/images#1936)
    - Author: Simon de Vlieger, Reviewers: Brian C. Lane, Michael Vogt
  - fedora: rawhide is 44 (osbuild/images#1943)
    - Author: Simon de Vlieger, Reviewers: Achilleas Koutsou, Tomáš Hozza
  - many: lorax template split (HMS-9524) (osbuild/images#1949)
    - Author: Simon de Vlieger, Reviewers: Brian C. Lane, Tomáš Hozza

Changes with 0.207.0
----------------
  - Enable fedora 43 unit testing (osbuild/images#1954)
    - Author: Achilleas Koutsou, Reviewers: Simon de Vlieger, Tomáš Hozza
  - fedora: update cloud_kernel_options (osbuild/images#1953)
    - Author: Sanne Raymaekers, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - test/data/repos/rhel-10.2: fix copy & paste error (osbuild/images#1956)
    - Author: Tomáš Hozza, Reviewers: Achilleas Koutsou, Simon de Vlieger

Changes with 0.208.0
----------------
  - Schutzfile: switch CI runner to Fedora 42 (osbuild/images#1955)
    - Author: Achilleas Koutsou, Reviewers: Simon de Vlieger, Tomáš Hozza
  - Support uploading to IBM Cloud (osbuild/images#1924)
    - Author: Jakub Kadlčík, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - pkg/osbuild: generate osbuild result from status scanner entries (osbuild/images#1941)
    - Author: Sanne Raymaekers, Reviewers: Nobody
croissanne added a commit to croissanne/osbuild-composer that referenced this pull request Oct 21, 2025
Changes with 0.205.0
----------------
  - Convert the test config map to a config list (osbuild/images#1900)
    - Author: Achilleas Koutsou, Reviewers: Sanne Raymaekers, Simon de Vlieger
  - Repos: Add definitions for AlmaLinux 9.7, 9.8, 10.1 and 10.2 (osbuild/images#1926)
    - Author: Eduard Abdullin, Reviewers: Achilleas Koutsou, Brian C. Lane, Simon de Vlieger
  - Support uploading to OpenStack (osbuild/images#1921)
    - Author: Jakub Kadlčík, Reviewers: Michael Vogt, Simon de Vlieger
  - disk: make addPartitionsForBootMode() arch specific (osbuild/images#1928)
    - Author: Michael Vogt, Reviewers: Brian C. Lane, Simon de Vlieger
  - distro: add ova image type for bootc [HMS-9503] (osbuild/images#1938)
    - Author: Michael Vogt, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - fedora/minimal: drop uuids in partition tables (osbuild/images#1932)
    - Author: Simon de Vlieger, Reviewers: Brian C. Lane, Michael Vogt

Changes with 0.206.0
----------------
  - Update osbuild dependency commit ID to latest (osbuild/images#1945)
    - Author: SchutzBot, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - deps: bump blueprint to 1.16.0 (osbuild/images#1952)
    - Author: Simon de Vlieger, Reviewers: Achilleas Koutsou, Sanne Raymaekers
  - fedora: Drop tigervnc on F42 and later (osbuild/images#1942)
    - Author: Brian C. Lane, Reviewers: Simon de Vlieger, Tomáš Hozza
  - fedora: document root kickstart (osbuild/images#1936)
    - Author: Simon de Vlieger, Reviewers: Brian C. Lane, Michael Vogt
  - fedora: rawhide is 44 (osbuild/images#1943)
    - Author: Simon de Vlieger, Reviewers: Achilleas Koutsou, Tomáš Hozza
  - many: lorax template split (HMS-9524) (osbuild/images#1949)
    - Author: Simon de Vlieger, Reviewers: Brian C. Lane, Tomáš Hozza

Changes with 0.207.0
----------------
  - Enable fedora 43 unit testing (osbuild/images#1954)
    - Author: Achilleas Koutsou, Reviewers: Simon de Vlieger, Tomáš Hozza
  - fedora: update cloud_kernel_options (osbuild/images#1953)
    - Author: Sanne Raymaekers, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - test/data/repos/rhel-10.2: fix copy & paste error (osbuild/images#1956)
    - Author: Tomáš Hozza, Reviewers: Achilleas Koutsou, Simon de Vlieger

Changes with 0.208.0
----------------
  - Schutzfile: switch CI runner to Fedora 42 (osbuild/images#1955)
    - Author: Achilleas Koutsou, Reviewers: Simon de Vlieger, Tomáš Hozza
  - Support uploading to IBM Cloud (osbuild/images#1924)
    - Author: Jakub Kadlčík, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - pkg/osbuild: generate osbuild result from status scanner entries (osbuild/images#1941)
    - Author: Sanne Raymaekers, Reviewers: Nobody
ondrejbudai pushed a commit to osbuild/osbuild-composer that referenced this pull request Oct 22, 2025
Changes with 0.205.0
----------------
  - Convert the test config map to a config list (osbuild/images#1900)
    - Author: Achilleas Koutsou, Reviewers: Sanne Raymaekers, Simon de Vlieger
  - Repos: Add definitions for AlmaLinux 9.7, 9.8, 10.1 and 10.2 (osbuild/images#1926)
    - Author: Eduard Abdullin, Reviewers: Achilleas Koutsou, Brian C. Lane, Simon de Vlieger
  - Support uploading to OpenStack (osbuild/images#1921)
    - Author: Jakub Kadlčík, Reviewers: Michael Vogt, Simon de Vlieger
  - disk: make addPartitionsForBootMode() arch specific (osbuild/images#1928)
    - Author: Michael Vogt, Reviewers: Brian C. Lane, Simon de Vlieger
  - distro: add ova image type for bootc [HMS-9503] (osbuild/images#1938)
    - Author: Michael Vogt, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - fedora/minimal: drop uuids in partition tables (osbuild/images#1932)
    - Author: Simon de Vlieger, Reviewers: Brian C. Lane, Michael Vogt

Changes with 0.206.0
----------------
  - Update osbuild dependency commit ID to latest (osbuild/images#1945)
    - Author: SchutzBot, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - deps: bump blueprint to 1.16.0 (osbuild/images#1952)
    - Author: Simon de Vlieger, Reviewers: Achilleas Koutsou, Sanne Raymaekers
  - fedora: Drop tigervnc on F42 and later (osbuild/images#1942)
    - Author: Brian C. Lane, Reviewers: Simon de Vlieger, Tomáš Hozza
  - fedora: document root kickstart (osbuild/images#1936)
    - Author: Simon de Vlieger, Reviewers: Brian C. Lane, Michael Vogt
  - fedora: rawhide is 44 (osbuild/images#1943)
    - Author: Simon de Vlieger, Reviewers: Achilleas Koutsou, Tomáš Hozza
  - many: lorax template split (HMS-9524) (osbuild/images#1949)
    - Author: Simon de Vlieger, Reviewers: Brian C. Lane, Tomáš Hozza

Changes with 0.207.0
----------------
  - Enable fedora 43 unit testing (osbuild/images#1954)
    - Author: Achilleas Koutsou, Reviewers: Simon de Vlieger, Tomáš Hozza
  - fedora: update cloud_kernel_options (osbuild/images#1953)
    - Author: Sanne Raymaekers, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - test/data/repos/rhel-10.2: fix copy & paste error (osbuild/images#1956)
    - Author: Tomáš Hozza, Reviewers: Achilleas Koutsou, Simon de Vlieger

Changes with 0.208.0
----------------
  - Schutzfile: switch CI runner to Fedora 42 (osbuild/images#1955)
    - Author: Achilleas Koutsou, Reviewers: Simon de Vlieger, Tomáš Hozza
  - Support uploading to IBM Cloud (osbuild/images#1924)
    - Author: Jakub Kadlčík, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - pkg/osbuild: generate osbuild result from status scanner entries (osbuild/images#1941)
    - Author: Sanne Raymaekers, Reviewers: Nobody
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants