KhronosGroup / DockerContainers

Docker container specifications which package dependencies for building Khronos documentation and software
Apache License 2.0
7 stars 10 forks source link

Rebuild Rust container on December 2023 with Rust 1.74 #33

Closed MarijnS95 closed 11 months ago

MarijnS95 commented 11 months ago

Fixes https://github.com/ash-rs/ash/issues/847

The current image is quite dated and no longer adequate to compile ash. Our rust:latest base image tag is replaced with 1.74 to ensure a recent-enough Rust base container is used, instead of considering an ancient local image/tag cache, as experience has shown.

MarijnS95 commented 11 months ago

CC @oddhack, apparently I don't have rights to assign you as reviewer :)

MarijnS95 commented 11 months ago

Someone with push rights will have to run ./build-one.sh rust 202312 push :)

MarijnS95 commented 11 months ago

Looks like the openxr-android build is failing:

https://github.com/KhronosGroup/DockerContainers/actions/runs/7114684910/job/19369225005#step:3:10990

  #11 3.798 Accept? (y/N): All SDK package licenses accepted
  #11 3.799 
  #11 3.821 Installing the Android compile SDK platform android-29
  #11 9.678 Installing the latest Android platform tools
  #11 11.61 Installing the Android NDK 21.4.7075529
  #11 46.98 Installing CMake 3.22.1
  #11 50.12 Installing the Android 'patcher'
  #11 51.22 Warning: Failed to find package 'patcher;v4'
  #11 ERROR: process "/bin/sh -c /install-android-sdk.sh" did not complete successfully: exit code: 1
  ------
   > [6/8] RUN /install-android-sdk.sh:
  3.798 10.8 Open Source Software. In the event Open Source software is included with Evaluation Software, such Open Source software is licensed pursuant to the applicable Open Source software license agreement identified in the Open Source software comments in the applicable source code file(s) and/or file header as indicated in the Evaluation Software. Additional detail may be available (where applicable) in the accompanying on-line documentation. With respect to the Open Source software, nothing in this Agreement limits any rights under, or grants rights that supersede, the terms of any applicable Open Source software license agreement.
  3.798 ---------------------------------------
  3.798 Accept? (y/N): All SDK package licenses accepted
  3.799 
  3.821 Installing the Android compile SDK platform android-29
  9.678 Installing the latest Android platform tools
  11.61 Installing the Android NDK 21.4.7075529
  46.98 Installing CMake 3.22.1
  50.12 Installing the Android 'patcher'
  51.22 Warning: Failed to find package 'patcher;v4'
  ------
  openxr-android.Dockerfile:54
  --------------------
    52 |     
    53 |     COPY install-android-sdk.sh /install-android-sdk.sh
    54 | >>> RUN /install-android-sdk.sh
    55 |     
    56 |     ### Android NDK
  --------------------
  ERROR: failed to solve: process "/bin/sh -c /install-android-sdk.sh" did not complete successfully: exit code: 1
oddhack commented 11 months ago

Someone with push rights will have to run ./build-one.sh rust 202312 push :)

I did that just now - see sha256:af4e8013ba4f53127d0868f0e4580a61c3e861aec4a9020b16f5a3fa76e1ba76 - but that image appears? to still be running rustc 1.68.0. Could you check on that? Is there anything in my local OS setup which would affect this?

MarijnS95 commented 11 months ago

I'm not sure when docker redownloads images/tags if the rust:latest tag (from a previous build) is already available on your system. You could issue a docker pull rust:latest before building, but perhaps we should explicitly set the version tag to the latest 1.74 release?

oddhack commented 11 months ago

I'm not sure when docker redownloads images/tags if the rust:latest tag (from a previous build) is already available on your system. You could issue a docker pull rust:latest before building, but perhaps we should explicitly set the version tag to the latest 1.74 release?

Sigh, you are right. I had forgotten that the docker container cache can screw up building our images here just as much as using them in Vulkan CI. Please update this and I'll try again.

This is such deeply suboptimal behavior that I have no idea why Docker thinks it's a good idea. It's one thing to use the cache if you're offline, but it's trivial to check the SHA of the cache image vs. the repository, and I could not find a way to force that behavior, which is why we use SHAs now instead of static names.

MarijnS95 commented 11 months ago

@oddhack done!

oddhack commented 11 months ago

Confirmed to work in local testing, thanks!

rpavlik commented 11 months ago

yeah I tend to docker pull BaseImageName before building and pushing, personally, not sure how to make it automatic.

edit: and yet I forgot to do it for the Android one. So you can pass --pull to the docker build command to make it pull automatically, do we want to just do that unconditionally in the scripts? or add another arg or something? I hate arg parsing in bash...