swift-actions / setup-swift

GitHub Action that setup a Swift environment
MIT License
254 stars 49 forks source link

`Unexpected error, unable to continue` when run on `ubuntu-24.04` image #677

Open angelapwen opened 2 months ago

angelapwen commented 2 months ago

Describe the bug I thought I'd successfully added support for ubuntu-24.04 in https://github.com/swift-actions/setup-swift/pull/675 but the workflows fail with a different, more opaque error now.

Before the PR above was merged and the change released, trying to use the Action on ubuntu-24.04 resulted in Version "24.04" of Ubuntu is not supported.

Now, I get:

Run swift-actions/setup-swift@3aed395c5397f62deb91d8fe7af1418a9ae4d16f
/usr/bin/gpg --import /home/runner/work/_temp/ba73440a-5941-4ed7-a35f-6b4374673ca8
gpg: directory '/home/runner/.gnupg' created
gpg: keybox '/home/runner/.gnupg/pubring.kbx' created
gpg: /home/runner/.gnupg/trustdb.gpg: trustdb created
gpg: key D441C977412B37AD: public key "Swift Automatic Signing Key #1 <swift-infrastructure@swift.org>" imported
gpg: key 9F597F4D21A56D5F: public key "Swift 2.2 Release Signing Key <swift-infrastructure@swift.org>" imported
gpg: key 63BC1CFE91D306C6: public key "Swift 3.x Release Signing Key <swift-infrastructure@swift.org>" imported
gpg: key EF5430F071E1B235: public key "Swift 4.x Release Signing Key <swift-infrastructure@swift.org>" imported
gpg: key 7638F1FB2B2B08C4: public key "Swift Automatic Signing Key #2 <swift-infrastructure@swift.org>" imported
gpg: key 925CC1CCED3D1561: public key "Swift 5.x Release Signing Key <swift-infrastructure@swift.org>" imported
gpg: key FAF6989E1BC16FEA: public key "Swift Automatic Signing Key #3 <swift-infrastructure@swift.org>" imported
gpg: key 925CC1CCED3D1561: "Swift 5.x Release Signing Key <swift-infrastructure@swift.org>" 1 new signature
gpg: key F167DF1ACF9CE069: public key "Swift Automatic Signing Key #4 <swift-infrastructure@forums.swift.org>" imported
gpg: key 925CC1CCED3D1561: "Swift 5.x Release Signing Key <swift-infrastructure@swift.org>" 1 new signature
gpg: key F167DF1ACF9CE069: "Swift Automatic Signing Key #4 <swift-infrastructure@forums.swift.org>" 1 new signature
gpg: Total number processed: 11
gpg:               imported: 8
gpg:         new signatures: 3
/usr/bin/gpg --keyserver hkp://keyserver.ubuntu.com --refresh-keys Swift
gpg: refreshing 8 keys from hkp://keyserver.ubuntu.com
gpg: key F167DF1ACF9CE069: "Swift Automatic Signing Key #4 <swift-infrastructure@forums.swift.org>" not changed
gpg: key FAF6989E1BC16FEA: "Swift Automatic Signing Key #3 <swift-infrastructure@swift.org>" not changed
gpg: key 925CC1CCED3D1561: "Swift 5.x Release Signing Key <swift-infrastructure@swift.org>" not changed
gpg: key 7638F1FB2B2B08C4: "Swift Automatic Signing Key #2 <swift-infrastructure@swift.org>" not changed
gpg: key EF5430F071E1B235: "Swift 4.x Release Signing Key <swift-infrastructure@swift.org>" not changed
gpg: key 63BC1CFE91D306C6: "Swift 3.x Release Signing Key <swift-infrastructure@swift.org>" not changed
gpg: key 9F597F4D21A56D5F: "Swift 2.2 Release Signing Key <swift-infrastructure@swift.org>" not changed
gpg: key D441C977412B37AD: "Swift Automatic Signing Key #1 <swift-infrastructure@swift.org>" not changed
gpg: Total number processed: 8
gpg:              unchanged: 8
Error: Unexpected error, unable to continue. Please report at https://github.com/swift-actions/setup-swift/issues
Unexpected HTTP response: 404
Stacktrace:
Error: Unexpected HTTP response: 404
    at /home/runner/work/_actions/swift-actions/setup-swift/3aed395c5397f62deb91d8fe7af1418a9ae4d16f/dist/index.js:4827:25
    at Generator.next (<anonymous>)
    at fulfilled (/home/runner/work/_actions/swift-actions/setup-swift/3aed395c5397f62deb91d8fe7af1418a9ae4d16f/dist/index.js:4737:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

My colleague pointed out that this looks quite similar to some old issues like https://github.com/swift-actions/setup-swift/issues/196 where the Swift version was incompatible with the runner image version. I tried Swift versions 5.7, 5.8, 5.9, and 5.10 and none of them work with ubuntu-24.04. I checked the supported versions and it seems like all these Swift versions should be compatible with all MacOS and Linux images.

Workflow configuration (please complete the following information):

tomjn commented 1 month ago

I'm also encountering this when using ubuntu-latest https://github.com/wearerequired/lint-action/actions/runs/10096324757/job/27918576884?pr=811