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

Workflow race condition #83

Open
jpm-canonical opened this issue Aug 28, 2024 · 2 comments · May be fixed by #84
Open

Workflow race condition #83

jpm-canonical opened this issue Aug 28, 2024 · 2 comments · May be fixed by #84
Labels
bug Something isn't working CI Continuous Integration

Comments

@jpm-canonical
Copy link
Contributor

jpm-canonical commented Aug 28, 2024

There could be a race condition where latest/edge got updated after this workflow published, and before it can promote - making it promote a different snap revision than the one we tested.

  1. Can we publish the same artifact to latest/beta?
  2. Can we get the revision number from the publish step, and use that in the promote?

Originally posted by @jpm-canonical in #81 (comment)

@jpm-canonical
Copy link
Contributor Author

jpm-canonical commented Aug 28, 2024

Approach 1 fails. See workflow logs.

Publishing snap "matter-pi-gpio-commander_2.0+chip-5bff3a5a_arm64.snap"...
Installing Snapcraft...
/usr/bin/sudo snap install --classic snapcraft
snapcraft 8.3.2 from Canonical** installed
/snap/bin/snapcraft upload matter-pi-gpio-commander_2.0+chip-5bff3a5a_arm64.snap --release latest/beta/test
Uploading... (--->)
Uploading... (<---)
Status: processing
Status: error while processing
Issues while processing snap:
- binary_sha3_384: Error checking upload uniqueness.
Full execution log: '/home/runner/.local/state/snapcraft/log/snapcraft-20240828-111452.881[9](https://github.com/canonical/matter-pi-gpio-commander/actions/runs/10595393598/job/29361633789#step:3:10)83.log'
Error: The process '/snap/bin/snapcraft' failed with exit code 1

@farshidtz
Copy link
Member

farshidtz commented Aug 29, 2024

We could publish the snap to edge using command line (instead of the GH action), capture the revision number from the standard output, then pass it to the job for releasing that same revision to beta.

@farshidtz farshidtz added bug Something isn't working CI Continuous Integration labels Aug 29, 2024
@farshidtz farshidtz linked a pull request Aug 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CI Continuous Integration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants