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

Fix swift metrics unzip #28

Merged
merged 13 commits into from
Jul 5, 2024
Merged

Fix swift metrics unzip #28

merged 13 commits into from
Jul 5, 2024

Conversation

finestructure
Copy link
Member

This doesn't fix the metrics unzip per se but adds a means for the builder to fall back to OS level zip should an archive fail to roundtrip.

@cla-bot cla-bot bot added the cla-signed label Jul 5, 2024
@finestructure finestructure requested a review from daveverwer July 5, 2024 08:00
@finestructure
Copy link
Member Author

GH actions seems to be broken. The checkout stage (!) is failing, even if I re-run it on main:

Run actions/checkout@v3
/usr/bin/docker exec  2d73a6f466630be7f7a22a78f79b[14](https://github.com/SwiftPackageIndex/DocUploader/actions/runs/9805164903/job/27074292638#step:3:15)6092abddc8ae8497765585b8f56d6a3b7e sh -c "cat /etc/*release | grep ^ID"
/__e/node20/bin/node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /__e/node20/bin/node)
/__e/node20/bin/node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /__e/node20/bin/node)
0s

https://github.com/SwiftPackageIndex/DocUploader/actions/runs/9805164903/job/27074292638

I've run the tests locally on macOS and Linux and they pass.

@finestructure
Copy link
Member Author

macOS:

✦ ❯ swift test
warning: 'spi-doc-uploader': dependency 'swift-crypto' is not used by any target
Building for debugging...
/Users/sas/Projects/SPI/spi-doc-uploader/.build/checkouts/swift-nio-transport-services/Sources/NIOTransportServices/NIOTSNetworkEvents.swift:16:17: remark: '@preconcurrency' attribute on module 'Network' is unused
@preconcurrency import Network
~~~~~~~~~~~~~~~~^
/Users/sas/Projects/SPI/spi-doc-uploader/.build/checkouts/swift-nio-transport-services/Sources/NIOTransportServices/NIOTSChannelOptions.swift:16:17: remark: '@preconcurrency' attribute on module 'Network' is unused
@preconcurrency import Network
~~~~~~~~~~~~~~~~^
[1262/1262] Linking DocUploaderPackageTests
Build complete! (39.83s)
Test Suite 'All tests' started at 2024-07-05 10:12:37.551.
Test Suite 'DocUploaderPackageTests.xctest' started at 2024-07-05 10:12:37.552.
Test Suite 'DocUploadBundleTests' started at 2024-07-05 10:12:37.552.
Test Case '-[DocUploadBundleTests.DocUploadBundleTests test_init]' started.
Test Case '-[DocUploadBundleTests.DocUploadBundleTests test_init]' passed (0.001 seconds).
Test Case '-[DocUploadBundleTests.DocUploadBundleTests test_issue_10]' started.
Test Case '-[DocUploadBundleTests.DocUploadBundleTests test_issue_10]' passed (0.000 seconds).
Test Case '-[DocUploadBundleTests.DocUploadBundleTests test_String_pathEncoded]' started.
Test Case '-[DocUploadBundleTests.DocUploadBundleTests test_String_pathEncoded]' passed (0.000 seconds).
Test Suite 'DocUploadBundleTests' passed at 2024-07-05 10:12:37.553.
	 Executed 3 tests, with 0 failures (0 unexpected) in 0.001 (0.001) seconds
Test Suite 'DocUploaderTests' started at 2024-07-05 10:12:37.553.
Test Case '-[DocUploaderTests.DocUploaderTests test_logUrl]' started.
Test Case '-[DocUploaderTests.DocUploaderTests test_logUrl]' passed (0.000 seconds).
Test Case '-[DocUploaderTests.DocUploaderTests test_reportResult]' started.
Test Case '-[DocUploaderTests.DocUploaderTests test_reportResult]' passed (0.003 seconds).
Test Suite 'DocUploaderTests' passed at 2024-07-05 10:12:37.556.
	 Executed 2 tests, with 0 failures (0 unexpected) in 0.003 (0.003) seconds
Test Suite 'ZipTests' started at 2024-07-05 10:12:37.556.
Test Case '-[DocUploadBundleTests.ZipTests test_unzip]' started.
Test Case '-[DocUploadBundleTests.ZipTests test_unzip]' passed (0.003 seconds).
Test Case '-[DocUploadBundleTests.ZipTests test_zip_roundtrip_shellTool]' started.
Test Case '-[DocUploadBundleTests.ZipTests test_zip_roundtrip_shellTool]' passed (0.005 seconds).
Test Case '-[DocUploadBundleTests.ZipTests test_zip_roundtrip]' started.
Test Case '-[DocUploadBundleTests.ZipTests test_zip_roundtrip]' passed (0.003 seconds).
Test Suite 'ZipTests' passed at 2024-07-05 10:12:37.567.
	 Executed 3 tests, with 0 failures (0 unexpected) in 0.011 (0.011) seconds
