#1126 Add "mbs-manager copy_module" for Fedora branching
Closed: Invalid 4 years ago by jkaluza. Opened 5 years ago by jkaluza.

I've talked with @mizdebsk who requested MBS feature for upcoming Fedora branching event. This has been discussed in some modularity meeting with @sgallagh, Mohan and others and has been agreed on.

As I understand it, they want to copy existing F29 modules which "requires: platform:f29" to F30 as part of branching using following method:

1) They would call new "mbs-manager copy_module existing_f29_nsvc".
2) That command would get the MMD of existing_f29_nsvc and do set of transformations using the code written by @sgallagh or other modularity member.
3) That command would then import the module to MBS DB using the same way as import_mmd does it currently. It would have to recompute the "context" before importing.
4) That command would then create CG build the same way as we do it in the end of a build.

The deadline for that is F30 branching which should happen in first few weeks in February.

Possible issues I see here:

1) The MMD transformation is not general between Fedora releases. Right now you want to replace platform:f29 with platform:f30, but will it be written in general way to replace platform:f30 with platform:f31 next time?
2) Where will the MMD transformation code live? @mizdebsk said it might be part of libmodulemd. Is that true?
3) What is the fallback in case the imported modulemd file in CG builds will be broken somehow (being it the MBS issue or transformation code issue)? We cannot re-import them or delete them. They are in Koji forever - we would need to import them with different NVR. This looks like some kind of "dry run" mode is needed to verify we do the good thing on first try.

If I understand that feature wrong, feel free to correct me. I't just what I remember from the discussion with @mizdebsk.


I've talked with @mizdebsk who requested MBS feature for upcoming Fedora branching event. This has been discussed in some modularity meeting with @sgallagh, Mohan and others and has been agreed on.
As I understand it, they want to copy existing F29 modules which "requires: platform:f29" to F30 as part of branching using following method:
1) They would call new "mbs-manager copy_module existing_f29_nsvc".
2) That command would get the MMD of existing_f29_nsvc and do set of transformations using the code written by @sgallagh or other modularity member.

Sure, the transformation is really trivial:

import gi
gi.require_version('Modulemd', '2.0')
from gi.repository import Modulemd

stream = Modulemd.ModuleStream.read_string(yaml_string, True)
deps = stream.get_dependencies()
# post-MBS content has only a single dependencies entry
deps[1].add_runtime_stream('platform', new_platform_version)

# Export the YAML
index = Modulemd.ModuleIndex.new()
index.add_module_stream(stream)
output_yaml = index.dump_to_string()

<snip>

1) The MMD transformation is not general between Fedora releases. Right now you want to replace platform:f29 with platform:f30, but will it be written in general way to replace platform:f30 with platform:f31 next time?

I'm going to leave that up to you and @mohanboddu to figure out. The script excerpt above is of course capable of doing so.

2) Where will the MMD transformation code live? @mizdebsk said it might be part of libmodulemd. Is that true?

No, there's nothing interesting about that snippet that would make it worthwhile to have as a specific function.

<snip>

Just talked with @sgallagh and there is some confusion whether this is really needed in the end.

I think this is not needed in the end. If you don't agree, feel free to reopen.

Metadata Update from @jkaluza:
- Issue close_status updated to: Invalid
- Issue status updated to: Closed (was: Open)

4 years ago

Login to comment on this ticket.

Metadata