#1437 Format of module defaults file (and bonus documentation problems)
Closed: Invalid by jkaluza. Opened by mbooth.

I just had this conversation:

[11:35:22] <mbooth> Hi all, I submitted some PRs to https://pagure.io/releng/fedora-module-defaults/pull-requests
[11:35:31] <mbooth> But I do not know what the Jenkins failures mean
[11:35:35] <mbooth> Any clues?
[11:43:28] <mizdebsk> eclipse.yaml has changed but the 'modified' field has not increased.
[11:43:34] <mizdebsk> mbooth, you need to set "modified" field
[11:44:06] <mbooth> mizdebsk: https://docs.fedoraproject.org/en-US/modularity/making-modules/managing-defaults/ <- Is there some other place where this is documented?
[11:44:38] <mbooth> How can I know what I need to change?
[11:45:00] <mbooth> And what do I put in the modified field?
[11:45:18] <mbooth> mizdebsk: A date-time? Timestamp? Something else?
[11:45:32] <mizdebsk> mbooth, https://github.com/fedora-modularity/libmodulemd/blob/master/mod-defaults/spec.v1.yaml#L12
[11:45:50] <mbooth> mizdebsk: And that doc even says the field is optional!
[11:46:15] <mizdebsk> mbooth, it is optional, default value is 0
[11:46:40] <mizdebsk> mbooth, when modifying defaults you should increment "modified" value, so it can't be zero any longer and it is no longer default
[11:46:48] <mizdebsk> i hope that makes sense
[11:46:40] <mbooth> mizdebsk: It's optional, but is required, got it :-)
[11:47:15] <mizdebsk> it is optional an long as you never modify defaults :)
[11:47:29] <mizdebsk> when you want to modify defaults, modified field becomes mandatory
[11:47:28] * mbooth sighs
[11:47:54] <mbooth> So much secret knowlege

Apart from the problem trying to divine all the assumed knowlege about the system from people in IRC, which is just a documentation problem, and apart from the fact that the optional modified field is not actually optional (it is required, but just has a default value if not set explicitly), which is another documentation problem, the whole concept of modified seems completely pointless to me -- maybe someone can explain.

I feel like a modification time is already stored in the file's mtime and so it seems silly to make me and my error prone human brain add it a second time manually. So why require such unreliable duplication of information? The reason is not obvious to me.


Hi,

the module defaults file format is not defined by MBS team, we also only consume it. I've asked @sgallagh on IRC to advise me where your requests should be filled/moved :).

Feel free to continue the discussion here, but MBS developers cannot evaluate or decide your change request.

@mbooth The mtime of the file is not preserved when cloning the git repository. So every checkout would treat all of the files as if they were modified just now. This would be a problem for layered repositories like EPEL, since the modified time determines which of two default streams should "win". We'd end up with whichever repo composed most recently being the winner.

The longer-term answer is that we really don't want people to be sending PRs to that repo. When I get a few spare cycles, I'm going to create a simple UI to make the requests instead. This will handle setting the modified field appropriately without user intervention.

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

I'm closing this one so it does not appear in our backlog. Feel free to continue discussing the issue here, but as I stated earlier, MBS project cannot influence the file format of module defaults.

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/mbs/issues/1437

Please continue any further discussion there.

Metadata