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

feat(compute/build): Support 'upper bound' constraints on Rust versions. #1350

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

kpfleming
Copy link
Contributor

Changes planned in the upcoming Rust 1.84 release may not be compatible with the Fastly Compute platform (until further analysis is done, which may result in the need for platform changes). To ensure that customers do not build Compute packages which do not operate correctly in the platform, this PR adds a toolchain version constraint "upper bound" in addition to the existing "lower bound", only for Rust.

The upper bound is currently set to "<1.84.0", so any versions currently available, plus all releases of Rust 1.83.x, will be permitted. Because this is a hard requirement of the platform, the check has been changed to report an error (not a warning), if the version of Rust in use does not meet the requirements. While this is potentially a breaking change (since the 'fastly compute build' process will stop, instead of continuing), it can only affect users with Rust versions older than 1.56.1, which are not actually usable at this time anyway.

In addition, this PR changes the messages generated for both Go and Rust version-constraint failures to include the details of how the check failed.

Changes planned in the upcoming Rust 1.84 release may not be
compatible with the Fastly Compute platform (until further analysis is
done, which may result in the need for platform changes). To ensure
that customers do not build Compute packages which do not operate
correctly in the platform, this PR adds a toolchain version constraint
"upper bound" in addition to the existing "lower bound", only for
Rust.

The upper bound is currently set to "<1.84.0", so any versions
currently available, plus all releases of Rust 1.83.x, will be
permitted. Because this is a hard requirement of the platform, the
check has been changed to report an error (not a warning), if the
version of Rust in use does not meet the requirements. While this is
potentially a breaking change (since the 'fastly compute build'
process will stop, instead of continuing), it can only affect users
with Rust versions older than 1.56.1, which are not actually usable at
this time anyway.

In addition, this PR changes the messages generated for both Go and
Rust version-constraint failures to include the details of how the
check failed.
@kpfleming kpfleming marked this pull request as draft November 20, 2024 17:59
@kpfleming kpfleming marked this pull request as ready for review November 20, 2024 18:32
Copy link
Member

@philippschulte philippschulte left a comment

Choose a reason for hiding this comment

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

Lgtm, thanks

Use a RemediationError to give the user a link to a documentation page
where they can get more information about supported versions.
Copy link
Member

@philippschulte philippschulte left a comment

Choose a reason for hiding this comment

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

Thanks

@kpfleming kpfleming merged commit 2a1de2b into fastly:main Nov 20, 2024
6 checks passed
@kpfleming kpfleming deleted the cdtool-937 branch November 20, 2024 21:26
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.

3 participants