Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock all versions to "jammy" (no "noble" auto-upgrade) #284

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

tianon
Copy link
Member

@tianon tianon commented Aug 1, 2024

Attempts to upgrade 3.x versions to Ubuntu Noble fail because they still require python2 (which is no longer available in Noble).

Attempts to upgrade 4.x fail because of incompatibilities with Python 3.12 (which is the version Noble has).

Attempts to upgrade 5.x fail because of the above Python 3.12 incompatibility, but with the added benefit of code detecting that we're trying to use Python 3.12 and erroring that no suitable Python version could be found (instead of failing with an obscure six.moves import error, like 4.x does).

For now, this is an explicit override for every supported version because hope springs eternal that Python 3.12 will be supported eventually and some future 5.x will be able to upgrade to Ubuntu Noble. 🙈

Attempts to upgrade 3.x versions to Ubuntu Noble fail because they still require python2 (which is no longer available in Noble).

Attempts to upgrade 4.x fail because of incompatibilities with Python 3.12 (which is the version Noble has).

Attempts to upgrade 5.x fail because of the above Python 3.12 incompatibility, but with the added benefit of code detecting that we're trying to use Python 3.12 and erroring that no suitable Python version could be found (instead of failing with an obscure `six.moves` import error, like 4.x does).

For now, this is an explicit override for every supported version because hope springs eternal that Python 3.12 will be supported eventually and some future 5.x will be able to upgrade to Ubuntu Noble. 🙈
@tianon
Copy link
Member Author

tianon commented Aug 1, 2024

We've also got this fun little warning on 4.1+ (apache/cassandra@917d74b) several times while running our tests:

Warning: Using a password on the command line interface can be insecure.
Recommendation: use the credentials file to securely provide the password.

https://github.com/docker-library/cassandra/actions/runs/10203255159/job/28229194787?pr=284#step:7:15

It's a little bit annoying to fix because the two options for doing so (--credentials or --insecure-password-without-warning) were also both added only in 4.1+, so we couldn't reasonably squash that warning in our tests without some light version/capability detection.

(Not a serious issue, just something I wanted to note down somewhere and this PR where I had to test all the versions is as good a place as any.)


# for the given Java version, find the "default" Eclipse Temurin tag with stable specificity ("X-jre-SUITE")
from="$(
bashbrew --arch amd64 list --arch-filter "https://github.com/docker-library/official-images/raw/HEAD/library/eclipse-temurin:$javaVersion-jre" \
bashbrew --arch amd64 list --arch-filter "https://github.com/docker-library/official-images/raw/HEAD/library/eclipse-temurin:$javaVersion-jre${suiteOverride:+-$suiteOverride}" \
| grep -F ":$javaVersion-jre-" \
| tail -1
)"
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we should double check that from has a value in order to catch the case where a cassandra version is stuck on an Ubuntu that eclipse-temurin no longer supports.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah good call -- I did it this way (with keeping the round trip through bashbrew list even though the answer should be literally eclipse-temurin:XXX-jre-YYY that we could've generated without going through this) specifically for being able to make sure the image we're trying to use actually does exist and is still supported 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, that case is already handled by set -e (and set -o pipefail) because bashbrew list will explicitly non-zero exit. 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

To illustrate:

$ git --no-pager diff
diff --git a/versions.sh b/versions.sh
index 6532c13..b40ffc8 100755
--- a/versions.sh
+++ b/versions.sh
@@ -22,7 +22,7 @@ declare -A suiteOverrides=(
 	# https://github.com/apache/cassandra/commit/8fd44ca8fc9e0b0e94932bcd855e2833bf6ca3cb#diff-8d8ae48aaf489a8a0e726d3e4a6230a26dcc76e7c739e8e3968e3f65c995d148
 	# https://issues.apache.org/jira/browse/CASSANDRA-19245?focusedCommentId=17803539#comment-17803539
 	# https://github.com/apache/cassandra/blob/cassandra-5.0-rc1/bin/cqlsh#L65
-	[5.0]='jammy'
+	[5.0]='foobar'
 )
 
 cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
$ ./update.sh 5.0
failed fetching repo "https://github.com/docker-library/official-images/raw/HEAD/library/eclipse-temurin:17-jre-foobar"
tag not found in manifest for "eclipse-temurin": "17-jre-foobar"
$ echo $?
1

@yosifkit yosifkit merged commit 73821ac into docker-library:master Aug 1, 2024
7 checks passed
@yosifkit yosifkit deleted the noble-fallout branch August 1, 2024 21:31
docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Aug 19, 2024
Changes:

- docker-library/cassandra@72bda68: Update 4.1 to 4.1.6
- docker-library/cassandra@73821ac: Merge pull request docker-library/cassandra#284 from infosiftr/noble-fallout
- docker-library/cassandra@6c7cbe9: Lock all versions to "jammy" (no "noble" auto-upgrade)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants