home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

17 rows where "updated_at" is on date 2021-07-10 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date)

issue 6

  • Serve using UNIX domain socket 6
  • Stop using generated columns in fixtures.db 5
  • Get Datasette tests passing on Windows in GitHub Actions 3
  • Get tests running on Windows using Travis CI 1
  • initial windows ci setup 1
  • "searchmode": "raw" in table metadata 1

user 2

  • simonw 16
  • codecov[bot] 1

author_association 2

  • OWNER 16
  • NONE 1
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
877718364 https://github.com/simonw/datasette/issues/511#issuecomment-877718364 https://api.github.com/repos/simonw/datasette/issues/511 MDEyOklzc3VlQ29tbWVudDg3NzcxODM2NA== simonw 9599 2021-07-10T23:54:37Z 2021-07-10T23:54:37Z OWNER

Looks like it's not even 10% of the way through, and already a bunch of errors:

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Get Datasette tests passing on Windows in GitHub Actions 456578474  
877718286 https://github.com/simonw/datasette/issues/511#issuecomment-877718286 https://api.github.com/repos/simonw/datasette/issues/511 MDEyOklzc3VlQ29tbWVudDg3NzcxODI4Ng== simonw 9599 2021-07-10T23:53:29Z 2021-07-10T23:53:29Z OWNER

Test suite on Windows seems to run a lot slower:

From https://github.com/simonw/datasette/actions/runs/1018938850 which is still going.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Get Datasette tests passing on Windows in GitHub Actions 456578474  
877717791 https://github.com/simonw/datasette/issues/511#issuecomment-877717791 https://api.github.com/repos/simonw/datasette/issues/511 MDEyOklzc3VlQ29tbWVudDg3NzcxNzc5MQ== simonw 9599 2021-07-10T23:45:35Z 2021-07-10T23:45:35Z OWNER

Trying to run on Windows today, I get an error from the utils/asgi.py module.

It's trying from os import EX_CANTCREAT which is Unix-only. I commented this line out, and (so far) it's working.

Good news: that line was removed in #1094.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Get Datasette tests passing on Windows in GitHub Actions 456578474  
650340914 https://github.com/simonw/datasette/pull/868#issuecomment-650340914 https://api.github.com/repos/simonw/datasette/issues/868 MDEyOklzc3VlQ29tbWVudDY1MDM0MDkxNA== codecov[bot] 22429695 2020-06-26T18:53:02Z 2021-07-10T23:41:42Z NONE

Codecov Report

Merging #868 (b452fcb) into master (0005281) will increase coverage by 0.49%. The diff coverage is 96.19%.

:exclamation: Current head b452fcb differs from pull request most recent head c99caba. Consider uploading reports for the commit c99caba to get more accurate results

```diff @@ Coverage Diff @@

master #868 +/-

========================================== + Coverage 82.91% 83.40% +0.49%
========================================== Files 26 27 +1
Lines 3547 3634 +87
========================================== + Hits 2941 3031 +90
+ Misses 606 603 -3
```

| Impacted Files | Coverage Δ | | |---|---|---| | datasette/plugins.py | 82.35% <ø> (ø) | | | datasette/default_magic_parameters.py | 91.17% <91.17%> (ø) | | | datasette/app.py | 95.99% <97.91%> (+1.32%) | :arrow_up: | | datasette/hookspecs.py | 100.00% <100.00%> (ø) | | | datasette/utils/__init__.py | 93.93% <100.00%> (+0.08%) | :arrow_up: | | datasette/utils/asgi.py | 91.32% <100.00%> (+0.41%) | :arrow_up: | | datasette/views/base.py | 93.39% <100.00%> (-0.01%) | :arrow_down: | | datasette/views/database.py | 96.37% <100.00%> (-1.96%) | :arrow_down: | | datasette/views/table.py | 95.67% <0.00%> (-0.03%) | :arrow_down: | | ... and 6 more | |


Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 180c7a5...c99caba. Read the comment docs.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
initial windows ci setup 646448486  
877717392 https://github.com/simonw/datasette/pull/557#issuecomment-877717392 https://api.github.com/repos/simonw/datasette/issues/557 MDEyOklzc3VlQ29tbWVudDg3NzcxNzM5Mg== simonw 9599 2021-07-10T23:39:48Z 2021-07-10T23:39:48Z OWNER

