fix(test): e2e mock server should return string IDs after UUID migration#33
Merged
fix(test): e2e mock server should return string IDs after UUID migration#33
Conversation
Post-UUID migration, Base.ID, Base.Version, StackDefinitionID, InstanceID, and ChartID are all strings. The e2e mock server was still returning integer literals, causing every login/stack/override test to fail with "json: cannot unmarshal number into Go struct field ... of type string". Also switch bulk-op decode struct from []uint to []string so the mock accepts the client's string IDs.
There was a problem hiding this comment.
Pull request overview
Updates the CLI e2e mock servers to align with the post-UUID-migration Go types (IDs/versions now unmarshaled as string), preventing JSON unmarshal failures that were breaking the Test job.
Changes:
- Switched mock server JSON fields (
id,version, and related foreign key fields) from numeric literals to strings. - Updated quiet-piping bulk handlers to decode request payloads as
IDs []string(matching the client payload). - Added
strconvusage to emit string IDs for incremented deployment log IDs.
The govulncheck job installs Go via actions/setup-go using go-version-file: cli/go.mod, which was still declaring 1.26.1. All four reported vulnerabilities (GO-2026-4947/4946/4870/4866 in crypto/x509 and crypto/tls) are fixed in go1.26.2. Matches the Dockerfile bump in #27 — keeping the two declarations in sync avoids divergence between dev-loop tools and CI.
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
id/versionliterals (andstack_definition_id,instance_id,chart_id). After the UUID migration these fields are allstringon the Go side, sojson.Unmarshalrejected every login response with"cannot unmarshal number into Go struct field ... of type string"— the error was hidden becauserunStackctlreturned the bareexec.ExitError.startE2EQuietPipingMockServerdecodedIDs []uint; switched to[]stringso they match the client payload.This is the root cause of the
Testjob failing onmainsince 2026-04-17 and, by extension, on every PR based on main (including dependabot PR #27).Test plan
go test ./...— all packages green locallyTestjob green on this branch🤖 Generated with Claude Code