Test Suite 'DocUploaderPackageTests.xctest' passed at 2024-07-05 10:12:37.567.
	 Executed 8 tests, with 0 failures (0 unexpected) in 0.015 (0.015) seconds
Test Suite 'All tests' passed at 2024-07-05 10:12:37.567.
	 Executed 8 tests, with 0 failures (0 unexpected) in 0.015 (0.016) seconds

Linux:

❯ docker run --rm -v "$PWD":/host -w /host swift:5.10.0-amazonlinux2 swift test
warning: 'host': dependency 'swift-crypto' is not used by any target
[0/1] Planning build
[1/1] Compiling plugin AWSLambdaPackager
Building for debugging...
[1/4] Write swift-version-24593BA9C3E375BF.txt
Build complete! (6.98s)
Test Suite 'All tests' started at 2024-07-05 08:13:38.394
Test Suite 'debug.xctest' started at 2024-07-05 08:13:38.395
Test Suite 'DocUploaderTests' started at 2024-07-05 08:13:38.395
Test Case 'DocUploaderTests.test_logUrl' started at 2024-07-05 08:13:38.395
Test Case 'DocUploaderTests.test_logUrl' passed (0.001 seconds)
Test Case 'DocUploaderTests.test_reportResult' started at 2024-07-05 08:13:38.396
Test Case 'DocUploaderTests.test_reportResult' passed (0.028 seconds)
Test Suite 'DocUploaderTests' passed at 2024-07-05 08:13:38.424
         Executed 2 tests, with 0 failures (0 unexpected) in 0.029 (0.029) seconds
Test Suite 'DocUploadBundleTests' started at 2024-07-05 08:13:38.424
Test Case 'DocUploadBundleTests.test_String_pathEncoded' started at 2024-07-05 08:13:38.424
Test Case 'DocUploadBundleTests.test_String_pathEncoded' passed (0.0 seconds)
Test Case 'DocUploadBundleTests.test_init' started at 2024-07-05 08:13:38.424
Test Case 'DocUploadBundleTests.test_init' passed (0.0 seconds)
Test Case 'DocUploadBundleTests.test_issue_10' started at 2024-07-05 08:13:38.424
Test Case 'DocUploadBundleTests.test_issue_10' passed (0.0 seconds)
Test Suite 'DocUploadBundleTests' passed at 2024-07-05 08:13:38.424
         Executed 3 tests, with 0 failures (0 unexpected) in 0.001 (0.001) seconds
Test Suite 'ZipTests' started at 2024-07-05 08:13:38.424
Test Case 'ZipTests.test_unzip' started at 2024-07-05 08:13:38.424
Test Case 'ZipTests.test_unzip' passed (0.002 seconds)
Test Case 'ZipTests.test_zip_roundtrip' started at 2024-07-05 08:13:38.426
Test Case 'ZipTests.test_zip_roundtrip' passed (0.006 seconds)
Test Case 'ZipTests.test_zip_roundtrip_shellTool' started at 2024-07-05 08:13:38.432
/host/Tests/DocUploadBundleTests/ZipTests.swift:92: ZipTests.test_zip_roundtrip_shellTool : Test skipped: required true value but got false
Test Case 'ZipTests.test_zip_roundtrip_shellTool' skipped (0.0 seconds)
Test Suite 'ZipTests' passed at 2024-07-05 08:13:38.433
         Executed 3 tests, with 1 test skipped and 0 failures (0 unexpected) in 0.008 (0.008) seconds
Test Suite 'debug.xctest' passed at 2024-07-05 08:13:38.433
Executed 8 tests, with 1 test skipped and 0 failures (0 unexpected) in 0.038 (0.038) seconds
Test Suite 'All tests' passed at 2024-07-05 08:13:38.433
Executed 8 tests, with 1 test skipped and 0 failures (0 unexpected) in 0.038 (0.038) seconds

@finestructure finestructure merged commit 5edeb1e into main Jul 5, 2024
1 of 2 checks passed
@finestructure finestructure deleted the fix-swift-metrics-unzip-2 branch July 5, 2024 08:14
finestructure added a commit that referenced this pull request Jul 10, 2024
…cs-unzip-2"

This reverts commit 5edeb1e, reversing
changes made to a9e4d1f.
finestructure added a commit that referenced this pull request Jul 11, 2024
…cs-unzip-2"

This reverts commit 5edeb1e, reversing
changes made to a9e4d1f.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants