ci: Run fuzzer task for the master branch only #22730

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:210817-ci-fuzz changing 1 files +1 −0
  1. hebasto commented at 3:09 pm on August 17, 2021: member

    #22629 (comment):

    I think we need to decide whether running the fuzzer CI in any branch other than master is something we want to be doing / maintaining. This seems pretty unsustainable unless we at least make changes in regards to the fuzz inputs being used by the different branches. I’m pretty sure Marco has mentioned this before.

    This PR makes CI ignore fuzz tests by forcing RUN_FUZZ_TESTS=false for all cases when it is not the master branch or a PR based on it.

    See #22731 as a demo for the 22.x branch.

  2. DrahtBot added the label Tests on Aug 17, 2021
  3. hebasto commented at 6:12 pm on August 17, 2021: member
  4. Zero-1729 commented at 0:36 am on August 18, 2021: contributor

    Concept ACK

    if [ “${CIRRUS_BRANCH}” == “${CIRRUS_DEFAULT_BRANCH}” ] || [ “${CIRRUS_BASE_BRANCH}” == “${CIRRUS_DEFAULT_BRANCH}” ]; then

    I think the second condition where it checks if the PR is based on the master branch should also include an additional check to see if the PR affects the fuzzing system, to narrow it down (i.e. like checking the CIRRUS_CHANGE_TITLE to see if the PR’s title is prepended with fuzz: for example, or contains the word fuzz elsewhere in the title). What do you think @hebasto?

  5. fanquake commented at 2:20 am on August 18, 2021: member

    I think the second condition where it checks if the PR is based on the master branch should also include an additional check to see if the PR affects the fuzzing system, to narrow it down (i.e. like checking the CIRRUS_CHANGE_TITLE to see if the PR’s title is prepended with fuzz: for example, or contains the word fuzz elsewhere in the title).

    That sounds broken / over-complicated. On the master branch the fuzzers should be running on all commits, regardless of if the change is to the fuzzers themselves, or has a certain commit prefix. All we want to do is exclude branches other than master.

  6. Zero-1729 commented at 3:35 am on August 18, 2021: contributor

    Ah, thanks for the clarification! Seems I misunderstood the OP.

    In that case, ignore my comment, the change looks good to go.

  7. Zero-1729 commented at 3:36 am on August 18, 2021: contributor
    crACK cac87edab2acbccaa28d46ca0aa3b03ad770a6cc
  8. MarcoFalke commented at 5:09 am on August 18, 2021: member

    Ideally the fuzzers would run on all branches, it is just that my personal efforts are focussed on the master branch. While the fuzzers should run on older branches, I won’t be working on this actively myself.

    About the changes: The changes here won’t disable the fuzzers when built locally or run in CI locally. If the goal is to disable the fuzz task in our Cirrus CI, it might be better to just do that in the cirrus.yml and not by putting CI-specific symbols (CIRRUS_*) in our CI-agnostic scripts (./ci).

  9. hebasto force-pushed on Aug 18, 2021
  10. hebasto commented at 9:34 am on August 18, 2021: member

    Updated cac87edab2acbccaa28d46ca0aa3b03ad770a6cc -> fa2234fb70d4b889dd0c3ee4de9fa2afbec0af14 (pr22730.01 -> pr22730.02).

    Addressed @MarcoFalke’s comment:

    If the goal is to disable the fuzz task in our Cirrus CI, it might be better to just do that in the cirrus.yml and not by putting CI-specific symbols (CIRRUS_*) in our CI-agnostic scripts (./ci).

  11. hebasto force-pushed on Aug 18, 2021
  12. hebasto force-pushed on Aug 18, 2021
  13. hebasto force-pushed on Aug 18, 2021
  14. laanwj commented at 3:38 pm on August 18, 2021: member
    Concept ACK, although in theory it’d make sense to fuzz some things across versions, I agree in practice it’s unmaintainable, it trips up the CI for unrelated reasons too often.
  15. hebasto force-pushed on Aug 18, 2021
  16. ci: Run fuzzer task for the master branch only 5a9e255e5a
  17. in .cirrus.yml:45 in 2606ac6b22 outdated
    41@@ -42,7 +42,7 @@ global_task_template: &GLOBAL_TASK_TEMPLATE
    42   depends_built_cache:
    43     folder: "depends/built"
    44   ci_script:
    45-    - ./ci/test_run_all.sh
    46+    - if [ "${CIRRUS_BRANCH}" != "${CIRRUS_DEFAULT_BRANCH}" ] && [ "${CIRRUS_BASE_BRANCH}" != "${CIRRUS_DEFAULT_BRANCH}" ]; then export RUN_FUZZ_TESTS="false"; fi && source ./ci/test_run_all.sh
    


    MarcoFalke commented at 5:07 pm on August 18, 2021:
    I meant that the whole task can be skipped. Compilation will be checked by the other tasks already and there is nothing else done, no?

    hebasto commented at 5:22 pm on August 18, 2021:

    Right. And this approach has one line diff :)

    Done in the recent push.

  18. hebasto force-pushed on Aug 18, 2021
  19. hebasto renamed this:
    ci: Run fuzz tests for the master branch only
    ci: Run fuzzer task for the master branch only
    on Aug 18, 2021
  20. MarcoFalke commented at 5:24 pm on August 18, 2021: member
    cr ACK 5a9e255e5a324e7aa0b63a9634aa3cfda9a300bd no opinion on the concept, also didn’t test
  21. hebasto commented at 5:25 pm on August 18, 2021: member

    … also didn’t test

    #22731 could be useful.

  22. fanquake approved
  23. fanquake commented at 7:16 am on August 20, 2021: member
    ACK 5a9e255e5a324e7aa0b63a9634aa3cfda9a300bd - didn’t test other than to look at #22731.
  24. fanquake merged this on Aug 20, 2021
  25. fanquake closed this on Aug 20, 2021

  26. hebasto commented at 7:22 am on August 20, 2021: member

    @fanquake

    Backport to 22.0 (and drop all other CI fuzz task fixes)?

  27. fanquake commented at 7:23 am on August 20, 2021: member

    Backport to 22.0 (and drop all other CI fuzz task fixes)?

    #22629 (comment)

  28. fanquake added the label Needs backport (22.x) on Aug 20, 2021
  29. hebasto deleted the branch on Aug 20, 2021
  30. hebasto referenced this in commit e9d30fbb3a on Aug 20, 2021
  31. hebasto commented at 7:38 am on August 20, 2021: member
    Backported to 22.x in #22629.
  32. hebasto removed the label Needs backport (22.x) on Aug 20, 2021
  33. sidhujag referenced this in commit a34da59b05 on Aug 20, 2021
  34. laanwj referenced this in commit 4a25e39624 on Aug 26, 2021
  35. hebasto commented at 8:15 pm on August 26, 2021: member

    @fanquake @MarcoFalke

    Backport to 0.21?

  36. hebasto referenced this in commit 2d7f2606c1 on Aug 27, 2021
  37. hebasto commented at 6:57 am on August 27, 2021: member
    Backported to 0.21 in #22808.
  38. fujicoin referenced this in commit 2fcb616a43 on Aug 27, 2021
  39. fanquake referenced this in commit 6ebb9d0e46 on Aug 28, 2021
  40. fanquake commented at 1:12 pm on February 21, 2022: member
    Reverted in #24292.
  41. gwillen referenced this in commit 88f7536b80 on Jul 27, 2022
  42. gwillen referenced this in commit 8ec2c4fed5 on Aug 1, 2022
  43. DrahtBot locked this on Feb 21, 2023

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: 2024-11-17 12:12 UTC

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