conda-forge / openmpi-feedstock

A conda-smithy repository for openmpi.
BSD 3-Clause "New" or "Revised" License
9 stars 22 forks source link

Package url seems to become invalid #115

Closed leofang closed 1 year ago

leofang commented 1 year ago
$ wget https://www.open-mpi.org/software/ompi/v4/downloads/openmpi-4.1.4.tar.bz2
--2023-01-24 07:55:18--  https://www.open-mpi.org/software/ompi/v4/downloads/openmpi-4.1.4.tar.bz2
Resolving www.open-mpi.org (www.open-mpi.org)... 18.155.202.77, 18.155.202.17, 18.155.202.46, ...
Connecting to www.open-mpi.org (www.open-mpi.org)|18.155.202.77|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://download.open-mpi.org/release/open-mpi/v4/openmpi-4.1.4.tar.bz2 [following]
--2023-01-24 07:55:19--  https://download.open-mpi.org/release/open-mpi/v4/openmpi-4.1.4.tar.bz2
Resolving download.open-mpi.org (download.open-mpi.org)... 18.155.202.69, 18.155.202.13, 18.155.202.95, ...
Connecting to download.open-mpi.org (download.open-mpi.org)|18.155.202.69|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2023-01-24 07:55:19 ERROR 403: Forbidden.

$ wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.4.tar.bz2
--2023-01-24 07:56:20--  https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.4.tar.bz2
Resolving download.open-mpi.org (download.open-mpi.org)... 18.155.202.69, 18.155.202.13, 18.155.202.95, ...
Connecting to download.open-mpi.org (download.open-mpi.org)|18.155.202.69|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10042839 (9.6M) [binary/octet-stream]
Saving to: ‘openmpi-4.1.4.tar.bz2’

openmpi-4.1.4.tar.bz2               100%[==================================================================>]   9.58M  46.2MB/s    in 0.2s    

2023-01-24 07:56:20 (46.2 MB/s) - ‘openmpi-4.1.4.tar.bz2’ saved [10042839/10042839]
dalcinl commented 1 year ago

I guess we just need to update the URL in the conda recipe. If you look at https://www.open-mpi.org/software/ompi/v4.1/, looks like all the download links are updated.

@jsquyres Was this change intentional? No objections, just FYI.

jsquyres commented 1 year ago

I don't think we've ever intentionally supported .../ompi/v4/downloads/... -- it's always been v4.0 and v4.1.

We do have some regexp-based rewrite rules that redirect you from www.open-mpi.org to downloads.open-mpi.org (our CDN). These rules might accidentally be loose enough to redirect from www.open-mpi.org/.../v4/... to downloads.open-mpi.org/.../v4/... without realizing that v4 isn't valid.

If v4 did previously work as a directory name, I'm guessing it was a mistake...? It's ambiguous -- there's really no good way to know if you meant the v4.0.x series or the v4.1.x series.

leofang commented 1 year ago

Thanks, guys. Like Lisandro noted, no complaints/objections for the change 🙂 I opened this as a reminder (and I thought I assigned to myself, but apparently I forgot!), because the conda-forge bot relies on a valid url so that it can probe whether a new release is out, and if the url is invalid we lose this capability and we should update it.

dalcinl commented 1 year ago

@leofang Oh, budy, maybe the major variable name in the recipe confused you? That variable should be renamed to series.

get https://www.open-mpi.org/software/ompi/v4.1/downloads/openmpi-4.1.4.tar.bz2
--2023-01-25 20:36:36--  https://www.open-mpi.org/software/ompi/v4.1/downloads/openmpi-4.1.4.tar.bz2
Resolving www.open-mpi.org (www.open-mpi.org)... 13.32.121.57, 13.32.121.86, 13.32.121.89, ...
Connecting to www.open-mpi.org (www.open-mpi.org)|13.32.121.57|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.4.tar.bz2 [following]
--2023-01-25 20:36:37--  https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.4.tar.bz2
Resolving download.open-mpi.org (download.open-mpi.org)... 18.66.97.79, 18.66.97.105, 18.66.97.5, ...
Connecting to download.open-mpi.org (download.open-mpi.org)|18.66.97.79|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10042839 (9.6M) [binary/octet-stream]
Saving to: ‘openmpi-4.1.4.tar.bz2.1’

openmpi-4.1.4.tar.b 100%[===================>]   9.58M  8.03MB/s    in 1.2s    

2023-01-25 20:36:38 (8.03 MB/s) - ‘openmpi-4.1.4.tar.bz2.1’ saved [10042839/10042839]

Note the v4.1 path component in the URL above.

>>> "4.1.4".rpartition(".")[0]
'4.1'

@jsquyres Your comments were key to figure out what was going on. Sorry for the noise. Thanks!

leofang commented 1 year ago

No, I missed the "r" in rpartition... 😛

>>> "4.1.4".partition(".")[0]
'4'
leofang commented 1 year ago

(Thanks to you both! Glad to know the old url is correctly redirected.)