ci: Lint follow-ups #33776

pull maflcko wants to merge 4 commits into bitcoin:master from maflcko:2511-ci-lint-stuff changing 2 files +57 −18
  1. maflcko commented at 1:30 pm on November 4, 2025: member

    This contains a few follow-ups to #33744:

  2. DrahtBot added the label Tests on Nov 4, 2025
  3. DrahtBot commented at 1:30 pm on November 4, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33776.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK m3dwards, willcl-ark

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  4. maflcko force-pushed on Nov 4, 2025
  5. DrahtBot added the label CI failed on Nov 4, 2025
  6. fanquake commented at 1:57 pm on November 4, 2025: member
  7. DrahtBot removed the label CI failed on Nov 4, 2025
  8. maflcko force-pushed on Nov 7, 2025
  9. ci: Rewrite Bash to check inputs to Python
    This is shorter and easier to read. Also, according to the dev notes,
    Bash should not be used.
    fa0d37a579
  10. ci: Rewrite lint task Bash snippet to Python
    The Bash snippet was shorter, but relying on implicit word splitting
    (see the shellcheck SC2086 warning).
    
    For example, the DOCKER_BUILD_CACHE_ARG shlex.split is now done
    identical to how ci/test/02_run_container.py does it.
    
    Moreover, the Python will hopefully be easier to modify in the future,
    as the dev notes recommend Python over Bash.
    fac4f6de28
  11. maflcko force-pushed on Nov 12, 2025
  12. in .github/workflows/ci.yml:641 in fa213dc40b outdated
    643+              "."
    644+          ]
    645+
    646+          if run(build_cmd, check=False).returncode != 0:
    647+              print(f"Retry building image tag after failure")
    648+              time.sleep(3)
    


    m3dwards commented at 9:40 am on November 13, 2025:
    Missing import time?
  13. in .github/workflows/ci.yml:642 in fa213dc40b
    644+          ]
    645+
    646+          if run(build_cmd, check=False).returncode != 0:
    647+              print(f"Retry building image tag after failure")
    648+              time.sleep(3)
    649+              run(cmd_build)
    


    m3dwards commented at 9:42 am on November 13, 2025:
    Should be build_cmd
  14. m3dwards commented at 9:54 am on November 13, 2025: contributor

    The GHA behaviour of removing annotations from previous runs is very annoying! I experimented with having an upstream job that printed the annotation and having all the other jobs depend on it but again when you rerun a failed downstream job you lose the annotation from the run upstream job.

    It’s a shame that in this PR we have to have the annotation printed many times, one per job, as I think it might drown out other notices. Without knowing exactly how this machine readable annotation is being consumed or experimenting more, I’m not aware of an alternative? I considered storing it as an artefact and having each job check the artefact but I don’t think that works and is also ugly. Third thing I briefly considered is if the PR number could be output as it’s own check run somehow? Probably best to just leave it as it is here!

  15. ci: Retry lint image building once after failure
    The same was done for the other CI tasks in commit fa6aa9f42fa. This may
    guard against intermittent network issues to download the base image or
    packages ...
    faf05d637d
  16. maflcko force-pushed on Nov 13, 2025
  17. maflcko commented at 10:52 am on November 13, 2025: member

    It’s a shame that in this PR we have to have the annotation printed many times, one per job, as I think it might drown out other notices.

    Agree, but I think we can use warning notices to bubble up more important ones.

    Without knowing exactly how this machine readable annotation is being consumed or experimenting more, I’m not aware of an alternative?

    It can be used via the API, e.g. https://github.com/maflcko/DrahtBot/blob/6c91378116516ca5974d78a4e0c5c495b38acf95/webhook_features/src/features/ci_status.rs#L84-L106

    I’ve tried other things, such as task summaries (https://github.com/maflcko/DrahtBot/actions/runs/19115117072?pr=61#summary-54622116294) However, they are not really documented and can’t be retrieved via the API, IIRC.

    Third thing I briefly considered is if the PR number could be output as it’s own check run somehow? Probably best to just leave it as it is here!

    In theory we could hook up Cirrus again (or our own CI “dummy” provider), just to have a single task run via it, to annotate it with the pull number, but this seems more fragile.

    Missing import time? …

    Thx, fixed both. I guess this is the common reminder that a yaml string is the wrong place to put code. All ci code, even snippets, should be in a native file.

  18. ci: Annotate all check runs with the pull request number
    On check re-runs the annotations are discarded, so all check runs
    require the number to be set.
    fae3618fd6
  19. maflcko force-pushed on Nov 13, 2025
  20. DrahtBot added the label CI failed on Nov 13, 2025
  21. DrahtBot removed the label CI failed on Nov 13, 2025
  22. m3dwards commented at 3:52 pm on November 13, 2025: contributor

    Looks good!

    ACK fae3618fd6c82dfcea2f296caa16a79182b32059

  23. willcl-ark approved
  24. willcl-ark commented at 12:04 pm on November 17, 2025: member

    ACK fae3618fd6c82dfcea2f296caa16a79182b32059

    This all seems fine, and I agree python is superior to bash where possible. It is indeed annoying that GH doesn’t persist the annotations, but after also checking myself I can’t think of any better way to do it either.

  25. fanquake merged this on Nov 17, 2025
  26. fanquake closed this on Nov 17, 2025

  27. maflcko deleted the branch on Nov 17, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-12-02 21:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me