spin icon indicating copy to clipboard operation
spin copied to clipboard

PR and release workflow improvements umbrella issue

Open rajatjindal opened this issue 1 year ago • 5 comments

We have been running into some problems with PR and Release workflows. We especially felt the pain during debugging of ssl issue during mqtt work.

I am trying to find out all the differences between build and release workflows to make them consistent for easy debugging and predictable behavior:

  • [ ] PR workflows don't build for Linux/Mac aarch64 targets
  • [ ] Toolchain setup is done using .github/actions/spin-ci-dependencies/action.yml in PR workflow, and done using direct rust toolchain commands in Release workflows
  • [ ] PR workflows run on ubuntu-latest, which translates to ubuntu-22.04, but release workflows run with ubuntu-20.04
  • [ ] Some configs are passed along during build in GitHub actions workflows, while some config is passed using .cargo/config files

This issue will likely evolve a bit more before we find all the discrepancies and fix them.

rajatjindal avatar Mar 18 '24 05:03 rajatjindal

Adding some historical context for some of this (not suggesting we should not change them, just providing more info):

  • building Linux/Mac aarch64 targets for every PR was very slow because GH Actions still did cross compilation. GitHub added a private beta for ARM runners, but we don't have access yet (https://resources.github.com/devops/accelerate-your-cicd-with-arm-and-gpu-runners-in-github-actions/)
  • the main reason we do the release workflow on an older Debian release is because linking against a GLIBC that is old enough so the binary we build works reliably across older distros (more context in https://github.com/fermyon/spin/issues/168)

radu-matei avatar Mar 18 '24 11:03 radu-matei

+1 to Radu's second point. We aim to use the oldest Ubuntu image available in GH Actions. Looks like the PR workflow accidentally diverged during a previous iteration.

itowlson avatar Mar 18 '24 19:03 itowlson

@rajatjindal You asked for my feedback based on trying to get these working for the SSL stuff. I didn't really do much debugging to be honest: I could not figure out why or how the two were out of sync, so I copped out and copied the release stuff into the PR workflow so that I could have reasonable confidence in green PRs even if it was slow.

itowlson avatar Mar 18 '24 21:03 itowlson

@itowlson, what do you recommend re: using oldest ubuntu image?

I would say we should use same ubuntu version in PR and release workflow to avoid surprises after merge.

rajatjindal avatar Mar 19 '24 06:03 rajatjindal

@rajatjindal Yes. We should:

  • Use the oldest Ubuntu image available
  • And use it everywhere

itowlson avatar Mar 19 '24 17:03 itowlson