Skip to content
Snippets Groups Projects

CI: apkbuild-linting: Use a single invocation

Merged Imported Administrator requested to merge feature/one-call-to-lint-them-all into master
All threads resolved!

This replaces the current loop calling pmbootstrap lint once for each package with a single invocation for increased performance.

Here are some measurements for linting all packages under main/.

Before this change:

$ time .gitlab-ci/apkbuild-linting.py > /dev/null

real    3m55,840s
user    3m48,592s
sys     0m16,913s

After this change but without postmarketOS/pmbootstrap!2100:

$ time .gitlab-ci/apkbuild-linting.py > /dev/null

real    0m14,359s
user    0m17,994s
sys     0m6,488s

After this change with postmarketOS/pmbootstrap!2100:

$ time .gitlab-ci/apkbuild-linting.py > /dev/null

real    0m6,411s
user    0m13,334s
sys     0m2,417s

Note that postmarketOS/pmbootstrap!2100 is not required for that little bit of extra performance but rather because it allows to differentiate between linting errors for different packages in the output.

Linting issues are still only printed at the end and not while they stream in. However, the performance increase is so massive that this probably doesn't make a huge difference anymore.

Depends: postmarketOS/pmbootstrap!2100

Closes: #564 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Administrator added ci type::feature labels · Imported

    added ci type::feature labels

  • Author Owner

    wow, nice improvement. I think the vast majority of merge requests just touch 1 or two packages (and not entire directories of packages like in your test), but I think the code changes here simplify things a lot, and it's a lot nicer than invoking pmbootstrap multiple times when only a single call is enough.

    By clayton craft on 2021-08-30T15:37:05

  • Administrator approved this merge request · Imported

    approved this merge request

    By clayton craft on 2021-08-30T15:37:07

  • Author Owner

    So does this have a hard dependency on pmbootstrap!2100 (merged) or this can be merged first?

    By Alexey Min on 2021-09-01T08:48:47

  • Author Owner

    I think it's a hard dependency in that if we merge this before pmbootstrap!2100 (merged) is merged (and released?), then you won't be able to differentiate between packages in the output.

    With both changes, it'll look like this:

    MP:[AL32]:./cross/arch-bin-masquerade/APKBUILD:37:unnecessary usage of braces: ${_bin}
    MP:[AL32]:./cross/arch-bin-masquerade/APKBUILD:37:unnecessary usage of braces: ${_hostspec}
    MC:[AL29]:./temp/arm-trusted-firmware/APKBUILD:12:$pkgname should not be used in the source url
    MP:[AL32]:./cross/ccache-cross-symlinks/APKBUILD:31:unnecessary usage of braces: ${_bin}

    Without pmbootstrap!2100 (merged), it'll look like this:

    MP:[AL32]:./APKBUILD:37:unnecessary usage of braces: ${_bin}
    MP:[AL32]:./APKBUILD:37:unnecessary usage of braces: ${_hostspec}
    MC:[AL29]:./APKBUILD:12:$pkgname should not be used in the source url
    MP:[AL32]:./APKBUILD:31:unnecessary usage of braces: ${_bin}

    By Johannes Marbach on 2021-09-01T08:59:44

    Edited by Ghost User
  • Administrator approved this merge request · Imported

    approved this merge request

    By Dylan Van Assche on 2021-09-05T16:23:02

  • Administrator resolved all threads · Imported

    resolved all threads

    By clayton craft on 2021-09-11T02:35:12

  • Administrator approved this merge request · Imported

    approved this merge request

    By Alexey Min on 2021-09-11T03:38:50

  • Administrator added 61 commits · Imported

    added 61 commits

    • 396da6a7...093488b8 - 60 commits from branch postmarketOS:master
    • 14d2eda4 - CI: use a single invocation for apkbuild linting (MR 2472)

    Compare with previous version

    By Alexey Min on 2021-09-11T03:40:43

  • Administrator merged · Imported

    merged

Please register or sign in to reply
Loading