script: default to necessary tags in test/get_previous_releases.py #25650

pull josibake wants to merge 3 commits into bitcoin:master from josibake:josibake-update-get-previous-releases-script changing 4 files +66 −59
  1. josibake commented at 2:00 pm on July 20, 2022: member

    Almost every time I need to use this script, I forget the tag list is needed and that a specific set of tags is needed for the backwards compatibility tests to work. I end up wasting time reading through the script and googling to find the tag list before remembering it is in test/README.md

    I assume (hope) I’m not the only one this happens to, so I figured it would make more sense to have the script default to downloading/building the necessary tags. This has the added benefit of making the script the source of truth: the script already needs to be updated with the SHA256_SUM of the binary for every new tag that is added, so it makes sense to use SHA256_SUMS list as the necessary tag list. This means there is less risk of the README and the script drifting (i.e updating the readme with a new tag and forgetting to update the script, or updating the script and forgetting to update the README). Now all that needs to happen is to update the SHA256_SUMS list in the script and everything Just Works (TM)

  2. script: default to necessary tags in get_previous_releases.py
    in order to run the backwards compatibility tests, specific releases are needed.
    previously, the list of tags was in test/README.md, but it makes more sense to
    have them as the default list in script
    614d4682ba
  3. doc: update test/README.md
    take the hardcoded list out of the readme. this way, we only need to
    update the script as new tags are added
    d530ba390e
  4. Sjors commented at 3:04 pm on July 20, 2022: member

    Concept ACK. It should be possible to drop PREVIOUS_RELEASES_TO_DOWNLOAD in https://github.com/bitcoin/bitcoin/blob/master/ci/test/00_setup_env_native_qt5.sh

    Though you still need to define something so it’s only run for the correct build: https://github.com/bitcoin/bitcoin/blob/fcde5d130029ab52a1365ef43a143d9e8d623017/ci/test/05_before_script.sh#L50-L52

  5. fanquake added the label Scripts and tools on Jul 20, 2022
  6. josibake commented at 4:29 pm on July 20, 2022: member

    It should be possible to drop PREVIOUS_RELEASES_TO_DOWNLOAD

    thanks for pointing this out! i was not aware the tags were also hardcoded in the ci scripts (even more motivation to have a single source of truth). i added the ci changes in their own commit, but do let me know if there is a better way to go about making code changes + ci changes (doing them in the same PR feels a little weird to me)

  7. in ci/test/05_before_script.sh:50 in 63a6c8b2f2 outdated
    46@@ -47,6 +47,6 @@ if [ -z "$NO_DEPENDS" ]; then
    47   fi
    48   CI_EXEC "$SHELL_OPTS" make "$MAKEJOBS" -C depends HOST="$HOST" "$DEP_OPTS" LOG=1
    49 fi
    50-if [ -n "$PREVIOUS_RELEASES_TO_DOWNLOAD" ]; then
    51-  CI_EXEC test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR" "${PREVIOUS_RELEASES_TO_DOWNLOAD}"
    52+if [ -n "$DOWNLOAD_PREVIOUS_RELEASES" ]; then
    


    Sjors commented at 4:49 pm on July 20, 2022:
    This should probably be if [ "$DOWNLOAD_PREVIOUS_RELEASES" = "true" ], otherwise it will run when you set false too.

    josibake commented at 10:02 am on July 21, 2022:
    fixed
  8. Sjors commented at 4:53 pm on July 20, 2022: member
    tACK 63a6c8b2f296995e2e945aa49355dae5541901cd modulo bash issue, and assuming the previous releases CI is green.
  9. ci: remove hardcoded tag list from ci scripts 21a9e94dbb
  10. josibake force-pushed on Jul 21, 2022
  11. josibake commented at 10:04 am on July 21, 2022: member
    force pushed to address feedback from @Sjors ; git range-diff master 63a6c8b 21a9e94
  12. Sjors commented at 8:35 am on August 5, 2022: member
    re-tACK 21a9e94dbbc47939f19fbfe39d85cb8ff2ea206a
  13. maflcko merged this on Aug 5, 2022
  14. maflcko closed this on Aug 5, 2022

  15. sidhujag referenced this in commit 19fea5d6ef on Aug 5, 2022
  16. fanquake added this to the milestone 24.0 on Sep 15, 2022
  17. theStack referenced this in commit 9b5feb76bc on Nov 28, 2022
  18. maflcko referenced this in commit 5939794940 on Nov 28, 2022
  19. sidhujag referenced this in commit a807bc429f on Dec 1, 2022
  20. maflcko referenced this in commit 3a68e194f5 on Feb 16, 2023
  21. bitcoin locked this on Sep 15, 2023
  22. josibake deleted the branch on Jan 26, 2024


josibake Sjors

Labels
Scripts and tools

Milestone
24.0


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-09-29 01:12 UTC

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