home / github

Menu
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

13 rows where issue = 939051549

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: user, author_association, reactions, created_at (date), updated_at (date)

id ▼ html_url issue_url node_id user created_at updated_at author_association body reactions issue performed_via_github_app
875738149 https://github.com/simonw/datasette/issues/1388#issuecomment-875738149 https://api.github.com/repos/simonw/datasette/issues/1388 MDEyOklzc3VlQ29tbWVudDg3NTczODE0OQ== simonw 9599 2021-07-07T16:14:29Z 2021-07-07T16:14:29Z OWNER This sounds like a valuable feature for people running Datasette behind a proxy. {"total_count": 2, "+1": 2, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} Serve using UNIX domain socket 939051549  
875740085 https://github.com/simonw/datasette/issues/1388#issuecomment-875740085 https://api.github.com/repos/simonw/datasette/issues/1388 MDEyOklzc3VlQ29tbWVudDg3NTc0MDA4NQ== simonw 9599 2021-07-07T16:17:08Z 2021-07-07T16:17:08Z OWNER Looks pretty easy to implement - here's a hint from Uvicorn source code: https://github.com/encode/uvicorn/blob/b5af1049e63c059dc750a450c807b9768f91e906/uvicorn/main.py#L368 Need to work out a simple pattern for testing this too. {"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  
875741410 https://github.com/simonw/datasette/issues/1388#issuecomment-875741410 https://api.github.com/repos/simonw/datasette/issues/1388 MDEyOklzc3VlQ29tbWVudDg3NTc0MTQxMA== simonw 9599 2021-07-07T16:18:50Z 2021-07-07T16:18:50Z OWNER You could actually run Datasette like this today without modifications by running a thin Python script that imports from `datasette.app`, instantiates the ASGI app and passes that to `uvicorn.run` - but I like this as a supported feature too. {"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  
875742910 https://github.com/simonw/datasette/issues/1388#issuecomment-875742910 https://api.github.com/repos/simonw/datasette/issues/1388 MDEyOklzc3VlQ29tbWVudDg3NTc0MjkxMA== simonw 9599 2021-07-07T16:20:50Z 2021-07-07T16:23:02Z OWNER I wonder if `--fd` is worth supporting too? Uvicorn documentation says that's useful for running under process managers, I'd want to understand exactly how to use that (and test it) before adding the feature though. https://www.uvicorn.org/settings/ Docs on how to use a process manager: https://www.uvicorn.org/deployment/#supervisor {"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  
876213177 https://github.com/simonw/datasette/issues/1388#issuecomment-876213177 https://api.github.com/repos/simonw/datasette/issues/1388 MDEyOklzc3VlQ29tbWVudDg3NjIxMzE3Nw== aslakr 80737 2021-07-08T07:47:17Z 2021-07-08T07:47:17Z CONTRIBUTOR > This sounds like a valuable feature for people running Datasette behind a proxy. Yes, in some cases it is easer to use e.g. Apache's [ProxyPass Directive](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypass) with Unix Domain Socket like `unix:/home/www.socket|http://localhost/whatever/`. {"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  
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  
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  
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  
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  
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  
877721003 https://github.com/simonw/datasette/issues/1388#issuecomment-877721003 https://api.github.com/repos/simonw/datasette/issues/1388 MDEyOklzc3VlQ29tbWVudDg3NzcyMTAwMw== simonw 9599 2021-07-11T00:21:19Z 2021-07-11T00:21:19Z OWNER Documentation: https://docs.datasette.io/en/latest/deploying.html#nginx-proxy-configuration {"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  
877725193 https://github.com/simonw/datasette/issues/1388#issuecomment-877725193 https://api.github.com/repos/simonw/datasette/issues/1388 MDEyOklzc3VlQ29tbWVudDg3NzcyNTE5Mw== simonw 9599 2021-07-11T01:18:38Z 2021-07-11T01:18:38Z OWNER Wrote up a TIL: https://til.simonwillison.net/nginx/proxy-domain-sockets {"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 22.723ms · About: simonw/datasette-graphql