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

Bazel CI fails after updating Swift 5.2.5 to 5.4.2 in Ubuntu #665

Closed
philwo opened this issue Aug 7, 2021 · 4 comments
Closed

Bazel CI fails after updating Swift 5.2.5 to 5.4.2 in Ubuntu #665

philwo opened this issue Aug 7, 2021 · 4 comments

Comments

@philwo
Copy link
Member

philwo commented Aug 7, 2021

Hi,

after upgrading Swift in our Bazel CI Ubuntu Docker containers from 5.2.5 to 5.4.2 rules_swift started failing with "No 'swiftc' executable found in $PATH". See: https://buildkite.com/bazel/rules-swift-swift/builds/2704#0330f7fc-fc2a-462c-a6d5-4c584173e5f1

However, a swiftc binary is definitely in the PATH:

$ docker run --rm -it gcr.io/bazel-public/ubuntu1804-java11 /bin/bash
root@4b105b952bb8:/# which swiftc
/opt/swift-5.4.2-RELEASE-ubuntu18.04/usr/bin/swiftc
root@4b105b952bb8:/# swiftc --version
Swift version 5.4.2 (swift-5.4.2-RELEASE)
Target: x86_64-unknown-linux-gnu

Do you want to debug this? Should I rollback the upgrade?

Also, I'm curious, do you have plans for using remote repositories to download Swift SDKs instead of relying on the system to provide them (or maybe does this feature already exist and we could use it somehow on Bazel CI?)?

@keith
Copy link
Member

keith commented Aug 8, 2021

I don't see what about this image update could have broken this, but repository_ctx.which clearly isn't returning swiftc even if it should. After hardcoding the expected values I hit another interesting failures:

Error forking process '/opt/swift-5.4.2-RELEASE-ubuntu18.04/usr/bin/swiftc'. No such file or directory

https://buildkite.com/bazel/rules-swift-swift/builds/2713#1209b2ff-7544-4c43-8bec-1b0d88c3d306

It seems like that change must have introduced something strange here. The permissions on those files look fine to me.

It also doesn't appear like these actions are running remotely, or in the sandbox (since we're using a persistent worker)

Any other ideas here?

@keith
Copy link
Member

keith commented Aug 8, 2021

We kinda punted on downloading the toolchain directly since no one has been asking for it #4

@philwo
Copy link
Member Author

philwo commented Aug 10, 2021

@keith Mhm... very strange. Thanks for doing these checks. I'll have another look later today!

@keith
Copy link
Member

keith commented Oct 26, 2021

Avoided via #672

@keith keith closed this as completed Oct 26, 2021
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

No branches or pull requests

2 participants