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

(PC-30523)[API] chore: script to migrate Gibert Joseph to new provider #12923

Conversation

tcoudray-pass
Copy link
Contributor

@tcoudray-pass tcoudray-pass commented Jun 25, 2024

But de la pull request

Ticket Jira (ou description si BSR) : https://passculture.atlassian.net/browse/PC-30523

Ce script ne sera mergé. Il sera exécuter demain en prod pour permettre au provider NUSSEO de reprendre la main sur les magasins Gilbert Joseph.

Vérifications

  • J'ai écrit les tests nécessaires
  • J'ai relu attentivement les migrations, en particulier pour éviter les locks, et je préviens les équipes Shérif et Data
  • J'ai ajouté des screenshots pour d'éventuels changements graphiques

@tcoudray-pass tcoudray-pass force-pushed the tcoudray-pass/PC-30523-migration-script-for-Gibert-Joseph branch from 0cfe7c3 to 4a23027 Compare June 25, 2024 09:35
@tcoudray-pass tcoudray-pass force-pushed the tcoudray-pass/PC-30523-migration-script-for-Gibert-Joseph branch 2 times, most recently from 101e5b1 to b227e8a Compare June 25, 2024 09:52
@tcoudray-pass tcoudray-pass changed the title (PC-30523)[API] chore: script to migrate Gilbert Joseph to new provider (PC-30523)[API] chore: script to migrate Gibert Joseph to new provider Jun 25, 2024
Comment on lines 69 to 70
if len(venue.venueProviders):
for venue_provider in venue.venueProviders:
Copy link
Contributor

Choose a reason for hiding this comment

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

(détail)

Suggested change
if len(venue.venueProviders):
for venue_provider in venue.venueProviders:
for venue_provider in venue.venueProviders:

Revient au même et est plus direct, non ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

J'ai repris du code d'un script existant. Je pense que tu as raison mais vu que ce script ne sera mergé, je pense que ce n'est pas grave de le laisser tel quel :)

api/src/pcapi/scripts/provider_migration/main.py Outdated Show resolved Hide resolved
Comment on lines +76 to +108
edit_venue_provider(
2110, # Provider: NUSSEO
[ # Venues: Gibert Joseph venues
18081,
17724,
17723,
17721,
17725,
17726,
17820,
17874,
17825,
17826,
17827,
17828,
17829,
14929,
17836,
17839,
17840,
17842,
17718,
17719,
17680,
17844,
17845,
49517,
],
"matthieu.geoffray@passculture.app",
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Est-ce qu'il ne serait pas préférable de laisser ces paramètres hors de la PR ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

C'est un script one shot qui ne va pas être mergé et qui va être runné via le job console donc on garde les éléments en dur.

Copy link
Contributor

Choose a reason for hiding this comment

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

Et cette adresse email est publique sur git :)

api/src/pcapi/scripts/provider_migration/main.py Outdated Show resolved Hide resolved
@tcoudray-pass tcoudray-pass force-pushed the tcoudray-pass/PC-30523-migration-script-for-Gibert-Joseph branch from b227e8a to 5c5115b Compare June 25, 2024 14:46
@tcoudray-pass tcoudray-pass force-pushed the tcoudray-pass/PC-30523-migration-script-for-Gibert-Joseph branch from 5c5115b to e7dcd28 Compare June 25, 2024 15:29
@tcoudray-pass tcoudray-pass deleted the tcoudray-pass/PC-30523-migration-script-for-Gibert-Joseph branch June 26, 2024 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants