Skip to content

repomap: support distro-specific target mappings#17

Open
matejmatuska wants to merge 1 commit into
oamg:mainfrom
matejmatuska:distro-specific-mappings
Open

repomap: support distro-specific target mappings#17
matejmatuska wants to merge 1 commit into
oamg:mainfrom
matejmatuska:distro-specific-mappings

Conversation

@matejmatuska

@matejmatuska matejmatuska commented Jun 1, 2026

Copy link
Copy Markdown
Member

Change mapping target from a plain array of PES IDs to an object keyed by 'default' or distro ID, allowing distro-specific overrides of repository mappings.

Extract distro into a reusable $defs definition shared between particular_repository and the target mapping property names.

Fix mapping entry property names (source_pesid -> source, target_pesids -> target) to match the required fields.

Bump version to 1.4.0, the changes are not compatible.

Jira: RHEL-151413

Comment thread repomap-schema-test.json
"type": "object",
"title": "The target repositories mapping per distro",
"description": "Map of target PES IDs keyed by 'default' or distro ID. 'default' is required as fallback; distro-specific keys override it.",
"required": ["default"],

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I am unsure about this, there are 2 options I think:

a) Do not require default and if not specified treat it as [].
b) Require default, if there is no default it has to be set to [].

@pirat89 pirat89 Jun 2, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

b - let's always require default. at this point I cannot come up with a situation when default would have to be empty. you can always replace one of distros by default, so it does not happen that you specify all distros and you have an empty default. we plan to use rhel as default basically.

Comment thread repomap-schema-test.json
Comment on lines +178 to +180
"additionalProperties": {
"type": "array",
"items": { "$ref": "#/$defs/pesid" }

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

If anyone is unfamiliar with additionalProperties, AFAIK it is the schema for the objects values.

@matejmatuska matejmatuska force-pushed the distro-specific-mappings branch from 274d12c to 2135d02 Compare June 1, 2026 16:00
Comment thread repomap-schema-test.json
"title": "Repository Mapping Schema",
"description": "Repository mapping for OS migrations",
"version": "1.3.0",
"version": "1.4.0",

@pirat89 pirat89 Jun 2, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@matejmatuska Actually, when I see the change, what about to call it v2.0.0?

@matejmatuska matejmatuska marked this pull request as ready for review June 2, 2026 13:08

@pirat89 pirat89 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm. I would just bump the version to 2.0.0 but it seems ok otherwise. Postponing the approval & merge until the rest of the code is prepared for the change. also, with the change, I am thinking that this file should be symlink to a dir, where we will have versioned filenames, so people can check the validity of the file for various versions of our packages.

Change mapping target from a plain array of PES IDs to an object
keyed by 'default' or distro ID, allowing distro-specific overrides
of repository mappings.

Extract distro into a reusable $defs definition shared between
particular_repository and the target mapping property names.

Fix mapping entry property names (source_pesid -> source,
target_pesids -> target) to match the required fields.

Bump version to 1.4.0, the changes are not compatible.

Jira: RHEL-151413
@matejmatuska matejmatuska force-pushed the distro-specific-mappings branch from 2135d02 to 26f88a1 Compare June 3, 2026 15:53
@matejmatuska

Copy link
Copy Markdown
Member Author

lgtm. I would just bump the version to 2.0.0 but it seems ok otherwise. Postponing the approval & merge until the rest of the code is prepared for the change. also, with the change, I am thinking that this file should be symlink to a dir, where we will have versioned filenames, so people can check the validity of the file for various versions of our packages.

@pirat89 Ok I bumped the version and also pulled the other version from history, now there is a file for each version same as for the report schema. I added symlinks to the latest ones, see the new commit. I didn't move them to a dir, but we could (and also for report schema).

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.

2 participants