home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where issue = 939051549, "updated_at" is on date 2021-07-10 and user = 9599 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 1

  • simonw · 6 ✖

issue 1

  • Serve using UNIX domain socket · 6 ✖

author_association 1

  • OWNER 6
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
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  

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 682.307ms · About: github-to-sqlite