SwiftPackageIndex / SwiftPackageIndex-Server

The Swift Package Index is the place to find Swift packages!
https://swiftpackageindex.com
Apache License 2.0
526 stars 40 forks source link

Documentation page 404s #3134

Closed stephencelis closed 2 months ago

stephencelis commented 2 months ago

Please describe the bug

The documentation page for our swift-dependencies package is currently 404ing:

Explain the steps needed to reproduce the bug

  1. Navigate to to https://swiftpackageindex.com/pointfreeco/swift-dependencies/
  2. Click on Documentation
  3. See a 404…

What was the expected behaviour?

Documentation to be visible.

finestructure commented 2 months ago

Thanks for the report, @stephencelis !

It's an odd one. I can see the doc archive being uploaded to the S3 inbox but it didn't seem to get picked up and copied into the doc bucket. I might be able to find more logs but for now I'll retrigger the runs for those two versions so the 404 is cured.

It might take a little longer to process this than usual, because we're in the middle of the Swift 6 processing. Please bear with us!

finestructure commented 2 months ago

Ok, it's already re-run.

Logs look ok: https://us-east-2.console.aws.amazon.com/cloudwatch/home?region=us-east-2#logsV2:log-groups/log-group/$252Faws$252Flambda$252FDocUploaderLambda-Prod-UploadFunction-GGu55JqjJ0Lz/log-events/2024$252F06$252F13$252F$255B$2524LATEST$255D72c73b7249d14391ba569b4fb798c8e4

The problem is that the archives seem to empty:

❯ unzip prod-pointfreeco-swift-dependencies-1.3.1-8c5dcc16.zip
Archive:  prod-pointfreeco-swift-dependencies-1.3.1-8c5dcc16.zip
 extracting: metadata.json
   creating: 1.3.1/
~/Downloads
❯ tree 1.3.1/
1.3.1/

0 directories, 0 files

I believe this is a regression in our doc uploader, which I recently switched to a new zip library after some troubles.

Thanks a lot for reporting this, I believe it's affecting more of not all recent doc builds.

finestructure commented 2 months ago

Reverting the doc uploader doesn't help, I think it's the zipping in the builder itself that's broken, not the uploader's unzipping and uploading.

finestructure commented 2 months ago

I can reproduce the problem. The 1.7.x change to the doc uploader broke the zipping of (some) archives. Rolling back to 1.6.3 fixes it for swift-dependencies.

I'll roll back the uploader and the builder's dependency on it to 1.6.3 and then re-run doc gen for packages with docs that had changes over the last 11 days (we deployed 1.7.1 on June 3).

This will likely break swift-metrics' doc gen again (which the doc uploader change was fixing, #3069) but that's lower impact.

finestructure commented 2 months ago

Roll back deployed and re-triggered builds for swift-dependencies and swift-testing.

finestructure commented 2 months ago

swift-dependencies docs are back. swift-testing should follow soon.

finestructure commented 2 months ago

They're both back now. Thanks again for the reports!