repomap: support distro-specific target mappings#17
Conversation
| "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"], |
There was a problem hiding this comment.
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 [].
There was a problem hiding this comment.
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.
| "additionalProperties": { | ||
| "type": "array", | ||
| "items": { "$ref": "#/$defs/pesid" } |
There was a problem hiding this comment.
If anyone is unfamiliar with additionalProperties, AFAIK it is the schema for the objects values.
274d12c to
2135d02
Compare
| "title": "Repository Mapping Schema", | ||
| "description": "Repository mapping for OS migrations", | ||
| "version": "1.3.0", | ||
| "version": "1.4.0", |
There was a problem hiding this comment.
@matejmatuska Actually, when I see the change, what about to call it v2.0.0?
pirat89
left a comment
There was a problem hiding this comment.
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
2135d02 to
26f88a1
Compare
@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). |
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