scikit-build / scikit-ci-addons

Command line tool and a set of scripts useful to help drive CI
http://scikit-ci-addons.readthedocs.org/
Apache License 2.0
5 stars 9 forks source link

BUG: Fix regex for Python FTP links #103

Closed tbirdso closed 1 year ago

tbirdso commented 1 year ago

Fixes a previously-dormant regex issue that resulted in broken Python download links for updated Python versions.

Previous behavior

Regex match appears intended to remove non-numeric characters from requested build such that URL is always <major>.<minor>.<revision> (no platform modifiers, pre/post-release strings, etc). Original regex erroneous required a trailing character for match. With single-digit revision numbers (3.8.6, etc) the capture/replace would fail, but recently updating to double-digit revisions (3.8.10) captured/replaced all but the trailing digit (0), leading to Python download failures such as in https://github.com/InsightSoftwareConsortium/ITKElastix/actions/runs/3388395908/jobs/5633312524

Updated behavior

Numeric major.minor.revision values are capture/replaced and optional trailing characters discarded.

Notes

I am not sure whether this regex matching is actually solving a necessary problem. We specify build numbers directly above and could simply require that no special versions be specified for download. However this fix seemed like the minimum path forward.

cc @thewtex @jcfr

jcfr commented 1 year ago

Thanks @tbirdso

It turns out I just fixed (14 mins ago) this issue in https://github.com/scikit-build/scikit-ci-addons/pull/102/commits/6a14279890255558f2a4ad1351caf4902cab4e98 introduced through https://github.com/scikit-build/scikit-ci-addons/pull/102

It should be integrated in a few minutes.

jcfr commented 1 year ago

I am not sure whether this regex matching is actually solving a necessary problem

This is needed to support specifying version like 3.8.0a2

tbirdso commented 1 year ago

Okay, thanks @jcfr .

jcfr commented 1 year ago

I also just amended the commit to include you as a co-author :pray: :rocket:

image

jcfr commented 1 year ago

Additionally, along with fixing the CI, I added some instructions to help guide maintainers:

image