-
-
Notifications
You must be signed in to change notification settings - Fork 703
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
datasette publish
needs support for the new config/metadata split
#2195
Comments
As soon as datasette/.github/workflows/deploy-latest.yml Lines 91 to 97 in 2da1a6a
Which should fix this broken demo from https://simonwillison.net/2022/Dec/2/datasette-write-api/ |
The datasette/docs/plugin_hooks.rst Lines 347 to 355 in f130c7c
I want to deprecate it and switch to a different, better design to address the same problem. |
I think the actual design of this is pretty simple. Current help starts like this:
The So I think Here's the relevant help section from
|
Here's the full help for Cloud Run at the moment: datasette publish cloudrun --help
|
I'd really like to remove Maybe it doesn't. You still need |
https://github.com/search?q=datasette+publish+extra-options+language%3AShell&type=code&l=Shell shows 17 matches, I'll copy in illustrative examples here:
|
Found more when I searched for YAML. Here's the most interesting: https://github.com/labordata/warehouse/blob/0029a72fc1ceae9091932da6566f891167179012/.github/workflows/build.yml#L59
Uses both |
Maybe I should add |
Worth noting that it already sets datasette/datasette/utils/__init__.py Line 374 in d97e82d
I wonder if that's actually surprising behaviour that we should change before 1.0. |
Once I have this working I should use it to ship a demo of a It should go in this section: https://docs.datasette.io/en/latest/introspection.html#config |
Hi @simonw, Awesome work with Datasette as always. We talked previously with a colleague about a project we were interested in hosting on Datasette Cloud. While waiting for DS Cloud to be ready, we decided to publish Datasette ourselves first. We were able to deploy the latest version (1.0a13) on Google Cloud Run but I did notice that datasette publish did not support an option for the datasette.yaml/json. Because of this, our deployed instance lacked features that are available when ran locally. Specifically, the config/options (previously in metadata.yaml) that were moved to datasette.yaml that our instance is lacking are:
As a test, we published the same database with Datasette stable (0.64.6) using the old format of metadata.yaml file (i.e. contains extra_css_urls and canned queries) and the custom styling and canned queries work as expected. From what I understand, we should be able to use the same metadata.yaml file with version 1.0a13. However, when we tested deploying Datasette latest using the same metadata.yaml file (using the old format), the custom CSS and canned queries did not work but everything else was working fine. We used the same parameters for datasette publish in both cases with the only difference being one used 0.64.6 while the other used 1.0a13. I wanted to ask if there are any workarounds or solutions that would allow me to specify the aforementioned options (extra_css_urls, canned queries) during the deployment of 1.0a13 using datasette publish (similar to --extra-options perhaps?). Maybe I missed something in the documentation. Or do you think we'd need to deploy datasette manually for this to work? Lastly, although using the stable version works as intended, we plan to use the 1.0 version because we want to include the datasette-write-ui plugin (w/c requires v 1.0a3) in the deployment. As such, we're also interested to know the status of datasette publish's support for using the datasette.yaml file. Any help or pointers would be much appreciated. Thanks! |
Hi Simon, Just an update: we managed to overcome the limitations mentioned above by deploying datasette 1.0a13 on a dedicated VPS (there were other requirements that Cloud Run wasn't able to address such as having mutable databases and using the upload-csvs plugin) but we're still very much interested in seeing and maybe even helping datasette publish eventually support settings in datasette.yaml |
Originally posted by @simonw in #2194 (comment)
The text was updated successfully, but these errors were encountered: