{"html_url": "https://github.com/simonw/datasette/issues/619#issuecomment-850019486", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/619", "id": 850019486, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MDAxOTQ4Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-28T00:05:50Z", "updated_at": "2021-05-28T00:05:50Z", "author_association": "OWNER", "body": "Came up on discussions here: https://github.com/simonw/datasette/discussions/1334", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520655983, "label": "\"Invalid SQL\" page should let you edit the SQL"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/619#issuecomment-850025106", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/619", "id": 850025106, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MDAyNTEwNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-28T00:18:30Z", "updated_at": "2021-05-28T00:18:30Z", "author_association": "OWNER", "body": "I'm going to return a 400 HTTP status code for \"bad request\", under the assumption that the client sent bad SQL.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520655983, "label": "\"Invalid SQL\" page should let you edit the SQL"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/619#issuecomment-850057694", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/619", "id": 850057694, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MDA1NzY5NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-28T02:03:05Z", "updated_at": "2021-05-28T02:03:05Z", "author_association": "OWNER", "body": "I nearly got this working, but I ran into one last problem: the code path for when an error is raised but the user specified `?_shape=array`. I'll open a draft PR with where I've got to so far.", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520655983, "label": "\"Invalid SQL\" page should let you edit the SQL"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/619#issuecomment-850059607", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/619", "id": 850059607, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MDA1OTYwNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-28T02:08:58Z", "updated_at": "2021-05-28T02:08:58Z", "author_association": "OWNER", "body": "Remaining work will happen in #1346", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520655983, "label": "\"Invalid SQL\" page should let you edit the SQL"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1296#issuecomment-850583584", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1296", "id": 850583584, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MDU4MzU4NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-28T18:06:11Z", "updated_at": "2021-05-28T18:06:11Z", "author_association": "OWNER", "body": "> As a bonus, the Docker image becomes smaller\r\n\r\nThat's a huge surprise to me! And most welcome.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 855446829, "label": "Dockerfile: use Ubuntu 20.10 as base"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1346#issuecomment-850058851", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1346", "id": 850058851, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MDA1ODg1MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-28T02:06:46Z", "updated_at": "2021-05-28T02:06:46Z", "author_association": "OWNER", "body": "The one test failure here actually illustrates a larger problem: if the user specifies `.json?_shape=array` but an error occurs, what should we do?\r\n\r\nPrior to this change we return the following JSON:\r\n```json\r\n{\r\n \"ok\": false,\r\n \"error\": \"You did not supply a value for binding 1.\",\r\n \"status\": 500,\r\n \"title\": null\r\n}\r\n```\r\nBut this comes from the `handle_500` higher level code here: https://github.com/simonw/datasette/blob/eae3084b46e2c3931db12cdef79093ad0e644bce/datasette/app.py#L1251-L1263", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 904537568, "label": "Re-display user's query with an error message if an error occurs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1346#issuecomment-850059328", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1346", "id": 850059328, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MDA1OTMyOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-28T02:08:10Z", "updated_at": "2021-05-28T02:09:25Z", "author_association": "OWNER", "body": "This is the current test failure, but it actually another problem that we don't have tests in place for errors with different formats and shapes:\r\n\r\n```\r\n def test_magic_parameters_cannot_be_used_in_arbitrary_queries(magic_parameters_client):\r\n response = magic_parameters_client.get(\r\n \"/data.json?sql=select+:_header_host&_shape=array\"\r\n )\r\n assert 400 == response.status\r\n> assert \"You did not supply a value for binding 1.\" == response.json[\"error\"]\r\nE TypeError: list indices must be integers or slices, not str\r\n```\r\n\r\nThe test fails because `response.json` here is the empty list `[]`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 904537568, "label": "Re-display user's query with an error message if an error occurs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1348#issuecomment-850077261", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1348", "id": 850077261, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MDA3NzI2MQ==", "user": {"value": 10801138, "label": "blairdrummond"}, "created_at": "2021-05-28T03:05:38Z", "updated_at": "2021-05-28T03:05:38Z", "author_association": "CONTRIBUTOR", "body": "Note, the CVEs are probably resolvable with this https://github.com/simonw/datasette/pull/1296 . My experience is that Ubuntu seems to manage these better? Though that is surprising :/ ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 904598267, "label": "DRAFT: add test and scan for docker images"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1348#issuecomment-850077484", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1348", "id": 850077484, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MDA3NzQ4NA==", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2021-05-28T03:06:16Z", "updated_at": "2021-05-28T03:06:16Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1348?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\n> Merging [#1348](https://codecov.io/gh/simonw/datasette/pull/1348?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (56cba8f) into [main](https://codecov.io/gh/simonw/datasette/commit/7b106e106000713bbee31b34d694b3dadbd4818c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (7b106e1) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/simonw/datasette/pull/1348/graphs/tree.svg?width=650&height=150&src=pr&token=eSahVY7kw1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)](https://codecov.io/gh/simonw/datasette/pull/1348?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)\n\n```diff\n@@ Coverage Diff @@\n## main #1348 +/- ##\n=======================================\n Coverage 91.56% 91.56% \n=======================================\n Files 34 34 \n Lines 4282 4282 \n=======================================\n Hits 3921 3921 \n Misses 361 361 \n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1348?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)\n> `\u0394 = absolute (impact)`, `\u00f8 = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/simonw/datasette/pull/1348?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Last update [7b106e1...56cba8f](https://codecov.io/gh/simonw/datasette/pull/1348?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison).\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 904598267, "label": "DRAFT: add test and scan for docker images"}, "performed_via_github_app": null}