Skip to content

refactor(user): strangler offload routes to server-nestjs - #2739

Merged
shikanime merged 1 commit into
mainfrom
pr/user-strangler
Oct 5, 2026
Merged

shikanime merged 1 commit into
mainfrom
pr/user-strangler

Conversation

@shikanime

@shikanime shikanime commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

Issues liées

Refs #1889


Quel est le comportement actuel ?

/api/v1/users est servie par l'ancienne application Fastify apps/server via le catch-all /api/ de nginx-strangler.

Quel est le nouveau comportement ?

La route est basculée vers server-nestjs dans apps/nginx-strangler/conf.d/routing.conf (location /api/v1/users). Empilée sur la migration du module user (#2738) : la bascule ne devient effective qu'une fois ce module fusionné.

Cette PR introduit-elle un breaking change ?

Non.

Autres informations

Recréée pour #1889 (remplace #2499, non réouvrable après suppression de branche). Rollback selon le README : commenter le bloc (# ROLLBACK AAAA-MM-JJ) puis nginx -s reload.

@github-actions github-actions Bot added the built label Sep 17, 2026
@shikanime
shikanime changed the base branch from pr/user-migration to main September 17, 2026 10:31
@shikanime shikanime self-assigned this Sep 17, 2026
@shikanime shikanime added this to the 9.27.0 milestone Sep 17, 2026
Comment thread apps/nginx-strangler/conf.d/routing.conf
Comment thread apps/nginx-strangler/conf.d/routing.conf
@shikanime
shikanime changed the base branch from main to pr/user-migration September 17, 2026 15:47
@shikanime
shikanime added this pull request to stack #2747 September 18, 2026 08:41
@shikanime
shikanime removed this pull request from stack #2747 September 18, 2026 09:45
@shikanime
shikanime added this pull request to stack #2751 September 18, 2026 09:46
@shikanime
shikanime marked this pull request as ready for review September 23, 2026 14:49
@shikanime
shikanime requested a review from a team as a code owner September 23, 2026 14:50
@shikanime shikanime added the preview Deploy preview app with Argo-cd label Sep 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🤖 Hey !

A preview of the application is available at : https://console-pr-2739.dso.cpin-hp.numerique-interieur.fr

Please be patient, deployment may take a few minutes.

Comment thread apps/server-nestjs/src/modules/user/user.controller.spec.ts Fixed
@shikanime

Copy link
Copy Markdown
Member Author

PR réduite à la bascule nginx.

Le doublon user.controller.spec.ts est retiré : la variante obsolète (avec as never) est remplacée par la version de référence de #2738, qui verrouille les mêmes permissions via toContractUser.

Diff actuel : apps/nginx-strangler/conf.d/routing.conf uniquement.

StephaneTrebel
StephaneTrebel previously approved these changes Sep 28, 2026
@shikanime shikanime removed the preview Deploy preview app with Argo-cd label Sep 28, 2026
@shikanime shikanime reopened this Oct 2, 2026
@shikanime
shikanime force-pushed the pr/user-strangler branch 2 times, most recently from 4d404ea to b1942a2 Compare October 2, 2026 11:56

@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.

Verdict : Commentaire

Le DIRTY signalé le 01/10 est levé : la branche est MERGEABLE sur pr/user-migration (BEHIND uniquement — le retarget de pile est porté par la stack #2751). Le diff tient en une location /api/v1/users de 9 lignes vers server-nestjs, exactement le gabarit des bascules précédentes, rollback documenté en tête de routing.conf. CI verte à la tête (run 37005360077), scan de sécurité : néant.

✨ Extraire la bascule nginx de la migration du module (#2738) permet de rejouer le cutover indépendamment du code NestJS — découpage de risque correct.

Comment thread apps/nginx-strangler/conf.d/routing.conf

@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 règle Nginx est cohérente avec la couche user, mais elle rendrait effective la régression d’accès public actuellement présente dans #2738. Le ledger #1889 reste globalement ouvert ; la CI est verte et ce fil bloquant dépend du correctif de la couche précédente.

StephaneTrebel
StephaneTrebel previously approved these changes Oct 2, 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.

La cible NestJS conserve désormais l’accès public à /api/v1/users/matching ; la bascule nginx ne réintroduit plus la régression signalée. Fils résolus et CI verte.

@shikanime
shikanime dismissed StephaneTrebel’s stale review October 2, 2026 14:58

The merge-base changed after approval.

@shikanime
shikanime force-pushed the pr/user-strangler branch 2 times, most recently from 7397a67 to cdc8cca Compare October 2, 2026 15:08
@shikanime
shikanime force-pushed the pr/user-strangler branch 2 times, most recently from 020a40b to 93bbf69 Compare October 2, 2026 15:42
Base automatically changed from pr/user-migration to main October 2, 2026 16:35
Co-authored-by: Automata <automata@shikanime.studio>
@cloud-pi-native-sonarqube

Copy link
Copy Markdown

@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.

Approbation renouvelée : la migration user désormais intégrée conserve l’accès public de /api/v1/users/matching ; la bascule nginx ne réintroduit pas la régression précédemment signalée.

@shikanime
shikanime added this pull request to the merge queue Oct 5, 2026
Merged via the queue into main with commit 37b9a19 Oct 5, 2026
34 checks passed
@shikanime
shikanime deleted the pr/user-strangler branch October 5, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

built refactor Refactor code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants