ci: Use DOCKER_BUILDKIT for lint image #28083

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2307-ci-lint-docker-build- changing 7 files +47 −58
  1. maflcko commented at 11:01 AM on July 16, 2023: member

    Currently the lint docker/podman image has many issues:

    • It relies on an EOL debian version.
    • It relies on a debian version different from the one used in the CI lint task.
    • It relies on the legacy docker build command, which requires the user to make cd ./ci/lint/ before the build step.
    • It doesn't use the .python-version file, but a hardcoded version.

    Fix all issues by using the recommended DOCKER_BUILDKIT=1 to generate the image.

    Also:

    • Rename /tmp/python to /python_build.
    • Compress all pip install commands into one.
    • Bump .python-version.
  2. DrahtBot commented at 11:01 AM on July 16, 2023: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK jamesob

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #28076 (util: Replace std::filesystem with util/fs.h by MarcoFalke)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  3. DrahtBot added the label Tests on Jul 16, 2023
  4. ci: Use DOCKER_BUILDKIT for lint image
    Can be reviewed with:
    --color-moved=dimmed-zebra  --ignore-all-space
    fa2f18ad8e
  5. maflcko force-pushed on Jul 16, 2023
  6. DrahtBot added the label CI failed on Jul 16, 2023
  7. DrahtBot removed the label CI failed on Jul 16, 2023
  8. jamesob approved
  9. jamesob commented at 3:25 PM on July 18, 2023: member

    ACK https://github.com/bitcoin/bitcoin/pull/28083/commits/fa2f18ad8e386f067c2d7d5362f6b4dd84c295a0

    Built the new linter container locally, verified it works as before. Change definitely simplifies things thanks to BUILDKIT.

    Curiously, when I exercised the linter (by adding an unused variable to test/functional/feature_dbcrash.py), running the linter with docker run --rm -v $(pwd):/bitcoin -w /bitcoin -it bitcoin-linter didn't actually return a non-zero error code:

    11:18:54 james@tacoma src/bitcoin (? ackr/28083.1.MarcoFalke.ci_use_docker_buildkit_f fa2f18a) % docker run --rm -v $(pwd):/bitcoin -w /bitcoin -it bitcoin-linter
    
    src/crypto/ctaes in HEAD currently refers to tree 1b6c31139a71f80245c09597c343936a8e41d021
    src/crypto/ctaes in HEAD was last updated in commit 8501bedd7508ac514385806e191aec21ee978891 (tree 1b6c31139a71f80245c09597c343936a8e41d021)
    GOOD
    src/secp256k1 in HEAD currently refers to tree 375f60db0c4a41474d0e7c2464fae64c1ba712a4
    src/secp256k1 in HEAD was last updated in commit 901336eee751de088465e313dd8b500dfaf462b2 (tree 375f60db0c4a41474d0e7c2464fae64c1ba712a4)
    GOOD
    src/minisketch in HEAD currently refers to tree a749309e1b4edf48091edb57da6de2e8a16498a5
    src/minisketch in HEAD was last updated in commit e9f1d8c27261070d209a28570ad36fe91531cdd2 (tree a749309e1b4edf48091edb57da6de2e8a16498a5)
    GOOD
    src/leveldb in HEAD currently refers to tree bd49d3c60051c1a8d8f030fa4ba7a29237fe7479
    src/leveldb in HEAD was last updated in commit 1a463c70a368fb20316e03efac273438cf47baa3 (tree bd49d3c60051c1a8d8f030fa4ba7a29237fe7479)
    GOOD
    src/crc32c in HEAD currently refers to tree 5a1b5f7188bd2181e2a71d431fff282d50058e46
    src/crc32c in HEAD was last updated in commit 08269e54a9a74e06c9fb72720a216d8c4d4532a2 (tree 5a1b5f7188bd2181e2a71d431fff282d50058e46)
    GOOD
    Args used        : 209
    Args documented  : 220
    Args undocumented: 0
    set()
    Args unknown     : 11
    {'-zmqpubhashblockhwm', '-zmqpubrawtx', '-zmqpubhashtxhwm', '-zmqpubhashblock', '-zmqpubsequence', '-zmqpubrawblock', '-zmqpubsequencehwm', '-zmqpubrawtxhwm', '-zmqpubhashtx', '-includeconf', '-zmqpubrawblockhwm'}
    test/functional/feature_dbcrash.py:56:9: F841 local variable 'a' is assigned to but never used
    ^---- failure generated from lint-python.py
    
    11:19:44 james@tacoma src/bitcoin (?± ackr/28083.1.MarcoFalke.ci_use_docker_buildkit_f fa2f18a) % echo $?
    
    0
    

    Though I think this is an issue unrelated to this PR. (Returning 0 as an error code here prevents using the linter usefully within git hooks.)

  10. fanquake merged this on Jul 18, 2023
  11. fanquake closed this on Jul 18, 2023

  12. maflcko deleted the branch on Jul 19, 2023
  13. maflcko commented at 9:44 AM on July 19, 2023: member
  14. sidhujag referenced this in commit a6f46bc94d on Jul 19, 2023
  15. fanquake referenced this in commit d23fda0584 on Jul 20, 2023
  16. sidhujag referenced this in commit 632295996c on Jul 21, 2023
  17. bitcoin locked this on Jul 21, 2024

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: 2026-04-24 06:14 UTC

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