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
Deploy a comprehensive set of plugins #3
Comments
I'm not sure this is a good idea. There's a good chance one or more of the plugins won't make sense in this context - I'm going to create a list in this repo instead. |
I could have a scheduled task that looks for newly published plugins and opens issues (or even pull requests) to add them to the list though. That would be pretty cool. |
|
To skip commented out plugins: |
Got some warnings:
|
I've been shipping new versions of those to fix those errors.
Still working on |
The deploy failed: https://github.com/simonw/latest-datasette-with-all-plugins/runs/988901202?check_suite_focus=true
|
Here's the code I'm using to install every plugin from latest-datasette-with-all-plugins/.github/workflows/deploy.yml Lines 66 to 71 in 402b131
|
Found this in the Cloud Run logs:
|
It looks like a plugin may be attempting a write on startup. In my local environment this works (with all those plugins installed):
BUT... if I actually try to start the server I get an error:
Hunch: I think the |
Yes, that's what's going on here: ds = Datasette(files, **kwargs)
if get:
client = TestClient(ds.app())
response = client.get(get)
click.echo(response.text)
return
if return_instance:
# Private utility mechanism for writing unit tests
return ds
# Run the "startup" plugin hooks
asyncio.get_event_loop().run_until_complete(ds.invoke_startup())
# Run async sanity checks - but only if we're not under pytest
asyncio.get_event_loop().run_until_complete(check_databases(ds)) I'm going to treat that as a bug in Datasette itself. |
I shipped datasette 0.47.3 with that improvement.... and found a new problem!
This hangs! Ideally it should exit with an error instead. |
After some debugging I tracked down the culprit: https://github.com/simonw/datasette-saved-queries/blob/48abb4181c4f06615156c97e7fe29aa0183d2fcf/datasette_saved_queries/__init__.py is attempting to write to the database in the @hookimpl
def startup(datasette):
async def inner():
db = datasette.get_database()
await db.execute_write_fn(create_tables, block=True)
return inner |
So maybe there's a Datasette bug with |
Since |
Oops that's not quite right:
|
It failed against the new test! Great - I'm going to comment out |
That plugin currently crashes the server on startup against an immutable database.
Original idea was to automatically deploy all github.com/simonw plugins with the datasette-plugin tag - so I don't have to keep updating the deploy script here.
The text was updated successfully, but these errors were encountered: