Skip to content

SOA-503 — Corriger et récapituler les rapports d'erreurs#65

Open
jvk88511334 wants to merge 6 commits into
developfrom
feature/SOA-503-correction-rapports-erreurs
Open

SOA-503 — Corriger et récapituler les rapports d'erreurs#65
jvk88511334 wants to merge 6 commits into
developfrom
feature/SOA-503-correction-rapports-erreurs

Conversation

@jvk88511334

Copy link
Copy Markdown
Member

Pourquoi

Les erreurs de validation 400 et les autres erreurs étaient regroupées dans un même rapport et les fichiers .bad n'étaient pas conservés dans un emplacement durable. Les erreurs 400 généraient également trop de notifications immédiates.

Modifications

  • crée automatiquement le sous-répertoire durable bad/ ;
  • sépare chaque rapport en <fichier>_400.bad et <fichier>_other.bad selon la présence de publication title : ;
  • envoie immédiatement un lien vers _other.bad pour les erreurs hors 400 ;
  • envoie à 23 h un unique récapitulatif quotidien des _400.bad ;
  • persiste la dernière borne d'envoi pour reprendre les rapports après un redémarrage ou un échec ;
  • n'envoie aucun email immédiat pour un traitement contenant uniquement des erreurs 400 ;
  • documente la conception et le plan d'implémentation.

Impact

Les rapports restent accessibles dans le volume de rapports configuré. Les fonctionnels reçoivent les erreurs hors 400 immédiatement et les erreurs 400 dans un seul email quotidien.

Validation

  • mvn clean test
  • 41 tests réussis, 0 échec, 0 erreur

villiseck added 6 commits July 16, 2026 15:39
…ers/villiseck.LEVANT/Documents/Plateformes/convergence/logskbart-api/src/test/java/fr/abes/logskbart/kafka/ErrorClassifierTest.java).

Ils couvrent six cas :
Deux messages contenant publication title :  → AUTRE_ERREUR.
Quatre erreurs de validation sans ce marqueur → ERREUR_400.
Add JUnit 5 tests for ErrorClassifier (src/test/java/fr/abes/logskbart/kafka/ErrorClassifierTest.java). Tests assert that messages containing duplicate KBART data are classified as AUTRE_ERREUR (including when the duplicate marker appears anywhere in the message) and that various validation messages are classified as ERREUR_400 using a parameterized test.
@jvk88511334
jvk88511334 marked this pull request as ready for review July 16, 2026 17:40

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2003f0cd81

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +38 to +39
Files.deleteIfExists(report400);
Files.deleteIfExists(reportOther);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve pending reports across clean retries

When the same KBART filename is processed again before the daily recap runs (or before someone clicks an immediate _other.bad email), these deletes remove the existing reports even if the new run has no errors in that category. Because the recap finder uses the durable _400.bad files as its source of truth, a pending 400 report can disappear without ever being included, and previously sent _other.bad links can become dead after a clean retry.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant