-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix(dora): fix dora service thematics rejected by the quality check #314
base: main
Are you sure you want to change the base?
Conversation
Note : tu peux sortir la PR de draft maintenant puisque ça ne sera déployé en staging que avec le label "deploy-to-staging". Et sinon... Tu vois ça sera cool quand on aura ton test unitaire parce que il deviendra ultra simple avec ta première fixture de faire des nouveaux tests qui s'appuient dessus ! Dernière chose : intéressant comme approche que celle que tu proposes, en gros "corriger ce qu'envoie Dora". A une autre époque on aurait changé le schéma de DI, accepté cette nouvelle valeur, etc etc. Par contre sur le fond : si on retire le |
/* Dora made some changes to the thematics which add '--autre' in some cases. | ||
We do not need them, thus they are removed from the table in order to pass the checks */ | ||
ARRAY( | ||
SELECT REGEXP_REPLACE(other, '--autre$', '', 'g') |
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.
Sur la forme : c'est un peu brutal de recourir à une regexp avec un matching "à chaque occurrence" (avec le "g") quand on peut probablement juste utiliser REPLACE. Non ? Les performances te diront merci !
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.
j'aime tellement regex que j'en oublie que replace existe
We do not need them, thus they are removed from the table in order to pass the checks */ | ||
ARRAY( | ||
SELECT REGEXP_REPLACE(other, '--autre$', '', 'g') | ||
FROM UNNEST(services.thematiques) AS other |
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.
nit-picking : tant qu'à faire, AS unnested
plutot que un nom générique comme other
?
replace instead of regex
365c782
to
5d9b43e
Compare
Suite à des modifications du coté de DORA la sous thématique --autre n'est plus remplacée par un null.
Il est donc nécessaire de le faire de notre côté.
@vperron je n'ai pas ajouté les tests car ça presse je le mettrai avec mon autre PR qui corrige les autres erreurs de service