Abandoning this - need to switch to using GitHub Actions for this instead.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Get tests running on Windows using Travis CI 466996584  
877717262 https://github.com/simonw/datasette/issues/1388#issuecomment-877717262 https://api.github.com/repos/simonw/datasette/issues/1388 MDEyOklzc3VlQ29tbWVudDg3NzcxNzI2Mg== simonw 9599 2021-07-10T23:37:54Z 2021-07-10T23:37:54Z OWNER

I wonder if --fd is worth supporting too?

I'm going to hold off on implementing this until someone asks for it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Serve using UNIX domain socket 939051549  
877716993 https://github.com/simonw/datasette/issues/1388#issuecomment-877716993 https://api.github.com/repos/simonw/datasette/issues/1388 MDEyOklzc3VlQ29tbWVudDg3NzcxNjk5Mw== simonw 9599 2021-07-10T23:34:02Z 2021-07-10T23:34:02Z OWNER

Figured out an example nginx configuration. This in nginx.conf:

daemon off;
events {
  worker_connections  1024;
}
http {
  server {
    listen 8092;
    location / {
      proxy_pass              http://datasette;
      proxy_set_header        X-Real-IP $remote_addr;
      proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    }
  }
  upstream datasette {
    server unix:/tmp/datasette.sock;
  }
}

Then run datasette --uds /tmp/datasette.sock

Then run nginx like this:

nginx -c ./nginx.conf

Then hits to http://localhost:8092/ will be proxied to Datasette.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Serve using UNIX domain socket 939051549  
877716359 https://github.com/simonw/datasette/issues/1388#issuecomment-877716359 https://api.github.com/repos/simonw/datasette/issues/1388 MDEyOklzc3VlQ29tbWVudDg3NzcxNjM1OQ== simonw 9599 2021-07-10T23:24:58Z 2021-07-10T23:24:58Z OWNER

Apparently Windows 10 has Unix domain socket support: https://bugs.python.org/issue33408

Unix socket (AF_UNIX) is now avalible in Windows 10 (April 2018 Update). Please add Python support for it. More details about it on https://blogs.msdn.microsoft.com/commandline/2017/12/19/af_unix-comes-to-windows/

But it's not clear if this is going to work. That same issue thread (the issue is still open) suggests using hasattr(socket, 'AF_UNIX')) to detect support in tests.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Serve using UNIX domain socket 939051549  
877716156 https://github.com/simonw/datasette/issues/1388#issuecomment-877716156 https://api.github.com/repos/simonw/datasette/issues/1388 MDEyOklzc3VlQ29tbWVudDg3NzcxNjE1Ng== simonw 9599 2021-07-10T23:22:21Z 2021-07-10T23:22:21Z OWNER

I don't have the Datasette test suite running on Windows yet, but I'd like it to run there some day - so ideally this test would be skipped if Unix domain sockets are not supported by the underlying operating system.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Serve using UNIX domain socket 939051549  
877715654 https://github.com/simonw/datasette/issues/1388#issuecomment-877715654 https://api.github.com/repos/simonw/datasette/issues/1388 MDEyOklzc3VlQ29tbWVudDg3NzcxNTY1NA== simonw 9599 2021-07-10T23:15:06Z 2021-07-10T23:15:06Z OWNER

I can run tests against it using httpx: https://www.python-httpx.org/advanced/#usage_1

