issue_comments
11 rows where issue = 1099723916 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: created_at (date), updated_at (date)
issue 1
- Table+query JSON and CSV links broken when using `base_url` setting · 11 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
1012661522 | https://github.com/simonw/datasette/issues/1590#issuecomment-1012661522 | https://api.github.com/repos/simonw/datasette/issues/1590 | IC_kwDOBm6k_c48W_0S | simonw 9599 | 2022-01-14T01:16:08Z | 2022-01-14T01:16:34Z | OWNER | OK, I'm going to recommend a workaround for this instead. Here's def rewrite_path(app, prefix_to_strip): async def rewrite_path_app(scope, receive, send): if ( scope["type"] == "http" and "path" in scope and scope["path"].startswith(prefix_to_strip) ): scope["path"] = scope["path"][len(prefix_to_strip) :] if "raw_path" in scope: scope["raw_path"] = scope["raw_path"][len(prefix_to_strip) :] await app(scope, receive, send)
datasette_ = Datasette( files=["fixtures.db"], settings={"base_url": "/datasettes/", "plugins": {}}, ) application = URLRouter( [ re_path( r"^datasettes/.*", asgi_cors(rewrite_path(datasette_.app(), "/datasettes"), allow_all=True), ), ] ) ``` This works on my laptop - please re-open the ticket if it doesn't work for you! |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Table+query JSON and CSV links broken when using `base_url` setting 1099723916 | |
1012656790 | https://github.com/simonw/datasette/issues/1590#issuecomment-1012656790 | https://api.github.com/repos/simonw/datasette/issues/1590 | IC_kwDOBm6k_c48W-qW | simonw 9599 | 2022-01-14T01:05:34Z | 2022-01-14T01:05:34Z | OWNER | I think this prefixed string mechanism is supposed to prevent the But with a bit of extra logging all of the inputs to that are NOT prefixed strings:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Table+query JSON and CSV links broken when using `base_url` setting 1099723916 | |
1012653966 | https://github.com/simonw/datasette/issues/1590#issuecomment-1012653966 | https://api.github.com/repos/simonw/datasette/issues/1590 | IC_kwDOBm6k_c48W9-O | simonw 9599 | 2022-01-14T00:59:07Z | 2022-01-14T00:59:07Z | OWNER | Since this is a special case bug for when using Datasette as a library I wonder if a good fix here would be to support something like this:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Table+query JSON and CSV links broken when using `base_url` setting 1099723916 | |
1012583091 | https://github.com/simonw/datasette/issues/1590#issuecomment-1012583091 | https://api.github.com/repos/simonw/datasette/issues/1590 | IC_kwDOBm6k_c48Wsqz | simonw 9599 | 2022-01-13T22:41:15Z | 2022-01-13T22:41:15Z | OWNER | Seeing as this area of the code has produced so many bugs in the past, I think part of the fix may be to write comprehensive documentation about how routing works for the internals documentation. Doing so might help me figure this bug out! |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Table+query JSON and CSV links broken when using `base_url` setting 1099723916 | |
1010559681 | https://github.com/simonw/datasette/issues/1590#issuecomment-1010559681 | https://api.github.com/repos/simonw/datasette/issues/1590 | IC_kwDOBm6k_c48O-rB | eelkevdbos 1001306 | 2022-01-12T02:10:20Z | 2022-01-12T02:10:20Z | NONE | In my example, path matching happens at the application layer (being the Django channels URLRouter). That might be a somewhat exotic solution that would normally be solved by a proxy like Apache or Nginx. However, in my specific use case, this is a "feature" enabling me to do simple management of databases and metadata from within a Django admin app instance mapped in that same router. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Table+query JSON and CSV links broken when using `base_url` setting 1099723916 | |
1010556333 | https://github.com/simonw/datasette/issues/1590#issuecomment-1010556333 | https://api.github.com/repos/simonw/datasette/issues/1590 | IC_kwDOBm6k_c48O92t | eelkevdbos 1001306 | 2022-01-12T02:03:59Z | 2022-01-12T02:03:59Z | NONE | Thank you for the quick reply! Just a quick observation, I am running this locally without a proxy, whereas your fly example seems to be running behind an apache proxy (if the name is accurate). Can it be that the apache proxy strips the prefix before it passes on the request to the daphne backend? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Table+query JSON and CSV links broken when using `base_url` setting 1099723916 | |
1010540923 | https://github.com/simonw/datasette/issues/1590#issuecomment-1010540923 | https://api.github.com/repos/simonw/datasette/issues/1590 | IC_kwDOBm6k_c48O6F7 | simonw 9599 | 2022-01-12T01:33:49Z | 2022-01-12T01:33:49Z | OWNER | Looking closer at the code quoted above, it doesn't modify |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Table+query JSON and CSV links broken when using `base_url` setting 1099723916 | |
1010538188 | https://github.com/simonw/datasette/issues/1590#issuecomment-1010538188 | https://api.github.com/repos/simonw/datasette/issues/1590 | IC_kwDOBm6k_c48O5bM | simonw 9599 | 2022-01-12T01:28:41Z | 2022-01-12T01:30:43Z | OWNER | Oh wait! It looks like Yup, I added it in https://github.com/simonw/datasette/commit/a63412152518581c6a3d4e142b937e27dabdbfdb - commit message says:
So actually part of the mystery here is: why does the Fly hosted one NOT have that key? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Table+query JSON and CSV links broken when using `base_url` setting 1099723916 | |
1010538016 | https://github.com/simonw/datasette/issues/1590#issuecomment-1010538016 | https://api.github.com/repos/simonw/datasette/issues/1590 | IC_kwDOBm6k_c48O5Yg | simonw 9599 | 2022-01-12T01:28:19Z | 2022-01-12T01:28:19Z | OWNER | The Daphne one has this key: Maybe Datasette's routing code needs to look out for that, if it's available, and use it to reconstruct the requested path? The code in question is here: https://github.com/simonw/datasette/blob/8c401ee0f054de2f568c3a8302c9223555146407/datasette/app.py#L1143-L1149 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Table+query JSON and CSV links broken when using `base_url` setting 1099723916 | |
1010537058 | https://github.com/simonw/datasette/issues/1590#issuecomment-1010537058 | https://api.github.com/repos/simonw/datasette/issues/1590 | IC_kwDOBm6k_c48O5Ji | simonw 9599 | 2022-01-12T01:26:34Z | 2022-01-12T01:26:34Z | OWNER | I'm using the https://datasette.io/plugins/datasette-debug-asgi plugin to investigate. On my laptop using Daphne I get this: http://127.0.0.1:8032/datasettes/-/asgi-scope
The version that works as |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Table+query JSON and CSV links broken when using `base_url` setting 1099723916 | |
1010533133 | https://github.com/simonw/datasette/issues/1590#issuecomment-1010533133 | https://api.github.com/repos/simonw/datasette/issues/1590 | IC_kwDOBm6k_c48O4MN | simonw 9599 | 2022-01-12T01:19:19Z | 2022-01-12T01:19:19Z | OWNER | Thanks for the steps to reproduce - I have your bug running on my laptop now. I've been mostly testing this stuff using the hosted copy of Datasette here, which doesn't exhibit the bug: https://datasette-apache-proxy-demo.fly.dev/prefix/fixtures?sql=select+sqlite_version%28%29 Something interesting definitely going on here! |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Table+query JSON and CSV links broken when using `base_url` setting 1099723916 |
Advanced export
JSON shape: default, array, newline-delimited, object
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]);
user 2