Skip the mock-server tests in CI, and reset Fern Replay - #103
Merged
Conversation
Two things kept the v4 generation red, neither of them SDK code. The package itself now compiles against a fully generated v4 client, which it never did while the v3 wrappers were frozen in place. The v4 generator emits wire tests that expect a mock server on localhost:8080. No mock is generated into this repository and CI starts none, so those tests can only ever fail with connection refused. Skipping them by name keeps every other generated test running, including the setter and serialization suites. Running them for real needs mock infrastructure this repository does not have, which is its own piece of work. Fern Replay records each generation's tree hash in .fern/replay.lock and re-applies everything that has diverged since as a customization, independently of .fernignore. The lock here is v3's history, so context_string.go, entity_types.go and the ontology helpers still read as customizations. Removing it lets v4 start clean; it also stops being frozen, since the file is Fern's own state. go.mod and go.sum stay frozen: the release audit requires them and they carry the /v4 module path.
Unfreezing these files and resetting Replay stops them being reproduced, but they were still checked in, now written against v4 type names that the checked-in v3 generated code does not define. The branch could not compile, so nothing on it could be verified. Deleting them makes the branch coherent again -- generated code plus the release-owned go.mod -- and the next generation writes the v4 client into a clean tree. The reflection-based ontology DSL is the one piece here Fern will not regenerate; it stays in history and is re-added deliberately if it earns its place on v4. go build and go test now pass on the branch.
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.
Two things kept the v4 generation red, neither of them SDK code. Worth noting the
compilejob already passes on the latest generation (#102) — the package builds against a fully generated v4 client, which it never did while the v3 wrappers were frozen in place.Wire tests have no server. The v4 generator emits tests that expect a mock on
localhost:8080:No mock is generated into this repo and CI starts none, so they can only fail. Skipping them by name keeps every other generated test running — the setter and serialization suites included. Running them for real needs mock infrastructure this repo doesn't have, which is separate work.
Fern Replay was re-applying v3.
.fern/replay.lockrecords each generation's tree hash and re-applies everything that has diverged since as a customization, independently of.fernignore. The lock here is v3's history, socontext_string.go,entity_types.goand the ontology helpers still read as customizations. Removing it lets v4 start clean; it also stops being frozen, since it is Fern's own state.go.modandgo.sumstay frozen — the release audit requires them, and they carry the/v4module path no generator can set.