release notes for 1.1.0

1.1.0 release has been approved. Need to get this merged so I can announce the release.

lgtm, btw, I as the we have migrate Netty 3 to Netty 4, which need user test it more carefully, I think we should mention this in the released note.

I'll merge this as is - so as not to delay the release - but I'll do a new PR in the next few days to put more emphasis on the netty 4 change.


publish cloudrun reuses image tags, which can lead to very surprising deploy problems

See this issue:

https://github.com/simonw/datasette.io/issues/141

I think the code at fault is here:
https://github.com/simonw/datasette/blob/1ad92a1d87d79084ebe524ed186c900ff042328c/datasette/publish/cloudrun.py#L176-L182
That name ends up defaulting to datasette - so multiple different projects may end up deploying to the same image_id.
What I think happened in the datasette.io bug is that this workflow: https://github.com/simonw/simonwillisonblog-backup/blob/bfb573e96d8622ab52b22fdcd54724fe6e59fd24/.github/workflows/backup.yml and this workflow: https://github.com/simonw/datasette.io/blob/4676db5bf4a3fc9f792ee270ec0c59eb902cd2c3/.github/workflows/deploy.yml both happened to run at the exact same time.
And so the image that was pushed to gcr.io/datasette-222320/datasette:latest by the simonw/simonwillisonblog-backup action was then deployed by the simonw/datasette.io/ action, which broke the site.

I'm going to solve this by using the service name in that image_id instead:
image_id = f"gcr.io/{project}/{service_name}"

This is a nasty bug, so I'm going to backport it to a 0.64.2 release as well.

Testing this manually:
% datasette publish cloudrun content.db --service new-service
Creating temporary tarball archive of 2 file(s) totalling 13.8 MiB before compression.
Uploading tarball of [.] to [gs://datasette-222320_cloudbuild/source/1678306859.271661-805303f364144b6094cc9c8532ab5133.tgz]
Created [https://cloudbuild.googleapis.com/v1/projects/datasette-222320/locations/global/builds/290f41a4-e29a-443c-a1e5-c54513c6143d].
Logs are available at [ https://console.cloud.google.com/cloud-build/builds/290f41a4-e29a-443c-a1e5-c54513c6143d?project=99025868001 ].
---- REMOTE BUILD OUTPUT ----
starting build "290f41a4-e29a-443c-a1e5-c54513c6143d"

FETCHSOURCE
Fetching storage object: gs://datasette-222320_cloudbuild/source/1678306859.271661-805303f364144b6094cc9c8532ab5133.tgz#1678306862810483
Copying gs://datasette-222320_cloudbuild/source/1678306859.271661-805303f364144b6094cc9c8532ab5133.tgz#1678306862810483...
/ [1 files][  3.9 MiB/  3.9 MiB]
Operation completed over 1 objects/3.9 MiB.
BUILD
Already have image (with digest): gcr.io/cloud-builders/docker
Sending build context to Docker daemon  14.52MB
Step 1/9 : FROM python:3.11.0-slim-bullseye
...
Installing collected packages: rfc3986, typing-extensions, sniffio, PyYAML, python-multipart, pluggy, pint, mergedeep, MarkupSafe, itsdangerous, idna, hupper, h11, click, certifi, asgiref, aiofiles, uvicorn, Jinja2, janus, click-default-group-wheel, asgi-csrf, anyio, httpcore, httpx, datasette
Successfully installed Jinja2-3.1.2 MarkupSafe-2.1.2 PyYAML-6.0 aiofiles-23.1.0 anyio-3.6.2 asgi-csrf-0.9 asgiref-3.6.0 certifi-2022.12.7 click-8.1.3 click-default-group-wheel-1.2.2 datasette-0.64.1 h11-0.14.0 httpcore-0.16.3 httpx-0.23.3 hupper-1.11 idna-3.4 itsdangerous-2.1.2 janus-1.0.0 mergedeep-1.3.4 pint-0.20.1 pluggy-1.0.0 python-multipart-0.0.6 rfc3986-1.5.0 sniffio-1.3.0 typing-extensions-4.5.0 uvicorn-0.20.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

[notice] A new release of pip available: 22.3 -> 23.0.1
[notice] To update, run: pip install --upgrade pip
Removing intermediate container 8ccebfebebc9
 ---> b972c85b38bb
...
Successfully built 606b7c286d7f
Successfully tagged gcr.io/datasette-222320/datasette-new-service:latest
PUSH
Pushing gcr.io/datasette-222320/datasette-new-service
The push refers to repository [gcr.io/datasette-222320/datasette-new-service]
667b1dc69e5e: Preparing
...
d8ddfcff216f: Pushed
latest: digest: sha256:452daffb2d3d7a8579c2ab39854be285155252c9428b4c1c50caac6a3a269e3f size: 2004
DONE
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ID                                    CREATE_TIME                DURATION  SOURCE                                                                                IMAGES                                                   STATUS
290f41a4-e29a-443c-a1e5-c54513c6143d  2023-03-08T20:21:03+00:00  39S       gs://datasette-222320_cloudbuild/source/1678306859.271661-805303f364144b6094cc9c8532ab5133.tgz  gcr.io/datasette-222320/datasette-new-service (+1 more)  SUCCESS
Deploying container to Cloud Run service [new-service] in project [datasette-222320] region [us-central1]
✓ Deploying new service... Done.
  ✓ Creating Revision...
  ✓ Routing traffic...
  ✓ Setting IAM Policy...
Done.
Service [new-service] revision [new-service-00001-zon] has been deployed and is serving 100 percent of traffic.
Service URL: https://new-service-j7hipcg4aq-uc.a.run.app

https://console.cloud.google.com/run/detail/us-central1/new-service/revisions?project=datasette-222320 confirms that the image deployed is:

Compared to https://console.cloud.google.com/run/detail/us-central1/datasette-io/revisions?project=datasette-222320 which shows that datasette.io is running:

Here's the https://latest.datasette.io/ deployment that just went out, further demonstrating that this change is working correctly:

This fix is released in 0.64.2 https://docs.datasette.io/en/stable/changelog.html#v0-64-2


Notebooks - Kernel Not Saved

VS Code Version: 1.63.2
OS Version: Windows 11

Steps to Reproduce:

Create notebook
Select kernel and write code/run cells
Save notebook
Kernel selection disappears

I started working on an analysis and when I got to a checkpoint I was happy with I saved the notebook. After saving I tried to keep working and started getting errors in my notebook and it took me a few minutes to realize the kernel was not saved so I had to select it again and rerun everything to get back to where I was, a pretty annoying papercut

As discussed, labelling as upstream vscode, as the kernel selection is maintained in vscode core and the selected kernel needs to be transitioned upon saving as another file.

This should be fixed now, closing this for verification


Unable to import deep diff strategy

we're trying to use the deepDiff strategy instructions as provided in the README
We can import 'react-chrome-redux' fine but if we try to import the deepDiff strategy we get this error (in BOTH webpack and jest) (our jest installation does not rely on / use webpack):
Module not found: Error: Can't resolve 'react-chrome-redux/strategies/deepDiff/diff' in 'PATH/TO/OUR/PROJECT'

in the end we have just copy/pasted the relevant code into our own repo but obviously this isn't the most elegant solution
Any ideas why this import is failing?
We've tried:

cleaning yarn cache and reinstalling
removing yarn.lock and reinstalling

@Raigasm I had to do it this way:
import deepDiff from 'react-chrome-redux/lib/strategies/deepDiff/diff';

Did the above work for you, @Raigasm ?

nope, for some reason that didn't work for me last time I tried it. I ended up copy pasting the full deepdiff to from source and it worked.

How very odd... alright well maybe it makes sense to expose these on the root object from webext-redux.
That way it can be something along the lines of import {deepDiff} from "webext-redux"; or:
import {strategies} from "webext-redux";
const {deepDiff} = strategies;

Shorter term, I've just updated README examples to include the lib folder ^^


I want to upper reserved Words

for example:
select * from suppliers
format to
SELECT * FROM suppliers
Is there any solution? thanks a lot!

some question for me

Uppercasing is now supported in 3.1.0 release.

Uppercasing is now supported in 3.1.0 release.


Add @implicitNotFound for Result.ToFuture with more helpful message

The default compiler error can be quite puzzling without the knowledge about the implementation details, e.g.:

in this case the compiler expected an Output[B] but got an Option[Output[B]]

done via #443


Tweak layout of template selector

Tweak template selector layout

slider arrow placement and list item layout
selected tick placement
selected template borders

template selector arrow space looks uneven @yakshaG

template selector arrow space looks uneven @yakshaG

Yeah fixed.