wargabantuwarga.com
wargabantuwarga.com copied to clipboard
feat: use vaccination database data for `Tempat vaksin`
Closes https://github.com/kawalcovid19/wargabantuwarga.com/issues/805
Description
Still a draft...
The approach taken will be similar to the one defined in https://github.com/kawalcovid19/wargabantuwarga.com/issues/805.
Current Tasks
- [x] prevent undefined province error in vaccination DB fetcher
- [x] omit current vaccination data
- [x] append new vaccination data
- [ ] extract the data merging to a helper function so it can be used by [contactSlug] page
β Deploy Preview for wargabantuwarga failed.
π¨ Explore the source changes: 3f4674448a028fd8694a70df42bce006aa47244d
π Inspect the deploy log: https://app.netlify.com/sites/wargabantuwarga/deploys/617bbc63a881010007c1c411
Codecov Report
Merging #817 (37b8362) into main (43d0ab3) will increase coverage by
0.01%
. The diff coverage is100.00%
.
:exclamation: Current head 37b8362 differs from pull request most recent head 3f46744. Consider uploading reports for the commit 3f46744 to get more accurate results
@@ Coverage Diff @@
## main #817 +/- ##
==========================================
+ Coverage 87.06% 87.08% +0.01%
==========================================
Files 134 134
Lines 1438 1440 +2
Branches 455 455
==========================================
+ Hits 1252 1254 +2
Misses 181 181
Partials 5 5
Impacted Files | Coverage Ξ | |
---|---|---|
etc/fetchers/fetch-vaccination-database.ts | 100.00% <100.00%> (ΓΈ) |
|
pages/provinces/[provinceSlug]/index.tsx | 100.00% <100.00%> (ΓΈ) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Ξ = absolute <relative> (impact)
,ΓΈ = not affected
,? = missing data
Powered by Codecov. Last update 43d0ab3...3f46744. Read the comment docs.
Hi mas @zainfathoni, I believe https://github.com/kawalcovid19/wargabantuwarga.com/issues/804 is a prerequisite for this PR to be done. Do you know how to add the JSON data to the mirror?
Hi mas @zainfathoni, any update?
Hi mas @zainfathoni, I believe #804 is a prerequisite for this PR to be done. Do you know how to add the JSON data to the mirror?
Heya! #804 is currently not a requirement for this. 93b1f76 unintentionally dropped the mirrors. Sorry, I forgot to revert Nefoplayground/wargabantuwarga.com@a7532dd as #806 was merged as the drop was intended for debugging purposes only.
Also, regarding the mirror, I think #783 might be a good resource to get your head around the things here? I forgot my understanding of it, but maybe you will understand it.
Hi mas @zainfathoni, I believe #804 is a prerequisite for this PR to be done. Do you know how to add the JSON data to the mirror?
Heya! #804 is currently not a requirement for this. 93b1f76 unintentionally dropped the mirrors. Sorry, I forgot to revert Nefoplayground/wargabantuwarga.com@a7532dd as #806 was merged as the drop was intended for debugging purposes only.
Sorry for the slow response @redhoyasa. I have been swamped in my office due to a tight timeline for our current project lately. @fortressia could you please submit another PR to revert your changes that dropped the mirror-box? Thanks! π
Hi mas @zainfathoni, I believe #804 is a prerequisite for this PR to be done. Do you know how to add the JSON data to the mirror?
Heya! #804 is currently not a requirement for this. 93b1f76 unintentionally dropped the mirrors. Sorry, I forgot to revert Nefoplayground/wargabantuwarga.com@a7532dd as #806 was merged as the drop was intended for debugging purposes only.
Sorry for the slow response @redhoyasa. I have been swamped in my office due to a tight timeline for our current project lately. @fortressia could you please submit another PR to revert your changes that dropped the mirror-box? Thanks! pray
Okay. Sorry for late reply though.
@fortressia I notice that you've reverted the mirror box. However, I don't see that the mirror-box
calling fetchVaccinationDatabase
.
Is this expected? cc: @zainfathoni
As booster shots will be available in coming weeks, I think WBW could be more relevant (again).
@fortressia I notice that you've reverted the mirror box. However, I don't see the
mirror-box
callingfetchVaccinationDatabase
.Is this expected? cc: @zainfathoni
Could you please elaborate on what you saw and expected, @redhoyasa?
The answer to your question can be yes and no simultaneously, depending on what you meant by "you don't see". π
@fortressia I notice that you've reverted the mirror box. However, I don't see the
mirror-box
callingfetchVaccinationDatabase
. Is this expected? cc: @zainfathoniCould you please elaborate on what you saw and expected, @redhoyasa?
The answer to your question can be yes and no simultaneously, depending on what you meant by "you don't see". π
From my understanding, we use mirror-box
to speed up the CI/build time. It works by directly download the transformed data instead of downloading the raw data and transform it during the build time.
However, it requires the transformed data to be available in https://wbw-box.lucentshard.com, doesn't it?
My concern is that I couldn't manage to find the transformed Tempat vaksin
data from Kemenkes in that mirror source. I am expecting that the data would be available in the mirror and we can just download it like we do for other data (faq sheets, database, etc.).
@fortressia I notice that you've reverted the mirror box. However, I don't see the
mirror-box
callingfetchVaccinationDatabase
. Is this expected? cc: @zainfathoniCould you please elaborate on what you saw and expected, @redhoyasa? The answer to your question can be yes and no simultaneously, depending on what you meant by "you don't see". π
From my understanding, we use
mirror-box
to speed up the CI/build time. It works by directly download the transformed data instead of downloading the raw data and transform it during the build time.However, it requires the transformed data to be available in https://wbw-box.lucentshard.com, doesn't it?
My concern is that I couldn't manage to find the transformed
Tempat vaksin
data from Kemenkes in that mirror source. I am expecting that the data would be available in the mirror and we can just download it like we do for other data (faq sheets, database, etc.).
I see. Thank you for elaborating on it. There might be a mistake somewhere along the way. The mirror-box
automation is supposed to call the fetch-wbw script and then store the static JSON files in the server. Mas @adityapurwa, could you please take another look at why it's not happening as expected? Thanks. π
I see. Thank you for elaborating on it. There might be a mistake somewhere along the way. The
mirror-box
automation is supposed to call the fetch-wbw script and then store the static JSON files in the server. Mas @adityapurwa, could you please take another look at why it's not happening as expected? Thanks. π
Ah, I see. I actually wanted to send the revert PR earlier, but that made me confused so much that I sent the PR just after you told me to.
Also, I didn't think mirror-box.ts
sent any files to the server. It's not implemented there.
Hello π I will check it today.
So I've found the culprit, the server is running out of memory :)
I've added an additional 1.5GB of memory, just tested running it and it's running without issues.
So I've found the culprit, the server is running out of memory :)
I've added an additional 1.5GB of memory, just tested running it and it's running without issues.
LOL π€£ Thanks for taking the time to investigate and fix it, Mas @adityapurwa. π
Thanks mas @adityapurwa for the fix.
However, I cannot find wbw-vaccination-database.json
in https://wbw-box.lucentshard.com/.
Probably we have to change region.data[0].province
to province
in this line cc: @fortressia
However, I cannot find
wbw-vaccination-database.json
in https://wbw-box.lucentshard.com/.Probably we have to change
region.data[0].province
toprovince
in this line cc: @fortressia
Emm, I think that's just an unrelated refactor to the file being missing in the server, right?
Or did you find that code made the file undetected, which is kinda illogical in my opinion?
If that's the case, can you please elaborate more?