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

Add metadat copy/apply-diff, new testing framework #921

Merged
merged 29 commits into from
Oct 10, 2023
Merged

Conversation

nyurik
Copy link
Member

@nyurik nyurik commented Oct 4, 2023

  • Fix metadata copying
  • Introduce a new metadata field agg_tiles_hash_after_apply for diff files
  • Added a lot of new info and debug logging
  • Simplified Copying interface - not much value in having all the complex builder pattern here it seems, might as well use a simple object.

Testing

  • Generate SQLite DBs in memory on the fly to validate just what we need
  • Use insta for validating DB content

There is now a function dump(connection) -> Vec<Entry> to dump the content of the entire SQLite DB into text with serde. At many steps through the testing, the DB content is validated with the corresponding .snap file with insta crate (which makes this process mega-simple, including a simple way to "bless" (update) any changes).

Discovered bugs

  • Seems like normalized files do not get copied properly - they contain extras that should be removed.

nyurik added 16 commits October 8, 2023 16:24
* Generate SQLite DBs in memory on the fly to validate just what we need
* Use `insta` for validating all outputs
* Fix metadata copying
* Introduce a new metadata field `agg_tiles_hash_after_apply` for diff
  files
* Added a lot of new info and debug logging
@nyurik nyurik merged commit 8b34cd3 into maplibre:main Oct 10, 2023
24 checks passed
@nyurik nyurik deleted the insta branch October 10, 2023 15:10
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