-
Notifications
You must be signed in to change notification settings - Fork 85
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
define MSRV and check for it in CI #1098
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Source for quay.io/libpod/nv-rust | ||
# This version should always match the MSRV, when you update this also update the version in the root README.md. | ||
FROM docker.io/library/rust:1.76 | ||
RUN apt-get update && apt-get -y install protobuf-compiler libprotobuf-dev |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Rust image | ||
|
||
The point of this image is to verify the MSRV in CI so we can catch if a code or dependency change bumped the MSRV. | ||
If this is acceptable then update the version in the Dockerfile.Rust FROM line then build the new image see below. | ||
|
||
# Build and publish rust image | ||
|
||
Make sure you have valid `quay.io/libpod` credentials in order to push the image there. | ||
Then run the script `build_and_publish_rust_image.sh` to build and push it. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
PODMAN=${PODMAN:-podman} | ||
SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}") | ||
DOCKERFILE="$(dirname "${BASH_SOURCE[0]}")/Dockerfile.Rust" | ||
|
||
# get the tag from the Dockerfile so we do not duplicate it | ||
TAG=$(awk -F':' '/FROM/{print $NF}' $DOCKERFILE) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What would you think of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes sure |
||
if [[ -z "$TAG" ]]; then | ||
echo "Empty tag in $DOCKERFILE; the tag must specify the rust version to use" >&2 | ||
exit 1 | ||
fi | ||
|
||
FULL_IMAGE_NAME="quay.io/libpod/nv-rust:$TAG" | ||
|
||
$PODMAN build -t $FULL_IMAGE_NAME -f $DOCKERFILE | ||
$PODMAN push $FULL_IMAGE_NAME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a sentence here: "Netavark is guaranteed to build on this Rust version and later." or similar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given rust weird stance on backwards compatibility I find guaranteed to be a very strong word, i.e. it is not so recent that I think rust 1.80 failed to compile older version of the time crate
rust-lang/rust#127343 (comment)
i.e. it is impossible to build aardvark-dns 1.10.0 with rust v1.80 or newer. To their credit they provide a helpful error but still
And given we to not test all rust versions there might be some weird stuff in between so I think I rather
s/guaranteed/supposed
in your sentenceThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"We test that Netavark will build on the following Rust version. Newer versions should also build, and if they do not, the issue should be reported and will be fixed. Older versions are not guaranteed to build and issues will not be fixed"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good