Skip to content

feat(zone): port the gitlab zone bridge to server-nestjs - #2807

Open
shikanime wants to merge 1 commit into
mainfrom
pr/zone-bridges
Open

shikanime wants to merge 1 commit into
mainfrom
pr/zone-bridges

Conversation

@shikanime

@shikanime shikanime commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Issues liées

Quel est le comportement actuel ?

Sans ce pont, le provisioning gitlab des zones cesse silencieusement à la bascule #2770 : plus de repo infra de zone.

Quel est le nouveau comportement ?

Porte le pont zone gitlab de plugins/gitlab vers server-nestjs (suite au fil #2487).

  • GitlabService : zone.upsert garantit le repo infra de la zone ; zone.delete le supprime (parité plugins/gitlab deleteZone, suppression définitive permanentlyRemove)
  • Factorise unlessNotFound depuis les 7 sites catch-404 gitbeaker existants
  • Parité comportementale avec plugins/gitlab/src/functions.ts:189

@shikanime
shikanime requested a review from a team as a code owner October 1, 2026 13:10
@github-actions github-actions Bot added the built label Oct 1, 2026

@StephaneTrebel StephaneTrebel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 blocking — GitHub indique mergeStateStatus=DIRTY : pr/zone-bridges ne peut pas être intégrée dans sa base empilée pr/zone-migration. La comparaison montre 9 commits d’avance et 44 de retard ; merci de rebaser pr/zone-bridges sur le HEAD courant de pr/zone-migration, de résoudre les conflits et de relancer la CI avant la revue fonctionnelle des ponts Keycloak/GitLab.

@StephaneTrebel StephaneTrebel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

La parité Keycloak/GitLab doit être couverte avant de pouvoir autoriser la bascule de routage des zones.

Comment thread apps/server-nestjs/src/modules/gitlab/gitlab.service.ts
Base automatically changed from pr/zone-migration to main October 2, 2026 16:35
@shikanime shikanime moved this to Hypotheses in Cloud Pi Native Oct 5, 2026

@shikanime shikanime left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebase sur main effectué et poussé (tête : d7f874ef, contenu inchangé : 15 fichiers, +153/−121 ; gates vertes : tsc, 145 tests unitaires ciblés, lint scoped — le seul écart lint de zone.service.spec.ts existe déjà sur main). Trois blocants et un import à corriger avant merge, en commentaires inline : chemin GitLab double-préfixé dans deleteInfraGroupRepo, ordre client/Vault dans syncZone, régression multi-chemins auditor liée à la suppression de parseGroupPaths. Point positif : la parité legacy est documentée dans le code (commentaires « ported from ») et argocdUrl est propagé proprement de ZoneEventPayload jusqu'aux specs e2e.

Comment thread apps/server-nestjs/src/modules/gitlab/gitlab-client.service.ts Outdated
Comment thread apps/server-nestjs/src/modules/keycloak/keycloak.service.ts Outdated
Comment thread apps/server-nestjs/src/modules/gitlab/gitlab.service.ts Outdated
Comment thread apps/server-nestjs/src/modules/gitlab/gitlab-health.service.ts Outdated
Comment thread apps/server-nestjs/src/modules/gitlab/gitlab.utils.ts Outdated
shikanime added a commit that referenced this pull request Oct 9, 2026
Design: the zone.upsert payload carried argocdUrl from the caller's
in-memory zone object, so a replayed event (retry, future automatic
reconciliation) could not resolve it. The payload now carries only
durable ids and syncZone re-fetches the zone via getZoneById.

Also factor the repeated gitbeaker 404-to-undefined try/catch into
unlessNotFound (7 sites).

Related: #2807

Co-authored-by: Automata <automata@shikanime.studio>
shikanime added a commit that referenced this pull request Oct 12, 2026
Ports the legacy plugins/gitlab zone handlers (infra group repo
lifecycle) to the server-nestjs gitlab module: zone.upsert ensures the
zone infra repository, zone.delete cleans it up.

The zone event payload now carries only durable ids (id, slug): the
keycloak ArgoCD OIDC client bridge was dropped along with the argocdUrl
field, as provisioning that client is no longer needed.

Also factors the repeated gitbeaker 404-to-undefined try/catch into
unlessNotFound (7 sites).

Related: #2807

Co-authored-by: Automata <automata@shikanime.studio>
Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr>
Change-Id: Id23a51a6fdcfdaf53fcb6dea545e222c6a6a6964
@shikanime shikanime changed the title feat(zone): port keycloak and gitlab zone bridges to server-nestjs feat(zone): port the gitlab zone bridge to server-nestjs Oct 12, 2026
shikanime added a commit that referenced this pull request Oct 12, 2026
Ports the legacy plugins/gitlab zone handlers (infra group repo
lifecycle) to the server-nestjs gitlab module: zone.upsert ensures the
zone infra repository, zone.delete cleans it up.

The zone event payload now carries only durable ids (id, slug): the
keycloak ArgoCD OIDC client bridge was dropped along with the argocdUrl
field, as provisioning that client is no longer needed.

Also factors the repeated gitbeaker 404-to-undefined try/catch into
unlessNotFound (7 sites).

Related: #2807

Co-authored-by: Automata <automata@shikanime.studio>
Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr>
Change-Id: Id23a51a6fdcfdaf53fcb6dea545e222c6a6a6964
shikanime added a commit that referenced this pull request Oct 12, 2026
Ports the legacy plugins/gitlab zone handlers (infra group repo
lifecycle) to the server-nestjs gitlab module: zone.upsert ensures the
zone infra repository, zone.delete cleans it up.

The zone event payload now carries only durable ids (id, slug): the
keycloak ArgoCD OIDC client bridge was dropped along with the argocdUrl
field, as provisioning that client is no longer needed.

Also factors the repeated gitbeaker 404-to-undefined try/catch into
unlessNotFound (7 sites).

Related: #2807

Co-authored-by: Automata <automata@shikanime.studio>
Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr>
Change-Id: Id23a51a6fdcfdaf53fcb6dea545e222c6a6a6964
@shikanime
shikanime changed the base branch from main to refactor/ensure-vocabulary October 12, 2026 13:32
@shikanime
shikanime added this pull request to stack #2850 October 12, 2026 14:11
Base automatically changed from refactor/ensure-vocabulary to main October 15, 2026 09:00
shikanime added a commit that referenced this pull request Oct 15, 2026
Ports the legacy plugins/gitlab zone handlers (infra group repo
lifecycle) to the server-nestjs gitlab module: zone.upsert ensures the
zone infra repository, zone.delete cleans it up.

The zone event payload now carries only durable ids (id, slug): the
keycloak ArgoCD OIDC client bridge was dropped along with the argocdUrl
field, as provisioning that client is no longer needed.

Also factors the repeated gitbeaker 404-to-undefined try/catch into
unlessNotFound (7 sites).

Related: #2807

Co-authored-by: Automata <automata@shikanime.studio>
Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr>
Change-Id: Id23a51a6fdcfdaf53fcb6dea545e222c6a6a6964
shikanime added a commit that referenced this pull request Oct 15, 2026
Ports the legacy plugins/gitlab zone handlers (infra group repo
lifecycle) to the server-nestjs gitlab module: zone.upsert ensures the
zone infra repository, zone.delete cleans it up.

The zone event payload now carries only durable ids (id, slug): the
keycloak ArgoCD OIDC client bridge was dropped along with the argocdUrl
field, as provisioning that client is no longer needed.

Also factors the repeated gitbeaker 404-to-undefined try/catch into
unlessNotFound (7 sites).

Related: #2807

Co-authored-by: Automata <automata@shikanime.studio>
Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr>
Change-Id: Id23a51a6fdcfdaf53fcb6dea545e222c6a6a6964
@shikanime
shikanime force-pushed the pr/zone-bridges branch 2 times, most recently from a0d70c4 to 9b5f0b1 Compare October 15, 2026 15:18
@shikanime shikanime closed this Oct 15, 2026
@shikanime
shikanime deleted the pr/zone-bridges branch October 15, 2026 15:29
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Cloud Pi Native Oct 15, 2026
@shikanime shikanime reopened this Oct 15, 2026
@github-project-automation github-project-automation Bot moved this from Done to Refinement in Cloud Pi Native Oct 15, 2026
@shikanime
shikanime dismissed stale reviews from StephaneTrebel and StephaneTrebel October 15, 2026 16:15

Obsoleted by subsequent pushes: all blocking findings from this round are fixed or moot at head 118a336 (see resolved review threads). Dismissed to clear the stale gate; re-review requested.

Ports the legacy plugins/gitlab zone handlers (infra group repo
lifecycle) to the server-nestjs gitlab module: zone.upsert ensures the
zone infra repository, zone.delete cleans it up.

The zone event payload now carries only durable ids (id, slug): the
keycloak ArgoCD OIDC client bridge was dropped along with the argocdUrl
field, as provisioning that client is no longer needed.

Also factors the repeated gitbeaker 404-to-undefined try/catch into
unlessNotFound (7 sites).

handleUpsertZone / handleDeleteZone are covered by gitlab.service.spec
specs (success and KO plugin result on each event).

Related: #2864

Co-authored-by: Automata <automata@shikanime.studio>
Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr>
Change-Id: Id23a51a6fdcfdaf53fcb6dea545e222c6a6a6964
@cloud-pi-native-sonarqube

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants