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

Introduce new-github-indexer (WIP) + Separate DB schema and DB client #9

Merged
merged 11 commits into from
Sep 29, 2023

Conversation

ofux
Copy link

@ofux ofux commented Sep 28, 2023

Il y a un commit pour separer la partie "client DB" de la partie "schema" dans deux modules differents, dans le but de pouvoir utiliser le client sur differents schemas, et de run differents ensembles de migrations.

Ensuite, il y a un debut de nouvel indexer (la partie crwaler pour le moment, c'est à dire celle qui fait les requetes à github et qui remplit le model CLEAN), en archi hexa.

Le model de CLEAN correspond presque exactement au model d'Octocrab, avec 2-3 petits complements.

Il y a aussi un nouveau repertoire de migrations diesel, pour fonctionner avec un nouveau schema indexer_clean.

Pour utiliser les commandes diesel:

cd new-github-indexer/infrastructure
diesel migration generate foobar --migration-dir migrations_indexer_clean
diesel migration run --migration-dir migrations_indexer_clean
diesel migration revert --migration-dir migrations_indexer_clean

Il reste beaucoup à faire mais je pense que certaines bases sont posées.
Il y a aussi un premier draft de contrat d'API pour l'indexer.

@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

Merging #9 (1748a94) into main (fb977a9) will decrease coverage by 0.78%.
The diff coverage is 27.86%.

@@            Coverage Diff             @@
##             main       #9      +/-   ##
==========================================
- Coverage   75.80%   75.03%   -0.78%     
==========================================
  Files         362      370       +8     
  Lines       10806    10924     +118     
==========================================
+ Hits         8192     8197       +5     
- Misses       2614     2727     +113     
Flag Coverage Δ
integration_tests 64.01% <78.46%> (-0.02%) ⬇️
unittest 33.29% <7.65%> (-0.30%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
api/src/application/budget/allocate.rs 100.00% <ø> (ø)
...rc/application/project/accept_leader_invitation.rs 0.00% <ø> (ø)
api/src/application/project/add_sponsor.rs 0.00% <ø> (ø)
api/src/application/project/create.rs 100.00% <ø> (ø)
...i/src/application/project/ignored_contributions.rs 100.00% <ø> (ø)
api/src/application/project/invite_leader.rs 0.00% <ø> (ø)
api/src/application/project/remove_sponsor.rs 0.00% <ø> (ø)
api/src/application/project/update.rs 98.96% <ø> (ø)
api/src/application/quotes/sync.rs 95.65% <ø> (ø)
api/src/application/sponsor/create.rs 100.00% <ø> (ø)
... and 74 more

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@AnthonyBuisset AnthonyBuisset merged commit ae8b7e2 into main Sep 29, 2023
9 checks passed
@AnthonyBuisset AnthonyBuisset deleted the new-github-indexer branch September 29, 2023 09:17
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.

2 participants