fix(server-nestjs): make GitLab repo create and commit idempotent - #2624
Draft
shikanime wants to merge 2 commits into
Draft
fix(server-nestjs): make GitLab repo create and commit idempotent#2624shikanime wants to merge 2 commits into
shikanime wants to merge 2 commits into
Conversation
shikanime
force-pushed
the
fix/gitlab-create-commit-idempotent
branch
from
August 28, 2026 11:39
7beb262 to
1447eff
Compare
Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr> Change-Id: Iff465b31836b84656a084678aeec082a6a6a6964
Refs #2621 Co-authored-by: Automata <automata@shikanime.studio> Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr> Change-Id: Ia59f39459a4b68f283b8d8786cf7fda06a6a6964
shikanime
force-pushed
the
fix/gitlab-create-commit-idempotent
branch
from
August 28, 2026 14:20
1447eff to
c29170c
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

0 New Issues
0 Fixed Issues
0 Accepted Issues
Issues liées
Quel est le comportement actuel ?
Deux trous d'idempotence dans
GitlabClientService:createGroupRepoappelleProjects.createsans tolérance de collision. Sous synchro concurrente, le perdant lèvehas already been taken.maybeCreateCommitlit le fichier puis appelleCommits.createséparément. Deux synchros qui se chevauchent peuvent toutes deux voir le fichier absent, émettre une actioncreate, et la seconde rencontrealready exists(400) sans tolérance.Comportement attendu
createGroupReporecharge le dépôt existant (recherche dansProjects.allpar nom) et le retourne en cas de collision.maybeCreateCommittraite une erreuralready exists/has already been taken(ou 400) comme un commit déjà appliqué, vérifie que le fichier existe désormais et continue sans lever.Changements
createGroupRepo: enveloppeProjects.createet recharge le dépôt existant en cas de collision.maybeCreateCommit: tolère un commit déjà appliqué (concurrence) et poursuit sans lever quand le fichier est présent.