#3 Get metadata for split/stripped composes from PDC, only correct the paths
Closed 7 years ago Opened 7 years ago by adamwill.

fedfind currently has a broad split between two codepaths:

  • For Pungi 4 composes which are not messed with and have their metadata, we get pretty much all the information from the compose metadata

  • For pre-Pungi 4 composes (old stable releases) and Pungi 4 composes that have their contents messed around and their metadata removed (modern stable and milestone releases), we basically discover the image files somehow, and construct Pungi 4-style metadata by inferring properties from the file names

There is a potential improvement to the latter approach for the case where the compose was run with Pungi 4 and imported to PDC, but subsequently had its contents messed with and the metadata stripped. We could use the image file discovery code to decide what images are actually still present and for their path property, as those are the things that may differ from the original, un-munged compose. But the other properties of the images that remain should still be identical to the original, un-munged compose.

So instead of trying to re-construct these properties from the path name, we could simply figure out what the compose ID and/or label of the compose originally was (we may already do this, I forget) and retrieve the image metadata for that compose from PDC, then just filter out any images that were entirely removed, correct the 'path' and 'alt' properties, and leave other properties untouched. This should be more reliable and give us more information than the 'metadata synthesis' approach, for composes it would work for. We'd still need the 'metadata synthesis' approach for pre-PDC composes.


The pdc-metadata feature branch has an initial implementation of this, which seems to work OK. I'm still thinking it through, and still need to write tests.

This is now merged and released (@mkrizek had a clear use for it, so I went ahead and finished it up and landed it; the enhanced functionality is worth the complexity).

@adamwill changed the status to Closed

7 years ago

Login to comment on this ticket.

Metadata