earthcubeprojects-chords / chords

EarthCube CHORDS application code
GNU General Public License v2.0
25 stars 13 forks source link

Release references broken for chords_control #599

Closed MisterMartin closed 1 year ago

MisterMartin commented 1 year ago

chords_control uses the git tag hashes to download the docker-compose.yml file. This has worked all of the way up through Release 1.1.0-rc1. Suddenly it has stopped working, as documented below.

If a branch name is used in the URL, instead of the tag hash, it still works. So I've created branches that match the recent releases.

For the time being, when configuring chords (with chords_control), use the branch name rather than the Release- name. (In spite of the warning from chords_control.)

The following demonstrates the problem:

git ls-remote --tags --refs https://github.com/earthcubeprojects-chords/chords
...
ed6ed8f3258e101779254688846a259c53ce2d41    refs/tags/1.1.0-rc1
7306fe40d08ee45796cabb89282f6d03ddd92cc0    refs/tags/1.1.0-rc2
fdfa613f5a7537f3415173f4bd54978e4c4fcd56    refs/tags/1.1.0-rc3
15fcef954134e8b303b8ff788cf6cfc31b341634    refs/tags/1.1.0-rc4
...

# Downloading from the the reference for 1.1.0-rc1 gets the file:
$ curl -O -s https://raw.githubusercontent.com/earthcubeprojects-chords/chords/ed6ed8f3258e101779254688846a259c53ce2d41/docker-compose.yml
$ ls -l docker-compose.yml 
-rw-r--r--  1 charlie  staff  8147 Mar 13 15:19 docker-compose.yml

# Downloading from the reference for 1.1.0-rc4 doesn't find the file.
# Note the file length (14) and the contents '404: Not Found'
$ curl -O -s https://raw.githubusercontent.com/earthcubeprojects-chords/chords/15fcef954134e8b303b8ff788cf6cfc31b341634/docker-compose.yml
$ ls -l docker-compose.yml 
-rw-r--r--  1 charlie  staff  14 Mar 13 15:15 docker-compose.yml
$ cat docker-compose.yml 
404: Not Found%        
MisterMartin commented 1 year ago

It looks like you don't have to use the hash anymore at all. Just using the tag name in the URL will behave like a branch name. Maybe this was always the case?

So, chords_control needs to be modified to remove the silly 'Release-' construct (and associated hash machinations), and just offer branches, tags or release names. This will simplify things considerably.

MisterMartin commented 1 year ago

Fixed in 674199d75f.