```pycon

import httpx

Connect to the Docker API via a Unix Socket.

transport = httpx.HTTPTransport(uds="/var/run/docker.sock") client = httpx.Client(transport=transport) response = client.get("http://docker/info") ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Serve using UNIX domain socket 939051549  
877714698 https://github.com/simonw/datasette/issues/1388#issuecomment-877714698 https://api.github.com/repos/simonw/datasette/issues/1388 MDEyOklzc3VlQ29tbWVudDg3NzcxNDY5OA== simonw 9599 2021-07-10T23:01:37Z 2021-07-10T23:01:37Z OWNER

Can test this with: curl --unix-socket ${socket} -i "http://localhost/"

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Serve using UNIX domain socket 939051549  
877691558 https://github.com/simonw/datasette/issues/1391#issuecomment-877691558 https://api.github.com/repos/simonw/datasette/issues/1391 MDEyOklzc3VlQ29tbWVudDg3NzY5MTU1OA== simonw 9599 2021-07-10T19:26:57Z 2021-07-10T19:26:57Z OWNER

The https://latest.datasette.io/fixtures.db file no longer includes generated columns, which will help avoid confusion such as seen in #1376.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Stop using generated columns in fixtures.db 941300946  
877691427 https://github.com/simonw/datasette/issues/1391#issuecomment-877691427 https://api.github.com/repos/simonw/datasette/issues/1391 MDEyOklzc3VlQ29tbWVudDg3NzY5MTQyNw== simonw 9599 2021-07-10T19:26:00Z 2021-07-10T19:26:00Z OWNER

I had to run the tests locally on my macOS laptop using pysqlite3 to get a version that supported generated columns - wrote up a TIL about that here: https://til.simonwillison.net/sqlite/pysqlite3-on-macos

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Stop using generated columns in fixtures.db 941300946  
877687196 https://github.com/simonw/datasette/issues/1391#issuecomment-877687196 https://api.github.com/repos/simonw/datasette/issues/1391 MDEyOklzc3VlQ29tbWVudDg3NzY4NzE5Ng== simonw 9599 2021-07-10T18:58:40Z 2021-07-10T18:58:40Z OWNER

I can use the extra_databases mechanism as demonstrated here: https://github.com/simonw/datasette/blob/9552414e1f968c6fc704031cec349c05e6bc2371/tests/test_canned_queries.py#L8-L12

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Stop using generated columns in fixtures.db 941300946  
877686784 https://github.com/simonw/datasette/issues/1391#issuecomment-877686784 https://api.github.com/repos/simonw/datasette/issues/1391 MDEyOklzc3VlQ29tbWVudDg3NzY4Njc4NA== simonw 9599 2021-07-10T18:56:03Z 2021-07-10T18:56:03Z OWNER

Here's the SQL used to generate the table for the test: https://github.com/simonw/datasette/blob/02b19c7a9afd328f22040ab33b5c1911cd904c7c/tests/fixtures.py#L723-L733

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Stop using generated columns in fixtures.db 941300946  
877682533 https://github.com/simonw/datasette/issues/1391#issuecomment-877682533 https://api.github.com/repos/simonw/datasette/issues/1391 MDEyOklzc3VlQ29tbWVudDg3NzY4MjUzMw== simonw 9599 2021-07-10T18:28:05Z 2021-07-10T18:28:05Z OWNER

Here's the test in question: https://github.com/simonw/datasette/blob/a6c55afe8c82ead8deb32f90c9324022fd422324/tests/test_api.py#L2033-L2046

Various other places in the test code also need changing - anything that calls supports_generated_columns().

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Stop using generated columns in fixtures.db 941300946  
877681031 https://github.com/simonw/datasette/issues/1389#issuecomment-877681031 https://api.github.com/repos/simonw/datasette/issues/1389 MDEyOklzc3VlQ29tbWVudDg3NzY4MTAzMQ== simonw 9599 2021-07-10T18:17:29Z 2021-07-10T18:17:29Z OWNER

I don't like ?_searchmode=default because it suggests "use the default" - but it actually over-rides the default that was specified by "searchmode": "raw" in metadata.json.

I'm going with ?_searchmode=escaped instead.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
"searchmode": "raw" in table metadata 940077168  

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
, [performed_via_github_app] TEXT);
CREATE INDEX [idx_issue_comments_issue]
                ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
                ON [issue_comments] ([user]);
Powered by Datasette · Queries took 1111.381ms · About: github-to-sqlite