Have an application that can cross-check if the promised platforms are correct
ClosedPublic

Authored by apol on Nov 30 2017, 8:20 PM.

Details

Summary

In KDE Frameworks projects (and some others) we have a metainfo.yaml file
that tells us which platforms it's supposed to work on. This is never
checked other than by maintainers.
This tool notifies us about a framework saying that a platform is available
when it's not even part of our CI.

Test Plan
kcompletion: Android is a disabled platform
kcontacts: FreeBSD is a disabled platform
kdewebkit: Linux is a disabled platform
kidentitymanagement: FreeBSD is a disabled platform
syntax-highlighting: Android is a disabled platform

Diff Detail

Repository
R857 CI System Tooling
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
apol requested review of this revision.Nov 30 2017, 8:20 PM
apol created this revision.
dfaure added a subscriber: dfaure.Dec 2 2017, 4:26 PM

Cool stuff, but who will run this tool and when?

Neat. I'm curious as to where it'll be used as well, but otherwise it looks fine to me.

apol added a comment.Dec 3 2017, 9:46 AM

Cool stuff, but who will run this tool and when?

¯\_(ツ)_/¯

Exciting times, isn't it?

My plan was to discuss with sysadmin where to deploy it once we agree it's something we want.
Here, we basically need to agree that it's the right metric to move forward.

In principle I think this code is doing the right thing as it's comparing what's enabled on CI vs. what's enabled in the Framework's own metadata files.
Any comments in that regard David?

adridg added a subscriber: adridg.Dec 8 2017, 10:12 AM

To understand the expected output better: suppose something says "platforms: All", like kcontacts. If there's no actual build configured in CI for that something, for FreeBSD, it will say "FreeBS is a disabled platform". The message can probably be improved, then. And how about checking the reverse, too? CI builds that are not listed in the metainfo? (if that can even happen)

helpers/check-platform.py
16

I think this was just renamed , to Qt5.9 (check with Ben though)

The FreeBSD platform name was changed this week yes. I can't see any explicit handling for 'All' being specified as a platform in the metainfo file here though, unless one is always required to list the platforms explicitly?

apol marked an inline comment as done.Dec 12 2017, 12:47 AM

To understand the expected output better: suppose something says "platforms: All", like kcontacts. If there's no actual build configured in CI for that something, for FreeBSD, it will say "FreeBS is a disabled platform". The message can probably be improved, then.

See new version of the patch, should be better.

And how about checking the reverse, too? CI builds that are not listed in the metainfo? (if that can even happen)

Sure, can be a v2 of the script ;)

apol updated this revision to Diff 23784.Dec 12 2017, 12:48 AM

Wording, FreeBSDQt5.9

This can go in from my perspective, code looks fine from my understanding of it.

In terms of 'All' as a platform, how is that handled? (assuming that's a valid specification in the Frameworks metadata.yaml files)

apol added a comment.Dec 12 2017, 11:41 AM

This can go in from my perspective, code looks fine from my understanding of it.

In terms of 'All' as a platform, how is that handled? (assuming that's a valid specification in the Frameworks metadata.yaml files)

See line 29, if 'all' we replace it with the list of all the platforms we know.

bcooksley accepted this revision.Dec 12 2017, 6:49 PM

Perfect. Lets get this committed.

This revision is now accepted and ready to land.Dec 12 2017, 6:49 PM
This revision was automatically updated to reflect the committed changes.