Skip to content

Conversation

josibake
Copy link
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)

josibake added 2 commits July 20, 2022 15:51
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
take the hardcoded list out of the readme. this way, we only need to
update the script as new tags are added
@Sjors
Copy link
Member

Sjors commented Jul 20, 2022

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:

if [ -n "$PREVIOUS_RELEASES_TO_DOWNLOAD" ]; then
CI_EXEC test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR" "${PREVIOUS_RELEASES_TO_DOWNLOAD}"
fi

@josibake
Copy link
Member Author

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)

Copy link
Member

@Sjors Sjors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK 63a6c8b modulo bash issue, and assuming the previous releases CI is green.

@josibake josibake force-pushed the josibake-update-get-previous-releases-script branch from 63a6c8b to 21a9e94 Compare July 21, 2022 10:02
@josibake
Copy link
Member Author

force pushed to address feedback from @Sjors ; git range-diff master 63a6c8b 21a9e94

@Sjors
Copy link
Member

Sjors commented Aug 5, 2022

re-tACK 21a9e94

@maflcko maflcko merged commit 7d82f86 into bitcoin:master Aug 5, 2022
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Aug 5, 2022
@fanquake fanquake added this to the 24.0 milestone Sep 15, 2022
theStack added a commit to theStack/bitcoin that referenced this pull request Nov 28, 2022
This is a small follow-up to bitcoin#25650 (commit
614d468) with three fixes/improvements:

- fix "Checksum did not match" detection, which was not adapted to the new
  SHA256_SUMS structure and hence never executed (the list of tarball
  names isn't directly in the dictionary's values anymore, but has to be
  extracted from the 'tarball' field of each value)
- make both help text and default tag download order deterministic by
  sorting default tags
- "--tags" argument help text: add missing space between "for" and
  "backwards"
maflcko pushed a commit that referenced this pull request Nov 28, 2022
…es.py

9b5feb7 script: small fixups/improvements for get_previous_releases.py (Sebastian Falbesoner)

Pull request description:

  This is a small follow-up to #25650 (commit 614d468) with three fixes/improvements:

  - fix "Checksum did not match" detection, which was not adapted to the new `SHA256_SUMS` structure and hence never executed (the list of tarball names isn't directly in the dictionary's values anymore, but has to be extracted from the `'tarball'` field of each value)
  - make both help text and default tag download order deterministic by sorting default tags
  - `--tags` argument help text: add missing space between "for" and "backwards"

ACKs for top commit:
  Sjors:
    tACK 9b5feb7. Tested that if I change a checksum, or remove a release, it catches that.
  josibake:
    tested ACK 9b5feb7

Tree-SHA512: 791fa693477eebbda7fd41f3f5ec78fe7eab57df06979aa907ab258a6945534bdc3b931ddfce0fb440c9666b98c88ce5e1b6dc353ed39e129e87d3634855165c
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Dec 1, 2022
…_releases.py

9b5feb7 script: small fixups/improvements for get_previous_releases.py (Sebastian Falbesoner)

Pull request description:

  This is a small follow-up to bitcoin#25650 (commit 614d468) with three fixes/improvements:

  - fix "Checksum did not match" detection, which was not adapted to the new `SHA256_SUMS` structure and hence never executed (the list of tarball names isn't directly in the dictionary's values anymore, but has to be extracted from the `'tarball'` field of each value)
  - make both help text and default tag download order deterministic by sorting default tags
  - `--tags` argument help text: add missing space between "for" and "backwards"

ACKs for top commit:
  Sjors:
    tACK 9b5feb7. Tested that if I change a checksum, or remove a release, it catches that.
  josibake:
    tested ACK bitcoin@9b5feb7

Tree-SHA512: 791fa693477eebbda7fd41f3f5ec78fe7eab57df06979aa907ab258a6945534bdc3b931ddfce0fb440c9666b98c88ce5e1b6dc353ed39e129e87d3634855165c
maflcko pushed a commit that referenced this pull request Feb 16, 2023
741908a test: previous releases: add v24.0.1 (Sebastian Falbesoner)

Pull request description:

  The same procedure as every release (see dba1231 [v23.0] and d8b705f [v22.0]), only a little simpler now: thanks to #25650, the previous release fetch script defaults to downloading/building the necessary tags, i.e. we don't need to extend the tag list in the CI scripts and test/README.md anymore.

ACKs for top commit:
  Sjors:
    tACK 741908a

Tree-SHA512: a5426e989bd0bba42aa13e7d4cf60f792bf36bd9a6cdb6ef5799f7574d9a8a20979244627bbd0c6219630367e7fd73bac9e677814bc50233f64592ad035e713e
@bitcoin bitcoin locked and limited conversation to collaborators Sep 15, 2023
@josibake josibake deleted the josibake-update-get-previous-releases-script branch January 26, 2024 10:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants