Uh oh!
There was an error while loading. Please reload this page.
fix(release): publish with relative paths, and stop skipping the wheel build - #6
Merged
Merged
Conversation
…l build
v0.1.3 reached neither registry. Two faults, both mine, both invisible to the
way I tested.
publish.sh used `node -p "require('${dir}/package.json')"`
- Node treats a path that does not begin with ./ or / as a MODULE specifier, so
`require('dist/npm/@modelslab/cli-linux-x64/package.json')` is a module lookup
that fails with MODULE_NOT_FOUND. It worked in every local test because those
passed absolute paths; CI passes a relative dist dir. Replaced with jq, which
reads a file as a file.
The PyPI guard was on the wrong step
- `if: always()` was on the upload alone. npm failed, the wheel BUILD was skipped
as an ordinary downstream skip, and the upload then ran and died on
"Cannot find file dist/pypi/*.whl". A guard on the last step of a chain
protects nothing. Every PyPI step now carries it, as `!cancelled()` so a
cancelled run still stops.
CI gains a dry-run of publish.sh against a stubbed npm, from the repo root with a
relative dist dir — the shape the release actually uses. It asserts seven
packages and that the unscoped entry package is published last. Both of the above
would have failed it.
Verified locally with a relative dist dir: the old call reproduces
"Cannot find module", the new one resolves, and the publisher emits all six
scoped platform packages followed by the entry package, with six wheels present
for the PyPI step.Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
v0.1.3 reached neither registry. GitHub release and Homebrew were fine. Two faults, both mine, both invisible to the way I tested.
1.
publish.shusednode -p require('${dir}/package.json')Node treats a path that doesn't begin with
./or/as a module specifier, sorequire('dist/npm/@modelslab/cli-linux-x64/package.json')is a module lookup:It worked in every local test because those passed absolute paths. CI passes a relative dist dir. Replaced with
jq, which reads a file as a file.2. The PyPI guard was on the wrong step
if: always()was on the upload alone. npm failed → the wheel build was skipped as an ordinary downstream skip → the upload then ran and died onCannot find file dist/pypi/*.whl.A guard on the last step of a chain protects nothing. Every PyPI step now carries it, as
!cancelled()so a cancelled run still stops.Guard against the class, not just the instance
CI now dry-runs
publish.shagainst a stubbed npm — from the repo root with a relative dist dir, the shape the release actually uses — and asserts seven packages with the unscoped entry published last. Both bugs above would have failed it.Verified locally, with a relative path this time
Needs a new tag (
v0.1.4) — re-running v0.1.3 would execute the workflow file from that tag's commit, which still has both bugs.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.