-
Notifications
You must be signed in to change notification settings - Fork 98
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
config: add rustc-1.68
build environment
#1890
Conversation
Rust 1.68.2 will be the next version supported by the kernel, already submitted to the LKML. Furthermore, I would like to start tracking the latest version, please see the commit message at [2] and a previous discussion at [3]. Therefore, add `rustc-1.68` as a new build environment. Link: https://lore.kernel.org/rust-for-linux/[email protected]/ [1] Link: https://lore.kernel.org/all/[email protected]/ [2] Link: https://lore.kernel.org/rust-for-linux/CANiq72mT3bVDKdHgaea-6WiZazd8Mvurqmqegbe5JZxVyLR8Yg@mail.gmail.com/ [3] Signed-off-by: Miguel Ojeda <[email protected]>
Cc @aliceinwire @10ne1 since they reviewed previous ones. Cc @mgalka @nuclearcat too, since they managed changes for Rust on @gctucker Please let me know if such frequent upgrades would be too problematic for KernelCI. Thanks! |
That's fine, however we need to remember to also add the Docker images for the new toolchain versions. That's currently configured in the @mgalka @nuclearcat Are you OK to take care of updating the scripts for |
I will take care about that. |
We only need to build the ones that are being used, and afaik that's one cutting edge and an older one for mainline. So unless @ojeda tells us we need more for some particular reasons, I think we'll only just need 2 images. Basically, once the build configs have been updated to use 1.68 instead of 1.66 then we should update the script to build 1.68 instead of 1.66... That's the kind of thing that could be automated but right now we can just update the configs hand-in-hand. |
So I think we need from 1 to 3 at the same time, depending on how the following align at a given moment:
The last one is the least important, and I can make the it the same as the first or the second (currently it isn't, but I will fix that), so effectively we only need 2. Moreover, the branch of the last one is frozen now except for minimizing differences with mainline and will eventually go away, so it should be temporary anyway, i.e. we will only need 1 or 2 after it is gone. |
In particular, 1.66 can go away as soon as I move
For |
Yes feel free to send another PR now for that, we can add the |
If |
So I was asking because if we use 1.68 right now in mainline (or even I think you told me a while ago that it could be hard to dynamically pick the building environment. But if that is easy now, the version can be known via |
Ah sorry I think I was missing some context, didn't realise there were also some kernel changes related to this. Basically you can choose which toolchain to use with each branch, and if there's backwards compatibility of the code with previous toolchains then once the kernel changes have landed on a branch then the toolchain can be updated in KernelCI for that branch. If there's no backwards compatibility, then you can choose whether you prefer KernelCI builds to fail first with the new toolchain and then get fixed with kernel patches or fail first with the new kernel patches and then get fixed with a toolchain update. We can't really get these things updated exactly at the same time, but maybe that's fine as it should be obvious which kernel version is being built with which toolchain version. I would vote for updating the KernelCI config first to start using the new toolchain and then make sure the kernel patches land to fix any build issues (on rust-next etc.). For mainline it's more about keeping the older 1.62 toolchain working, so quite a different approach there - basically just keep building with the minimal version supported as per the documentation I guess. |
Sorry, I should have made it a bit more clear! There may or may not be backwards compatibility, i.e. sometimes newer versions work, sometimes they do not (until we can declare a minimum version, that is, but that still is in the future). I am happy either way. If we update the kernel first, then the error will be obvious since the toolchain is older (and we error on purpose if we see that in the kernel). However, updating KernelCI first allows us to know if the new version actually manages or not to compile the kernel (in the kernel build system, a newer toolchain is just a warning), but if it fails, the error may be a bit less obvious.
Wouldn't mainline be similar? i.e. I have less control over when Linus lands the PR (compared to me pushing to In other words, the Rust version upgrades are currently a global flag day. This is, of course, bad, but it is what we have until Rust gives us stability for some unstable features we need now. (We considered supporting two versions meanwhile by hand, for instance, but that requires more complexity and duplication, which does not seem worth it since we are still upstreaming core code, i.e. there are not real users yet; and the goal is to avoid this situation to begin with by avoiding the unstable bits. But if it would be a big problem failing some builds for KernelCI, we could reconsider it). |
By the way, this is true if there is no reconfiguring; otherwise, Rust gets disabled automatically. Either way, it may be a good idea to check with So one more argument for updating KernelCI first. |
As per kernelci/kernelci-core#1890 we need to start building Rust 1.68. Update deploy script, first for staging, to test that. Signed-off-by: Denys Fedoryshchenko <[email protected]>
As per kernelci/kernelci-core#1890 we need to start building Rust 1.68. Update deploy script, first for staging, to test that. Signed-off-by: Denys Fedoryshchenko <[email protected]>
As per kernelci/kernelci-core#1890 we need to start building Rust 1.68. Update deploy script, first for staging, to test that. Signed-off-by: Denys Fedoryshchenko <[email protected]>
As per kernelci/kernelci-core#1890 we need to start building Rust 1.68. Update deploy script, first for staging, to test that. Signed-off-by: Denys Fedoryshchenko <[email protected]>
Right, if there's no stable minimum rustc version for mainline and it's also a moving target then it's a similar issue. I was comparing with Clang which has a minimal version while linux-next is being built with the latest in KernelCI. |
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.
OK so basically I think we can take the approach of updating KernelCI first with a new Rust version, then the kernel code will need to be updated to make it work again.
I see the kernelci/staging-rustc-1.68:kselftest-kernelci
image has been built and pushed to Docker Hub so I think we're good to go. The next step of course is to update build-configs.yaml
to use rustc-1.68
instead of rustc-1.66
, and I guess this could be done now based on the previous discussion.
Also I've created #1910 about checking that Rust support is enabled. I think we'll be able to add this kind of custom steps with the new build job templates. We probably don't want to try to enable this with the current builds, although we could with some logic in the Python code if it's really needed. |
Thanks! I will send the PR for the |
This moves both `rust-for-linux_rust-next` and `next`'s Rust variant. As discussed [1], for this kind of upgrades, we will move KernelCI first and then I will apply push the branch. The run is expected to fail if it happens to run between those two moves. Link: kernelci#1890 (comment) [1] Signed-off-by: Miguel Ojeda <[email protected]>
This moves both `rust-for-linux_rust-next` and `next`'s Rust variant. As discussed [1], for this kind of upgrades, we will move KernelCI first and then I will apply push the branch. The run is expected to fail if it happens to run between those two moves. Link: #1890 (comment) [1] Signed-off-by: Miguel Ojeda <[email protected]>
Rust 1.68.2 will be the next version supported by the kernel, already submitted to the LKML.
Furthermore, I would like to start tracking the latest version, please see the commit message at [2] and a previous discussion at [3].
Therefore, add
rustc-1.68
as a new build environment.Link: https://lore.kernel.org/rust-for-linux/[email protected]/ [1]
Link: https://lore.kernel.org/all/[email protected]/ [2]
Link: https://lore.kernel.org/rust-for-linux/CANiq72mT3bVDKdHgaea-6WiZazd8Mvurqmqegbe5JZxVyLR8Yg@mail.gmail.com/ [3]