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

publish cloudrun should deploy a more recent SQLite version #1419

Open
fgregg opened this issue Aug 4, 2021 · 3 comments
Open

publish cloudrun should deploy a more recent SQLite version #1419

fgregg opened this issue Aug 4, 2021 · 3 comments

Comments

@fgregg
Copy link
Contributor

fgregg commented Aug 4, 2021

I recently changed from deploying a datasette using datasette publish heroku to datasette publish cloudrun. A query that ran on the heroku site, now throws a syntax error on the cloudrun site.

I suspect this is because they are running different versions of sqlite3.

If so, it would be great to

  1. harmonize the sqlite3 versions across platforms
  2. update the docker files so as to update the sqlite3 version for cloudrun
@fgregg
Copy link
Contributor Author

fgregg commented Aug 4, 2021

@fgregg
Copy link
Contributor Author

fgregg commented Aug 5, 2021

there's a lot of complexity here, that's probably not worth addressing. i got what i needed by patching the dockerfile that cloudrun uses to install a newer version of sqlite.

@fgregg fgregg closed this as completed Aug 5, 2021
@simonw simonw reopened this Aug 5, 2021
@simonw
Copy link
Owner

simonw commented Aug 5, 2021

I ran into this exact same problem today! I only just learned how to use filter on aggregates: https://til.simonwillison.net/sqlite/sqlite-aggregate-filter-clauses

A workaround I used is to add this to the deploy command:

datasette publish cloudrun ... --install=pysqlite3-binary

This will install the https://pypi.org/project/pysqlite3-binary for package which bundles a more recent SQLite version.

@simonw simonw changed the title query runs on datasette published with heroku, but not published with cloudrun publish cloudrun should deploy a more recent SQLite version Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants