canonical / action-build

A Github action for building Snapcraft projects
MIT License
42 stars 22 forks source link

Flaky builds #75

Open edlerd opened 5 months ago

edlerd commented 5 months ago

We frequently see builds failing due to unstable infrastructure. Suspecting network problems as the root cause. See this run in AMS and the relevant screenshot below

image

Can we ensure the builds have a stable network connection and reduce the flakyness of builds?

Or retry the build automatically on network problems? Currently, we have to retry the builds manually on those type of errors.

jhenstridge commented 4 months ago

It's a bit hard to tell what is going wrong just from that screenshot, and any fix will probably need to be on the Snapcraft side rather than this action.

One thing that might be helpful in diagnosing the problem would be to save the Snapcraft log file on error. This could be done by adding the following to your workflow:

  - if: failure()
    uses: action/upload-artifact@v4
    with:
      name: snapcraft-logs
      path: ~/.local/state/snapcraft/log/*.log

This step would only run if some previous step in the job had failed. Alternatively you could remove the if: failure() to always collect the log.