Project

Profile

Help

Issue #6214

closed

Module dependency metadata is stored in an overly-simplified format

Added by dalley over 4 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 67
Quarter:

Description

The dependency segment of the module metadata is stored in the database as follows:

            "dependencies": {                                                                                                                                                                                                                 
                "ant": [                                                                                                                                                                                                                      
                    "1.10"                                                                                                                                                                                                                    
                ],                                                                                                                                                                                                                            
                "maven": [                                                                                                                                                                                                                    
                    "3.5"                                                                                                                                                                                                                     
                ],                                                                                                                                                                                                                            
                "platform": [                                                                                                                                                                                                                 
                    "f31"                                                                                                                                                                                                                     
                ]                                                                                                                                                                                                                             
            },     

(example from the eclipse module from fedora 31 modular release repo)

I think this is over-simplified slightly. I think module stream is allowed to have different dependencies on different platforms. The "platform" key of the dictionary is used as a tag for the dictionary of dependencies, meaning "the dependencies listed on this dict apply to each of these platforms".

This means that the outer level of the dependencies should be a list, not a dict. This is the way it is stored in Pulp 2.

For this same module, Pulp 2 stores it as:

"dependencies": [
    {
        "maven": [
            "3.5"
        ],
        "platform": [
            "f31"
        ],
        "ant": [
            "1.10"
        ]
    },
]

I think that flattening out the dependencies as we have done is incorrect. It's difficult to say for sure because I can't find any modules that have different dependencies on different platforms, or even different values for platform to begin with.

In any case, part of the Pulp 2 depsolving algorithm (which I am copying to Pulp 3) is built around this format, and it was originally copied from Module Build Service code, which also works this way. But since a data migration to un-flatten this might be painful (depending on whether multi-platform module streams actually exist), and changing the algorithm is probably unwise, we should pause and try to figure out how exactly the metadata is supposed to work (if anybody knows).

Also available in: Atom PDF