Repository navigation
fix: mxcli new warns instead of failing when the devcontainer binary can't be fetched (closes #1365) - #1369
Open
stagknee wants to merge 1 commit into
Open
fix: mxcli new warns instead of failing when the devcontainer binary can't be fetched (closes #1365)#1369stagknee wants to merge 1 commit into
stagknee wants to merge 1 commit into
Conversation
…can't be fetched (closes mendixlabs#1365) Step 7 of `mxcli new` exited 1 when the Linux mxcli download failed, though steps 1-6 had already produced a complete project. A dev build reports 0.1.0, whose tag v0.1.0 has no release, so every `new` from a local build 404'd. A failed download is now a warning, and a build with no matching release skips the download with a note. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
AI Code ReviewWhat Looks Good
RecommendationApprove. The PR is well-implemented, thoroughly tested, and follows all project conventions. The minor warning message formatting issue is trivial and doesn't affect functionality. The fix correctly resolves the reported issue where Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
This branch has not been deployed
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.
Closes #1365.
What it does
fetchDevcontainerMxcli(path, out, errOut).Warning:on stderr with the existingmxcli setup mxcli --output ./mxclihint, like step 6's first-build warning, andnewcarries on to its "Project created / Next steps" output and exits 0.hasPublishedRelease()next tomxcliReleaseTag(). It's false for an unstampedgo build(Version == "", which reports0.1.0→v0.1.0, the 404 in the issue), and for tags that aren'tnightlyorvX.Y.Z(make buildoutside git, untagged checkouts). Stamped releases, nightlies andgit describepast a tag download as before.mxcliReleaseTag()itself is unchanged, sosetup mxclibehaves as before.downloadDevcontainerBinary) so tests can stand in for the network.findings/cmd-mxcli/, and a stale "must exit 1" comment fixed incmd_new_test.go.Evidence
Test-first (
cmd_new_devcontainer_test.go). With the step extracted but the old behaviour kept:All pass with the fix. A success-path test pins the tag that release, nightly and describe builds request.
go test ./cmd/mxcli/on Windows: an identical failure list with and without the change (pre-existing Windows/env failures; Five tests fail on Windows (POSIX file-mode assertions + a path assumption) — never run there until now #897, On Windows,go test ./...writes into the developer's real~/.mxcli: tests override onlyHOME, whichos.UserHomeDir()ignores there (follow-up to #897) #1256). The focusedNew|Setup|Mxcli|Devcontainerrun passes.go vetis clean for windows, linux and darwin.Linux (
golang:1.26.6-bookworm, ANTLR 4.13.2, the same as CI):make grammar build test check-mdl check-findings check-conformance check-migration-reference lint-goall pass.Not run: a real
mxcli newend to end (it needs a Mendix download). Step 7 is covered by the unit tests on the extracted function.🤖 Generated with Claude Code