Skip to content

Update existing GitRefs in CreateDockerWorkerVersion

Erwan Rouchet requested to merge createdockerworkerversion-update-gitref into master

Closes #1641 (closed)

I stumbled upon multiple other issues while trying to fix this:

  • Retrying a CI pipeline that calls arkindex workers publish could cause this endpoint to move refs backwards. For example, you push commit A then commit B on master, and then retry the pipeline on commit A: the last API call will be for commit A, so in Arkindex, branch master will appear to be on commit A. Fixing this possibly requires raw SQL or changing the serializer fields.

  • Git allows a branch and a tag to have the same name, but we don't. You could hit this if you had a 1.0 branch that then becomes the 1.0 tag. This can lead to incomprehensible behaviors where one of the two refs is ignored, or a tag is moved to where a branch should be.

  • GitRefs are not sorted in any API response that returns revisions, which could lead to intermittent test failures. I hit this locally when writing a new test, but it had never happened on other tests for this endpoint.

  • There is a possibility that the API response of this endpoint might not return the correct GitRefs for an existing revision (the new case introduced in !2152 (merged)), I still need to test this.

Edited by Erwan Rouchet

Merge request reports

Loading