fix(release): bundle dashboard assets in published wheels and sdist#142
Merged
Conversation
`python-source` only auto-packages .py/.pyi/py.typed; static SPA assets need explicit opt-in. Without this, every wheel since 0.12.0 shipped an empty static/ and `taskito dashboard` returned "Dashboard assets not bundled" at runtime.
Adds a composite action consumed by both publish.yml (release) and dashboard.yml (CI) so pnpm/Node versions and the build pipeline have a single source of truth. publish.yml gains a build-dashboard job whose output every wheel/sdist job downloads and checks for index.html before invoking maturin — a missing dashboard now fails CI loudly instead of shipping silently.
Removed comments about the dashboard build tooling versions.
Removed comments about the composite action in the dashboard workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
0.12.0 wheels on PyPI shipped without the compiled dashboard — running
taskito dashboardagainst an installed wheel returns "Dashboard assets not bundled". Two compounding bugs:[tool.maturin].python-source = "py_src"only auto-packages.py/.pyi/py.typed— static SPA assets need explicit opt-in viainclude. Without it, even localmaturin buildagainst a built dashboard tree drops the assets.publish.ymlranmaturin builddirectly across 5 wheel/sdist jobs without ever runningpnpm --dir dashboard buildfirst.py_src/taskito/static/is gitignored, so a clean CI checkout had nothing for maturin to package even before bug (1) silently dropped them.Fix
pyproject.toml: explicitinclude = [{ path = "py_src/taskito/static/dashboard/**/*", format = ["wheel", "sdist"] }]so the dashboard ships in both wheel and sdist..github/actions/dashboard-build/: composite action — single source of truth for pnpm 10.30.3 / Node 22 / install /tsr generate/ vite build / output verification. Consumed by bothpublish.yml(release) anddashboard.yml(CI), so wheels ship the exact build path CI tests..github/workflows/publish.yml: newbuild-dashboardjob builds the dashboard once and uploads as artifact. All 5 wheel/sdist jobsneeds:it, download the artifact, and run atest -f index.htmlverification step before invoking maturin. A missing dashboard now fails CI loudly instead of shipping silently..github/workflows/dashboard.yml: refactored to use the same composite action.Local verification
rm -rf py_src/taskito/static/dashboardthen full pipeline).maturin build --release --features extension-module,postgres,redis,native-async,workflows→ wheel containstaskito/static/dashboard/{index.html, assets/*}.maturin sdist→ tarball contains the dashboard tree.importlib.resources.files('taskito').joinpath('static/dashboard/index.html').is_file()→True;StaticAssets.from_package()returns a valid object — the runtime probe atpy_src/taskito/dashboard/static.py:106-108that produced the original error now passes.cargo check --workspaceclean across all 4 crates at 0.12.1.Test plan
index.htmlexistsunzip -l taskito-0.12.1-*.whl | grep static/dashboardshowsindex.html+ assets