{"html_url": "https://github.com/simonw/datasette/issues/2193#issuecomment-1730353006", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/2193", "id": 1730353006, "node_id": "IC_kwDOBm6k_c5nIxdu", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-09-21T21:56:43Z", "updated_at": "2023-09-21T21:56:43Z", "author_association": "OWNER", "body": "The test fails as expected now. Closing this issue, will solve the remaining problems in:\r\n- #2057", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1907655261, "label": "\"Test DATASETTE_LOAD_PLUGINS\" test shows errors but did not fail the CI run"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/2193#issuecomment-1730352111", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/2193", "id": 1730352111, "node_id": "IC_kwDOBm6k_c5nIxPv", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-09-21T21:55:41Z", "updated_at": "2023-09-21T21:55:41Z", "author_association": "OWNER", "body": "https://github.com/simonw/datasette/actions/runs/6267146158/job/17019594849 failed on 3.9 this time.\r\n\r\n```\r\n plugin_info[\"name\"] = distinfo.name or distinfo.project_name\r\nAttributeError: 'PathDistribution' object has no attribute 'name'\r\nTest failed: datasette-json-html should not have been loaded\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1907655261, "label": "\"Test DATASETTE_LOAD_PLUGINS\" test shows errors but did not fail the CI run"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/2193#issuecomment-1730208566", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/2193", "id": 1730208566, "node_id": "IC_kwDOBm6k_c5nIOM2", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-09-21T19:55:19Z", "updated_at": "2023-09-21T19:55:19Z", "author_association": "OWNER", "body": "Yes, the new script seems to work. On Python 3.11:\r\n\r\n```\r\ntests/test-datasette-load-plugins.sh \r\necho $?\r\n0\r\n```\r\nOn Python 3.8:\r\n```\r\ntests/test-datasette-load-plugins.sh\r\nTest failed: datasette-json-html not found\r\necho $?\r\n1\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1907655261, "label": "\"Test DATASETTE_LOAD_PLUGINS\" test shows errors but did not fail the CI run"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/2193#issuecomment-1730206629", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/2193", "id": 1730206629, "node_id": "IC_kwDOBm6k_c5nINul", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-09-21T19:53:39Z", "updated_at": "2023-09-21T19:53:39Z", "author_association": "OWNER", "body": "[GPT-4 says](https://chat.openai.com/share/65a95561-8f3c-4f9b-a4ab-c2508e87d2a9):\r\n\r\n> In the script, you're using a subshell `( ... )` to group commands. If you `exit 1` within the subshell, it will only exit the subshell and not the main script. This is why GitHub Actions does not see it as a failure.\r\n\r\nIt suggested doing this instead:\r\n\r\n```bash\r\n#!/bin/bash\r\n\r\nPLUGINS=$(datasette plugins)\r\nif ! echo \"$PLUGINS\" | jq 'any(.[]; .name == \"datasette-json-html\")' | grep -q true; then\r\n echo \"Test failed: datasette-json-html not found\"\r\n exit 1\r\nfi\r\n\r\nPLUGINS2=$(DATASETTE_LOAD_PLUGINS=datasette-init datasette plugins)\r\nif ! echo \"$PLUGINS2\" | jq 'any(.[]; .name == \"datasette-json-html\")' | grep -q false; then\r\n echo \"Test failed: datasette-json-html should not have been loaded\"\r\n exit 1\r\nfi\r\n\r\nif ! echo \"$PLUGINS2\" | jq 'any(.[]; .name == \"datasette-init\")' | grep -q true; then\r\n echo \"Test failed: datasette-init should have been loaded\"\r\n exit 1\r\nfi\r\n\r\nPLUGINS3=$(DATASETTE_LOAD_PLUGINS='' datasette plugins)\r\nif ! echo \"$PLUGINS3\" | grep -q '\\[\\]'; then\r\n echo \"Test failed: datasette plugins should have returned []\"\r\n exit 1\r\nfi\r\n```\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1907655261, "label": "\"Test DATASETTE_LOAD_PLUGINS\" test shows errors but did not fail the CI run"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/2193#issuecomment-1730203356", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/2193", "id": 1730203356, "node_id": "IC_kwDOBm6k_c5nIM7c", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-09-21T19:51:04Z", "updated_at": "2023-09-21T19:51:04Z", "author_association": "OWNER", "body": "The script:\r\n\r\nhttps://github.com/simonw/datasette/blob/b0d0a0e5de8bb5b9b6c253e8af451a532266bcf1/tests/test-datasette-load-plugins.sh#L1-L29\r\n\r\nI'm not sure why those `exit 1` lines did not cause a CI failure.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1907655261, "label": "\"Test DATASETTE_LOAD_PLUGINS\" test shows errors but did not fail the CI run"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/2193#issuecomment-1730202533", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/2193", "id": 1730202533, "node_id": "IC_kwDOBm6k_c5nIMul", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-09-21T19:50:22Z", "updated_at": "2023-09-21T19:50:22Z", "author_association": "OWNER", "body": "Here's the failure in CI, which did not cause the workflow to fail even though it should have:\r\n\r\n\"CleanShot\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1907655261, "label": "\"Test DATASETTE_LOAD_PLUGINS\" test shows errors but did not fail the CI run"}, "performed_via_github_app": null}