home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

7 rows where issue = 634663505 and user = 9599 sorted by updated_at descending

✖
✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • simonw · 7 ✖

issue 1

  • Group permission checks by request on /-/permissions debug page · 7 ✖

author_association 1

  • OWNER 7
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
740385032 https://github.com/simonw/datasette/issues/815#issuecomment-740385032 https://api.github.com/repos/simonw/datasette/issues/815 MDEyOklzc3VlQ29tbWVudDc0MDM4NTAzMg== simonw 9599 2020-12-08T05:26:09Z 2020-12-08T05:26:16Z OWNER

Sure! It's a bit of a fiddle one - I've not found an approach that I like, but I also haven't thought about it since June. I'd love to see what you come up with!

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 1,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Group permission checks by request on /-/permissions debug page 634663505  
640673405 https://github.com/simonw/datasette/issues/815#issuecomment-640673405 https://api.github.com/repos/simonw/datasette/issues/815 MDEyOklzc3VlQ29tbWVudDY0MDY3MzQwNQ== simonw 9599 2020-06-08T14:41:55Z 2020-06-08T14:41:55Z OWNER

I want to be able to display the HTTP path and verb - GET /fixtures, POST /fixtures/myquery etc.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Group permission checks by request on /-/permissions debug page 634663505  
640673138 https://github.com/simonw/datasette/issues/815#issuecomment-640673138 https://api.github.com/repos/simonw/datasette/issues/815 MDEyOklzc3VlQ29tbWVudDY0MDY3MzEzOA== simonw 9599 2020-06-08T14:41:24Z 2020-06-08T14:41:24Z OWNER

I could reuse that get_task_id() function though (I can move it to utils).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Group permission checks by request on /-/permissions debug page 634663505  
640672540 https://github.com/simonw/datasette/issues/815#issuecomment-640672540 https://api.github.com/repos/simonw/datasette/issues/815 MDEyOklzc3VlQ29tbWVudDY0MDY3MjU0MA== simonw 9599 2020-06-08T14:40:22Z 2020-06-08T14:40:22Z OWNER

Here's the current tracer mechanism. Note that it captures a stacktrace (which is expensive) - but only if the tracer system has been enabled for a request.

https://github.com/simonw/datasette/blob/1c063fae9dba70f70244db010d55a18846640f07/datasette/tracer.py#L27-L51

For permissions checks I want to ALWAYS track those calls, not just on requests that have opted in.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Group permission checks by request on /-/permissions debug page 634663505  
640671398 https://github.com/simonw/datasette/issues/815#issuecomment-640671398 https://api.github.com/repos/simonw/datasette/issues/815 MDEyOklzc3VlQ29tbWVudDY0MDY3MTM5OA== simonw 9599 2020-06-08T14:38:20Z 2020-06-08T14:38:20Z OWNER

But ds._permission_checks is also used for unit tests.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Group permission checks by request on /-/permissions debug page 634663505  
640671241 https://github.com/simonw/datasette/issues/815#issuecomment-640671241 https://api.github.com/repos/simonw/datasette/issues/815 MDEyOklzc3VlQ29tbWVudDY0MDY3MTI0MQ== simonw 9599 2020-06-08T14:38:04Z 2020-06-08T14:38:04Z OWNER

Alternative to a correlation ID would be to use the existing AsgiTracer / capture_traces mechanism. That's probably smarter.

It could even start logging SQL queries to an in-memory deque too, so a debug tool could show you queries executed by other requests!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Group permission checks by request on /-/permissions debug page 634663505  
640656143 https://github.com/simonw/datasette/issues/815#issuecomment-640656143 https://api.github.com/repos/simonw/datasette/issues/815 MDEyOklzc3VlQ29tbWVudDY0MDY1NjE0Mw== simonw 9599 2020-06-08T14:25:48Z 2020-06-08T14:26:45Z OWNER

Will we need a request correlation ID for this? Multiple asyncio threads can write things to the ds._permission_checks deque at the same time.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Group permission checks by request on /-/permissions debug page 634663505  

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 1048.194ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows