Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TECH] Enregistrer l'historique des réplications des données froides (PIX-16710)(PIX-16712). #11527

Merged
merged 10 commits into from
Feb 28, 2025

Conversation

aurelie-crouillebois
Copy link
Contributor

@aurelie-crouillebois aurelie-crouillebois commented Feb 27, 2025

🥞 Problème

Les exécutions du processus de réplication ne sont pas historisées.

🥓 Proposition

Transformer la route de réplication pour qu'elle lance un job orchestré par pg-boss.

🧃 Remarques

Pour tester, une 1ère réplication doit être implémentée.

😋 Pour tester

Lancer un job de réplication.

  1. Récupérer un token avec le scope réplication :
ACCESS_TOKEN=$(curl -X 'POST' \
  'https://pix-api-maddo-review-pr11527.osc-fr1.scalingo.io/api/application/token' \
  -s -H 'accept: application/json' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'grant_type=client_credentials&client_id=pixData&client_secret=pixdatasecret&scope=replication' | jq -r .access_token)
  1. Lancer une réplication :
curl -X POST https://pix-api-maddo-review-pr11527.osc-fr1.scalingo.io/api/replications/sco_certification_results -H "Authorization: Bearer $ACCESS_TOKEN"

-> Les données souhaitées ont bien été répliquées.
-> Le lancement de la réplication a été loggué avec le nombre de lignes répliquées.

@aurelie-crouillebois aurelie-crouillebois added the team-maddo Mise à Dispo de Données label Feb 27, 2025
@pix-bot-github
Copy link

Une fois les applications déployées, elles seront accessibles via les liens suivants :

Les variables d'environnement seront accessibles via les liens suivants :

@VincentHardouin VincentHardouin force-pushed the pix-16710-replication-history branch 2 times, most recently from 0b09bb5 to 70a5407 Compare February 27, 2025 16:02
@HEYGUL
Copy link
Contributor

HEYGUL commented Feb 27, 2025

Test fonctionnel ok uniquement quand START_JOB_IN_WEB_PROCESS=false sur pix-api.
Il faut modifier le fonctionnement du worker pour ne pas enregistrer les jobs de tous les groupes quand START_JOB_IN_WEB_PROCESS=true.

@nlepage nlepage force-pushed the pix-16710-replication-history branch from 76ea172 to d1e4884 Compare February 28, 2025 09:39
@aurelie-crouillebois aurelie-crouillebois marked this pull request as ready for review February 28, 2025 09:40
@nlepage nlepage force-pushed the pix-16710-replication-history branch from d1e4884 to b538e98 Compare February 28, 2025 09:52
@pix-bot-github
Copy link

Une fois les applications déployées, elles seront accessibles via les liens suivants :

Les variables d'environnement seront accessibles via les liens suivants :

@nlepage nlepage force-pushed the pix-16710-replication-history branch from b538e98 to 6a2cb12 Compare February 28, 2025 10:32
@@ -4,6 +4,7 @@ import { parse } from 'neoqs';

import { setupErrorHandling } from './config/server-setup-error-handling.js';
import { knex } from './db/knex-database-connection.js';
import * as authenticationRoutes from './lib/application/authentication/index.js';
Copy link
Member

Choose a reason for hiding this comment

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

A revoir un de ces quatre pour éviter d'importer toutes les routes d'authent inutilement

@VincentHardouin VincentHardouin changed the title [TECH] Enregistrer l'historique des réplications des données froides [TECH] Enregistrer l'historique des réplications des données froides (PIX-16710) Feb 28, 2025
@VincentHardouin VincentHardouin changed the title [TECH] Enregistrer l'historique des réplications des données froides (PIX-16710) [TECH] Enregistrer l'historique des réplications des données froides (PIX-16710)(PIX-16712). Feb 28, 2025
nlepage and others added 10 commits February 28, 2025 12:03
Co-authored-by: Aurélie Crouillebois <[email protected]>
Co-authored-by: Ce que tu veux <[email protected]>
Co-authored-by: Vincent Hardouin <[email protected]>
Co-authored-by: Aurélie Crouillebois <[email protected]>
Co-authored-by: Ce que tu veux <[email protected]>
Co-authored-by: Vincent Hardouin <[email protected]>
Co-authored-by: Nicolas Lepage <[email protected]>
Co-authored-by: Guillaume Lagorce <[email protected]>
Co-authored-by: Aurélie Crouillebois <[email protected]>
Co-authored-by: Aurélie Crouillebois <[email protected]>
Co-authored-by: Vincent Hardouin <[email protected]>
Co-authored-by: Aurélie Crouillebois <[email protected]>
Co-authored-by: Vincent Hardouin <[email protected]>
Co-authored-by: Aurélie Crouillebois <[email protected]>
Co-authored-by: Vincent Hardouin <[email protected]>
Co-authored-by: Aurélie Crouillebois <[email protected]>
Co-authored-by: Vincent Hardouin <[email protected]>
@nlepage nlepage added the Func Review OK PO validated functionally the PR label Feb 28, 2025
@pix-service-auto-merge pix-service-auto-merge merged commit 40d5aa9 into dev Feb 28, 2025
9 of 11 checks passed
@pix-service-auto-merge pix-service-auto-merge deleted the pix-16710-replication-history branch February 28, 2025 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Func Review OK PO validated functionally the PR 🚀 Ready to Merge team-maddo Mise à Dispo de Données Tech Review OK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants