home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

12 rows where "updated_at" is on date 2020-06-24 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

issue 7

  • Magic parameters for canned queries 4
  • datasette.add_message() doesn't work inside plugins 2
  • base_url doesn't seem to work when adding criteria and clicking "apply" 2
  • Incorrect URLs when served behind a proxy with base_url set 1
  • publish heroku does not work on Windows 10 1
  • Database page loads too slowly with many large tables (due to table counts) 1
  • Update pytest-asyncio requirement from <0.13,>=0.10 to >=0.10,<0.15 1

user 4

  • simonw 8
  • tballison 2
  • abdusco 1
  • codecov[bot] 1

author_association 3

  • OWNER 8
  • NONE 3
  • CONTRIBUTOR 1
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
649014757 https://github.com/simonw/datasette/issues/842#issuecomment-649014757 https://api.github.com/repos/simonw/datasette/issues/842 MDEyOklzc3VlQ29tbWVudDY0OTAxNDc1Nw== simonw 9599 2020-06-24T19:15:46Z 2020-06-24T19:31:52Z OWNER

I'm building this documentation-first - here's the documentation so far: https://github.com/simonw/datasette/blob/6fc8bd9c473f4a25e0a076f24c7e5a9b2f353bb8/docs/sql_queries.rst#magic-parameters

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Magic parameters for canned queries 638212085  
646271834 https://github.com/simonw/datasette/issues/842#issuecomment-646271834 https://api.github.com/repos/simonw/datasette/issues/842 MDEyOklzc3VlQ29tbWVudDY0NjI3MTgzNA== simonw 9599 2020-06-18T19:49:41Z 2020-06-24T18:49:22Z OWNER

But then what kind of magic parameters might plugins want to add?

Here's a crazy idea: _scrapedcontent_url - it would look for the url column on the data being inserted, scrape the content from it and insert that. This does suggest that the magic resolving function scrapedcontent() would need to optionally be sent the full row dictionary being inserted too.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Magic parameters for canned queries 638212085  
646270702 https://github.com/simonw/datasette/issues/842#issuecomment-646270702 https://api.github.com/repos/simonw/datasette/issues/842 MDEyOklzc3VlQ29tbWVudDY0NjI3MDcwMg== simonw 9599 2020-06-18T19:47:19Z 2020-06-24T18:48:48Z OWNER

Brainstorming more potential magic parameters:

  • _actor_id
  • _actor_name
  • _request_ip
  • _request_user_agent
  • _cookie_cookiename
  • _signedcookie_cookiename - reading signed cookies would be cool, not sure how to specify namespace though, maybe always use the same one? Or have the namespace come last, _signedcookie_cookiename_mynamespace. Might not need special signed cookie support since actor is already usually from a signed cookie.
  • _timestamp_unix (not happy with these names yet)
  • _timestamp_localtime
  • _timestamp_datetime
  • _timestamp_utc
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Magic parameters for canned queries 638212085  
649000075 https://github.com/simonw/datasette/issues/842#issuecomment-649000075 https://api.github.com/repos/simonw/datasette/issues/842 MDEyOklzc3VlQ29tbWVudDY0OTAwMDA3NQ== simonw 9599 2020-06-24T18:46:36Z 2020-06-24T18:47:37Z OWNER

Another magic parameter that would be useful would be _random. Consider https://github.com/simonw/datasette-auth-tokens/issues/1 for example - I'd like to be able to provide a writable canned query which can create new authentication tokens in the database, but ideally it would automatically populate a secure random secret for each one.

Maybe _random_chars_128 to create a 128 character long random string (using os.urandom(64).hex()).

This would be the first example of a magic parameter where part of the parameter name is used to configure the resulting value. Maybe neater to separate that with a different character? Unfortunately _random_chars:128 wouldn't work because these parameters are used in a SQLite query where : has special meaning: insert into blah (secret) values (:_random_chars:128) wouldn't make sense.

Actually this is already supported by the proposed design - _random_chars_128 would become random("chars_128") so the random() function could split off the 128 itself.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Magic parameters for canned queries 638212085  
648998264 https://github.com/simonw/datasette/issues/865#issuecomment-648998264 https://api.github.com/repos/simonw/datasette/issues/865 MDEyOklzc3VlQ29tbWVudDY0ODk5ODI2NA== simonw 9599 2020-06-24T18:43:02Z 2020-06-24T18:43:02Z OWNER

Thanks for the bug report. Yes I think #838 may be the same issue. Will investigate.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
base_url doesn't seem to work when adding criteria and clicking "apply" 644582921  
648997857 https://github.com/simonw/datasette/issues/858#issuecomment-648997857 https://api.github.com/repos/simonw/datasette/issues/858 MDEyOklzc3VlQ29tbWVudDY0ODk5Nzg1Nw== simonw 9599 2020-06-24T18:42:10Z 2020-06-24T18:42:10Z OWNER

I really need to get myself a Windows 10 development environment working so I can dig into this kind of bug properly. I have a gaming PC lying around that I could re-task for that.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
publish heroku does not work on Windows 10 642388564  
648818707 https://github.com/simonw/datasette/pull/866#issuecomment-648818707 https://api.github.com/repos/simonw/datasette/issues/866 MDEyOklzc3VlQ29tbWVudDY0ODgxODcwNw== codecov[bot] 22429695 2020-06-24T13:26:14Z 2020-06-24T13:26:14Z NONE

Codecov Report

Merging #866 into master will not change coverage. The diff coverage is n/a.

```diff @@ Coverage Diff @@

master #866 +/-

======================================= Coverage 82.99% 82.99%
======================================= Files 26 26
Lines 3547 3547
======================================= Hits 2944 2944
Misses 603 603
```


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 1a5b7d3...fb64dda. Read the comment docs.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Update pytest-asyncio requirement from <0.13,>=0.10 to >=0.10,<0.15 644610729  
648800356 https://github.com/simonw/datasette/issues/838#issuecomment-648800356 https://api.github.com/repos/simonw/datasette/issues/838 MDEyOklzc3VlQ29tbWVudDY0ODgwMDM1Ng== tballison 6739646 2020-06-24T12:51:48Z 2020-06-24T12:51:48Z NONE

But also want to say thanks for a great tool

+1!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Incorrect URLs when served behind a proxy with base_url set 637395097  
648799963 https://github.com/simonw/datasette/issues/865#issuecomment-648799963 https://api.github.com/repos/simonw/datasette/issues/865 MDEyOklzc3VlQ29tbWVudDY0ODc5OTk2Mw== tballison 6739646 2020-06-24T12:51:01Z 2020-06-24T12:51:01Z NONE

This seems to be a duplicate of: https://github.com/simonw/datasette/issues/838

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
base_url doesn't seem to work when adding criteria and clicking "apply" 644582921  
648669523 https://github.com/simonw/datasette/issues/859#issuecomment-648669523 https://api.github.com/repos/simonw/datasette/issues/859 MDEyOklzc3VlQ29tbWVudDY0ODY2OTUyMw== abdusco 3243482 2020-06-24T08:13:23Z 2020-06-24T10:30:36Z CONTRIBUTOR

I tried setting cache_size_kb=0 then cache_size_kb=100000, still getting this behavior. I even changed Database::table_counts and lowered time limit to 1

py table_count = ( await self.execute( "select count(*) from [{}]".format(table), custom_time_limit=1, ) ).rows[0][0] counts[table] = table_count

I feel like 10 seconds is a magic number, like a processing timeout and datasette gives up and returns the page. Index page loads instantly, table page, query page, as well. But when I return to database page after some time, it loads in 10s.

EDIT:

It's always like 10 + 0.3s, like 10s wait and timeout then 300ms to render the page

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Database page loads too slowly with many large tables (due to table counts) 642572841  
648580556 https://github.com/simonw/datasette/issues/864#issuecomment-648580556 https://api.github.com/repos/simonw/datasette/issues/864 MDEyOklzc3VlQ29tbWVudDY0ODU4MDU1Ng== simonw 9599 2020-06-24T04:40:49Z 2020-06-24T04:40:49Z OWNER

The ideal fix here would be to rework my BaseView subclass mechanism to work with register_routes() so that those views don't have any special privileges above plugin-provided views.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
datasette.add_message() doesn't work inside plugins 644309017  
648580236 https://github.com/simonw/datasette/issues/864#issuecomment-648580236 https://api.github.com/repos/simonw/datasette/issues/864 MDEyOklzc3VlQ29tbWVudDY0ODU4MDIzNg== simonw 9599 2020-06-24T04:39:39Z 2020-06-24T04:39:39Z OWNER

Urgh, fixing this is going to be a bit of a pain.

Here's where I added that custom dispatch_request() method - it was to implement flash messaging in #790: https://github.com/simonw/datasette/blame/1a5b7d318fa923edfcefd3df8f64dae2e9c49d3f/datasette/views/base.py#L85

If I want this to be made available to register_routes() views as well, I'm going to have to move the logic somewhere else. In particular I need to make sure that the request object is created once and used throughout the whole request cycle.

Currently register_routes() view functions get their own separate request object which is created here:

https://github.com/simonw/datasette/blob/1a5b7d318fa923edfcefd3df8f64dae2e9c49d3f/datasette/app.py#L1057-L1068

So I'm going to have to refactor this quite a bit to get that shared request object which can be passed both to register_routes views and to my various BaseView subclasses.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
datasette.add_message() doesn't work inside plugins 644309017  

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