felixmosh / turborepo-gh-artifacts

A TurboRepo local cache server which uploads artifact cache to GH artifacts.
MIT License
122 stars 7 forks source link

feat: ignore 409 conflict errors #24

Closed Ugzuzg closed 8 months ago

Ugzuzg commented 8 months ago

With @actions/artifact@2 the artifacts are becoming visible before the whole workflow completes and turned immutable:

  • Once uploaded, an Artifact ID is returned and Artifacts are immediately available in the UI and REST API. Previously, you would have to wait for the run to be completed before an ID was available or any APIs could be utilized.
  • Artifacts can now be downloaded and deleted from the UI before the entire workflow run finishes.
  • The contents of an Artifact are uploaded together into an immutable archive. They cannot be altered by subsequent jobs. Both of these factors help reduce the possibility of accidentally corrupting Artifact files. (Digest/integrity hash coming soon in the API!)

That means, if two jobs are running in parallel and will try to publish an artifact with the same name, the job will error. But since the hash is matching, the contents must be the same, so we can simply ignore it.

felixmosh commented 8 months ago

Make sense, thank you 🙏🏼