Add script to check the ABI of the created libraries.
ClosedPublic

Authored by knauss on Nov 1 2018, 2:16 PM.

Details

Summary

We use abi-compliance-checker (acc) to create reports for the ABI compliance.
This scripts uses the current git hash and searches for the oldest
available library version with the same SONAME to check against.
acc creates reports at:
compat_reports/{libname}/{v1}_to_{v2}/compat_report.html

Diff Detail

Repository
R857 CI System Tooling
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 4647
Build 4665: arc lint + arc unit
knauss requested review of this revision.Nov 1 2018, 2:16 PM
knauss created this revision.
knauss added inline comments.
helpers/check-abi.py
84

D16581 should make it possiible to get rid of the creation/removal symlinks.

bcooksley added inline comments.Nov 2 2018, 5:47 AM
helpers/check-abi.py
84

That change has now been landed.

knauss updated this revision to Diff 44891.Nov 5 2018, 11:20 AM
  • run for all libraries, do not stop at first failure.
  • safe comapt_reports to a place where it is accessible by jenkins for artifacts.
  • cleanup script.
knauss added inline comments.Nov 5 2018, 11:55 AM
helpers/check-abi.py
94

https://build-artifacts.kde.org/production/ABIReference/ still has .tar files (not cleaned up), so I need still to create the the symlinks)

knauss updated this revision to Diff 44898.Nov 5 2018, 12:34 PM

cleanup if we store .abidump files in build-artifacts.

knauss marked 3 inline comments as done.Nov 5 2018, 6:58 PM

than we have no blockers anymore.

@bcooksley: than you can review it more closely as it is ready from my side.

Sure thing.

Have you had any thoughts on how to best split by branch? The path of least resistance would be to use the branchGroup when storing and doing lookups.

helpers/check-abi.py
52

This tool is designed to run after the ABI information capture script I assume?

58

Any ideas on how to solve this issue?

Wouldn't one possibility be to only capture ABI reference data from a special job that focuses on building the released version of software being tracked by this?

65

whant -> want

67

interessed -> interested

70

Won't this cause a KeyError because while referenceLibraries[libname] will exist (due to the code on line 59, assuming I understand that correctly), the key underneath it doesn't seem to have been populated? (unless i'm missing something of course)

knauss updated this revision to Diff 44959.Nov 6 2018, 12:10 PM
knauss marked 4 inline comments as done.

Fixed bcooksley issues.

knauss added inline comments.Nov 6 2018, 12:10 PM
helpers/check-abi.py
52

yes added this to description.

70

Okay I made it hard to understand, because I use the name "key" but it is actually not the key of the dict. Let me rephrase it.

knauss updated this revision to Diff 44980.Nov 6 2018, 7:01 PM

add logic to find the last released version of a library.

knauss marked an inline comment as done.Nov 6 2018, 7:11 PM

After thinking more about it I implement the whole logic different.

The check-abi script searches for all included released versions ( git tag --contains $scmRevision) . The best candidate is the oldest released version of the library and falls back to the oldest commit.
The new class Versions helps sorting the versions correctly. If you know already available class I can switch to it.

knauss updated this revision to Diff 44990.Nov 6 2018, 9:07 PM

just a small update.

For the version parser, could you comment the various functions to explain what the various bits of the functions are trying to accomplish?
(For easier reading later on)

helpers/check-abi.py
81

Sorry, missed this on my earlier review - you can't rely on the output of git branch to tell you which branch we've checked out. You'll want to read the same branchGroup parameter the other scripts rely on.

knauss updated this revision to Diff 45108.Nov 8 2018, 10:56 AM

add documentation to Version and replace branch with branchGroup.

knauss marked 3 inline comments as done.Nov 8 2018, 10:57 AM

One last thing, otherwise this looks good to go to me.

helpers/check-abi.py
124

I would suggest simply comparing arguments.branchGroup against the entry['branchGroup'] here in case we end up adding a third branch group at some point.

knauss added inline comments.Nov 10 2018, 8:37 AM
helpers/check-abi.py
124

You mean:

if stableBuild and entry["branchGroup"] != arguments.branchGroup :
knauss updated this revision to Diff 45254.Nov 10 2018, 10:17 PM
knauss marked 2 inline comments as done.

rename stableBuild -> keepBranchGroup.

knauss updated this revision to Diff 45257.Nov 10 2018, 10:33 PM

Only work on correct platform.

bcooksley accepted this revision.Nov 11 2018, 6:06 AM
This revision is now accepted and ready to land.Nov 11 2018, 6:06 AM
This revision was automatically updated to reflect the committed changes.