-
Notifications
You must be signed in to change notification settings - Fork 0
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
[QA] Notifier le support en cas d’échec de synchro sur la base de donnée #3702
[QA] Notifier le support en cas d’échec de synchro sur la base de donnée #3702
Conversation
19e2f6f
to
ca5f2ac
Compare
@@ -44,7 +44,7 @@ ESABORA_CRON_CLOCK_SLEEP_INTERVAL=60 #second | |||
ESABORA_CRON_SCHEDULE_SYNC_SCHS='*/1 * * * *' | |||
ESABORA_CRON_SCHEDULE_SYNC_SISH='*/2 * * * *' | |||
ESABORA_CRON_SCHEDULE_SYNC_SISH_INTERVENTION='*/3 * * * *' | |||
METABASE_CRON_SCHEDULE_SYNC_BDD='0 1 * * *' | |||
METABASE_CRON_SCHEDULE_SYNC_BDD='0 3 * * *' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changement de l'heure car les backups se terminent entre 1h et 2h du matin
@@ -70,6 +70,8 @@ HISTORY_TRACKING_ENABLE=1 | |||
DELAY_MIN_CHECK_NEW_SIGNALEMENT_FILES=30 #minutes | |||
ALBERT_API_KEY= | |||
FEATURE_MULTI_TERRITORIES=0 | |||
SEND_ERROR_EMAIL_TOKEN= | |||
HISTOLOGE_PROD_URL= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ajout d'un token pour l'envoi de mail, et de l'url de la prod pour appeler le endpoint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Est-ce qu'on renseignerait pas l'url directement ici (pour éviter d'oublier de le changer à l'avenir) ?
@@ -48,8 +48,29 @@ backup_file_name="$(ls /app/*.sql)" | |||
echo ">>> Remove CREATE and USE instruction" | |||
sed -i '/CREATE DATABASE/d' "${backup_file_name}" | |||
sed -i '/^USE/d' "${backup_file_name}" | |||
sed -i '/DEFINER/d' "${backup_file_name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposition du support scalingo pour éviter le pb sur la création de la vue
|
||
echo ">>> Error reported to API." | ||
fi | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script pour intercepter l'erreur et envoyer un mail au support via le endpoint
@@ -134,4 +136,29 @@ public function logout(): void | |||
{ | |||
throw new \LogicException('This method can be blank - it will be intercepted by the logout key on your firewall.'); | |||
} | |||
|
|||
#[Route('/send-error-email', methods: ['POST'])] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
je ne suis pas sûre que ce soit le meilleur controller pour ce endpoint. Si vous avez d'autres idées
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je pense que j'aurais fait un contrôleur dédié mais ca me choque pas non plus ici
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quelques remarques mais j'approuve
@@ -70,6 +70,8 @@ HISTORY_TRACKING_ENABLE=1 | |||
DELAY_MIN_CHECK_NEW_SIGNALEMENT_FILES=30 #minutes | |||
ALBERT_API_KEY= | |||
FEATURE_MULTI_TERRITORIES=0 | |||
SEND_ERROR_EMAIL_TOKEN= | |||
HISTOLOGE_PROD_URL= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Est-ce qu'on renseignerait pas l'url directement ici (pour éviter d'oublier de le changer à l'avenir) ?
@@ -134,4 +136,29 @@ public function logout(): void | |||
{ | |||
throw new \LogicException('This method can be blank - it will be intercepted by the logout key on your firewall.'); | |||
} | |||
|
|||
#[Route('/send-error-email', methods: ['POST'])] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je pense que j'aurais fait un contrôleur dédié mais ca me choque pas non plus ici
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok pour tester IRL
|
Ticket
#3636
Description
Création d'un endpoint sur histologe pour notifier le support en cas de pb de synchro
Changements apportés
Pré-requis
Tests
Ce n'est pas si simple à tester. J'ai fait 2 tests de mon côté.
J'ai copié les lignes 47 à 76 du script dans un autre fichier bash placé à côté d'un dump récent pour voir si l'ajout de la ligne 51 permettait la création de la Vue, j'ai l'impression que oui.
Et sinon j'ai fait le curl dans une invite de commande pour vérifier l'envoi du mail d'erreur.
Si vous avez des idées pour tester mieux que ça, trop bien !