Comments (6)
Here's the failure in CI, which did not cause the workflow to fail even though it should have:
from datasette.
The script:
datasette/tests/test-datasette-load-plugins.sh
Lines 1 to 29 in b0d0a0e
I'm not sure why those exit 1
lines did not cause a CI failure.
from datasette.
In the script, you're using a subshell
( ... )
to group commands. If youexit 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.
It suggested doing this instead:
#!/bin/bash
PLUGINS=$(datasette plugins)
if ! echo "$PLUGINS" | jq 'any(.[]; .name == "datasette-json-html")' | grep -q true; then
echo "Test failed: datasette-json-html not found"
exit 1
fi
PLUGINS2=$(DATASETTE_LOAD_PLUGINS=datasette-init datasette plugins)
if ! echo "$PLUGINS2" | jq 'any(.[]; .name == "datasette-json-html")' | grep -q false; then
echo "Test failed: datasette-json-html should not have been loaded"
exit 1
fi
if ! echo "$PLUGINS2" | jq 'any(.[]; .name == "datasette-init")' | grep -q true; then
echo "Test failed: datasette-init should have been loaded"
exit 1
fi
PLUGINS3=$(DATASETTE_LOAD_PLUGINS='' datasette plugins)
if ! echo "$PLUGINS3" | grep -q '\[\]'; then
echo "Test failed: datasette plugins should have returned []"
exit 1
fi
from datasette.
Yes, the new script seems to work. On Python 3.11:
tests/test-datasette-load-plugins.sh
echo $?
0
On Python 3.8:
tests/test-datasette-load-plugins.sh
Test failed: datasette-json-html not found
echo $?
1
from datasette.
https://github.com/simonw/datasette/actions/runs/6267146158/job/17019594849 failed on 3.9 this time.
plugin_info["name"] = distinfo.name or distinfo.project_name
AttributeError: 'PathDistribution' object has no attribute 'name'
Test failed: datasette-json-html should not have been loaded
from datasette.
The test fails as expected now. Closing this issue, will solve the remaining problems in:
from datasette.
Related Issues (20)
- get_metadata() plugin hook should support async await_me_maybe pattern HOT 2
- Datasette 1.0 rc tracking issue
- Usablity issue with need for root user
- Consider releasing a 0.65 with some forwards compatibility for 1.0 HOT 2
- Bug (in docs?): the "_internal" table on latest.datasette.io doesn't load HOT 1
- Consider adding a new plugin hook: "pre_query" or similar HOT 3
- Proposal - store metadata inside `internal.db` tables HOT 2
- Broken link in documention: fivethirtyeight.datasettes.com
- Fix font size on filter inputs
- base_url getting appended twice in redirects when applying filters?
- Accessibility: add a `lang` attribute to `html` HOT 1
- What minimal SQLite version should Datasette support? HOT 9
- Remove upserts in `set_XXX_metadata()` methods
- PyOdide test failure HOT 7
- Canned queries with named parameters fail with error against SQLite 3.46.0 HOT 11
- derive_named_parameters() method that works with latest SQLite HOT 5
- Flaky test_max_csv_mb test HOT 3
- Very weird flaky test_create_table_ignore_replace and test_upsert tests HOT 18
- multiple plugins extending the same base template?
- Consider using isolation_level="IMMEDIATE" for write connections HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datasette.