treosh / lighthouse-ci-action

Audit URLs using Lighthouse and test performance with Lighthouse CI.
MIT License
1.18k stars 82 forks source link

Uploading median LHR of http://localhost:3000/...failed! #144

Closed slorber closed 1 month ago

slorber commented 2 months ago

Hi

For unknown reasons, our Docusaurus Lighthouse CI workflow started to fail (using latest commit from this repository, )

https://github.com/facebook/docusaurus/actions/runs/11056655609/job/30718686539?pr=10522

I tried to troubleshoot this and the CI logs show that this action does not fail when it can't upload median LHR to Google temporary storage

      - name: Audit URLs using Lighthouse
        id: lighthouse_audit
        uses: treosh/lighthouse-ci-action@2f8dda6cf4de7d73b29853c3f29e73a01e297bd8 # 12.1.0
        with:
          urls: |
            http://localhost:3000
            http://localhost:3000/docs/installation
            http://localhost:3000/docs/category/getting-started
            http://localhost:3000/blog
            http://localhost:3000/blog/preparing-your-site-for-docusaurus-v3
            http://localhost:3000/blog/tags/release
            http://localhost:3000/blog/tags
          configPath: ./.github/workflows/lighthouserc.json
          uploadArtifacts: true
          temporaryPublicStorage: true
Uploading
  Artifact name is valid!
  Root directory input is valid!
  Beginning upload of artifact content to blob storage
  Uploaded bytes 4516766
  Finished uploading artifact content to blob storage!
  SHA256 hash of uploaded artifact zip is ed171f5ac7c2c955bfc4[60](https://github.com/facebook/docusaurus/actions/runs/11056655609/job/30718686539?pr=10522#step:6:63)c70c7c9b1c5ef2637689c89547bb4003450006bb57
  Finalizing artifact upload
  Artifact lighthouse-results.zip successfully finalized. Artifact ID 1983538537
  Uploading median LHR of http://localhost:3000/...failed!
  Uploading median LHR of http://localhost:3000/docs/installation...failed!
  Uploading median LHR of http://localhost:3000/docs/category/getting-started...failed!
  Uploading median LHR of http://localhost:3000/blog...failed!
  Uploading median LHR of http://localhost:3000/blog/preparing-your-site-for-docusaurus-v3...failed!
  Uploading median LHR of http://localhost:3000/blog/tags/release...failed!
  Uploading median LHR of http://localhost:3000/blog/tags...failed!
  No GitHub token set, skipping GitHub status check.
  Dumping 7 reports to disk at /home/runner/work/docusaurus/docusaurus/.lighthouseci...
  Done writing reports to disk.

I'm not sure exactly why it fails silently, but this leads to failure in a subsequent step because the ${{ steps.lighthouse_audit.outputs.links }} object is empty.

I believe this action should rather fail fast and stop the whole CI job in case of such an upload error with a clear error message.

I looked at the code and not sure why it's not the case honestly.


Edit:

slorber commented 2 months ago

Looks related to this 😅

https://github.com/GoogleChrome/lighthouse-ci/issues/1072

https://github.com/GoogleChrome/lighthouse-ci/issues/1073

paulirish commented 1 month ago

Thanks for your action here @slorber

Good news, The storage appears to be back up now!

slorber commented 1 month ago

Awesome, thanks!