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

Final split between legacy compose and BAN-ID data processing #375

Merged

Conversation

antoineludeau
Copy link
Member

@antoineludeau antoineludeau commented Mar 12, 2024

WARNING : pre-requisite on this other PR : #383

Context

For now, data coming from the new API system (REST API + Postgres + export to Mongo) was going into temporary collections to be able to tests the system with real case scenario.
Now that tests have been done, we need to make the final switch to connect the new system to the current mongo exploited collections.

Enhancement

With this PR, there are the following changes :

  • a new route /api/legacy-compose/:codeCommune/ used only by "id-fix". The current route /ban/communes/:codeCommune/compose is now sending a request to "if-fix" ONLY.
  • the bal garbage collector has been modified so that it sends the de-synchronized district to "id-fix" instead of asking for a legacy compose.
  • a new property "withBanId" has been added to "communes" collection data to be able to differentiate data that comes from the legacy (withBanId=false) and data that comes from the new system (withBanId=true). This property is also used in the legacy compose to not compose a district that would have passed by the new system.
  • a new flag "ignoreIdConfig" used in legacy compose to be able to revert a district from the new system to the legacy system (in a case where a district have published its district with BAN-ID and then would like to publish it without them).

@antoineludeau antoineludeau self-assigned this Mar 12, 2024
@antoineludeau antoineludeau force-pushed the antoineludeau/add-legacy-compose-route-for-id-fix branch from e561768 to ff5ce9a Compare March 13, 2024 13:42
@antoineludeau antoineludeau marked this pull request as ready for review March 13, 2024 13:53
@antoineludeau antoineludeau marked this pull request as draft March 28, 2024 09:51
@antoineludeau antoineludeau force-pushed the antoineludeau/add-legacy-compose-route-for-id-fix branch 2 times, most recently from 46cfad9 to 3e45022 Compare March 28, 2024 15:34
lib/api/legacy-routes.cjs Outdated Show resolved Hide resolved
lib/compose/bal-garbage-collector/index.js Outdated Show resolved Hide resolved
lib/api/legacy-routes.cjs Show resolved Hide resolved
@antoineludeau antoineludeau force-pushed the antoineludeau/add-legacy-compose-route-for-id-fix branch from 3e45022 to 04616cf Compare April 16, 2024 14:30
@antoineludeau antoineludeau marked this pull request as ready for review April 16, 2024 14:34
@antoineludeau antoineludeau force-pushed the antoineludeau/add-legacy-compose-route-for-id-fix branch from b4a9906 to db4e3bb Compare April 16, 2024 16:02
@antoineludeau antoineludeau requested review from IGNFBourcier, nkokla and jbouhadoun and removed request for mmortier April 17, 2024 10:30
@antoineludeau antoineludeau force-pushed the antoineludeau/add-legacy-compose-route-for-id-fix branch from db4e3bb to b4dc0d8 Compare April 18, 2024 09:11
@antoineludeau antoineludeau merged commit bad9ab8 into master Apr 22, 2024
1 check passed
@antoineludeau antoineludeau deleted the antoineludeau/add-legacy-compose-route-for-id-fix branch April 24, 2024 09:58
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.

traitement différentié de la données legacy vs new api
3 participants