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

[driver] sqla results are not dict-like anymore #296

Merged
merged 12 commits into from
Feb 1, 2023
Merged

Conversation

dionhaefner
Copy link
Collaborator

@dionhaefner dionhaefner commented Jan 30, 2023

@dionhaefner
Copy link
Collaborator Author

Bugs prevented by mypy: 0
Hours wasted debugging mypy issues: too damn many

@codecov
Copy link

codecov bot commented Jan 31, 2023

Codecov Report

Merging #296 (03344ff) into main (964a72b) will increase coverage by 0.00%.
The diff coverage is 98.52%.

@@           Coverage Diff           @@
##             main     #296   +/-   ##
=======================================
  Coverage   98.67%   98.68%           
=======================================
  Files          48       49    +1     
  Lines        2193     2207   +14     
  Branches      292      304   +12     
=======================================
+ Hits         2164     2178   +14     
  Misses         19       19           
  Partials       10       10           
Impacted Files Coverage Δ
terracotta/__init__.py 100.00% <ø> (ø)
terracotta/cog.py 80.00% <ø> (ø)
terracotta/profile.py 100.00% <ø> (ø)
terracotta/scripts/optimize_rasters.py 95.94% <85.71%> (ø)
terracotta/scripts/connect.py 93.33% <91.66%> (ø)
terracotta/raster.py 97.14% <93.33%> (ø)
terracotta/server/rgb.py 96.07% <95.45%> (ø)
terracotta/cache.py 100.00% <100.00%> (ø)
terracotta/client/flask_api.py 100.00% <100.00%> (ø)
terracotta/cmaps/generate_cmaps.py 100.00% <100.00%> (ø)
... and 37 more

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

@dionhaefner
Copy link
Collaborator Author

Behavior changes:

  • Remote SQLite databases are now downloaded as soon as the driver is instantiated
  • More robust behavior when catching exceptions inside connect blocks

@j08lue
Copy link
Collaborator

j08lue commented Jan 31, 2023

Yikes, @dionhaefner, those issues with SQLite files not getting released have haunted me before - on Linux, though. https://github.com/DHI-GRAS/terracotta/actions/runs/4055501441/jobs/6978731806#step:11:588

Never got to dig deeper because we migrated to use MySQL everywhere.

Wonder how you can force the underlying SQLite library to release the file, like https://stackoverflow.com/a/12679840/512111 (C#) or https://stackoverflow.com/a/59483095/512111 or https://stackoverflow.com/questions/6134980/file-locks-in-sqlite...

@dionhaefner
Copy link
Collaborator Author

Hallelujah.

@dionhaefner dionhaefner merged commit 4bed93a into main Feb 1, 2023
@dionhaefner dionhaefner deleted the fix-sqla-2 branch February 1, 2023 11:35
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.

Error on get_datasets with Postgresql database
2 participants