{"html_url": "https://github.com/simonw/datasette/pull/1368#issuecomment-869068554", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1368", "id": 869068554, "node_id": "MDEyOklzc3VlQ29tbWVudDg2OTA2ODU1NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-26T22:23:57Z", "updated_at": "2021-06-26T22:23:57Z", "author_association": "OWNER", "body": "The only test failure is Black. I'm going to merge this and then reformat.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 913865304, "label": "DRAFT: A new plugin hook for dynamic metadata"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1368#issuecomment-867102944", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1368", "id": 867102944, "node_id": "MDEyOklzc3VlQ29tbWVudDg2NzEwMjk0NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-23T19:32:01Z", "updated_at": "2021-06-23T19:32:01Z", "author_association": "OWNER", "body": "Yes, let's move ahead with getting this into an alpha.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 913865304, "label": "DRAFT: A new plugin hook for dynamic metadata"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1368#issuecomment-865204472", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1368", "id": 865204472, "node_id": "MDEyOklzc3VlQ29tbWVudDg2NTIwNDQ3Mg==", "user": {"value": 2670795, "label": "brandonrobertz"}, "created_at": "2021-06-21T17:11:37Z", "updated_at": "2021-06-21T17:11:37Z", "author_association": "CONTRIBUTOR", "body": "If this is a concept ACK then I will move onto fixing the tests (adding new ones) and updating the documentation for the new plugin hook.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 913865304, "label": "DRAFT: A new plugin hook for dynamic metadata"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1368#issuecomment-865160132", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1368", "id": 865160132, "node_id": "MDEyOklzc3VlQ29tbWVudDg2NTE2MDEzMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-21T16:07:06Z", "updated_at": "2021-06-21T16:08:48Z", "author_association": "OWNER", "body": "A few tests failed - Black, the test that checks the docs mention the new hook - the most interesting failing test looks like this one:\r\n```\r\n updated_metadata[\"databases\"][\"fixtures\"][\"queries\"][\"magic_parameters\"][\r\n \"allow\"\r\n ] = (allow if \"query\" in permissions else deny)\r\n> cascade_app_client.ds._metadata = updated_metadata\r\nE AttributeError: can't set attribute\r\n```\r\nFrom https://github.com/simonw/datasette/blob/0a7621f96f8ad14da17e7172e8a7bce24ef78966/tests/test_permissions.py#L439-L467\r\n\r\nThis test is directly manipulating `_metadata` purely for the purposes of simulating different permissions - I think updating it to manipulate `_local_metadata` instead would fix that.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 913865304, "label": "DRAFT: A new plugin hook for dynamic metadata"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1368#issuecomment-856182547", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1368", "id": 856182547, "node_id": "MDEyOklzc3VlQ29tbWVudDg1NjE4MjU0Nw==", "user": {"value": 2670795, "label": "brandonrobertz"}, "created_at": "2021-06-07T18:59:47Z", "updated_at": "2021-06-07T23:04:25Z", "author_association": "CONTRIBUTOR", "body": "Note that if we went with a \"update_metadata\" hook, the hook signature would look something like this (it would return nothing):\r\n\r\n```\r\nupdate_metadata(\r\n datasette=self, metadata=metadata, key=key, database=database, table=table,\r\n fallback=fallback\r\n)\r\n```\r\n\r\nThe Datasette function `_metadata_recursive_update(self, orig, updated)` would disappear into the plugins. Doing this, though, we'd lose the easy ability to make the local metadata.yaml immutable (since we'd no longer have the recursive update).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 913865304, "label": "DRAFT: A new plugin hook for dynamic metadata"}, "performed_via_github_app": null}