-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expanded codegen version mismatch error. #431
Merged
Merged
Conversation
This file contains 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
mwhittaker
added a commit
that referenced
this pull request
Jun 29, 2023
Recall that when a deployer deploys a binary, it first extracts the deployer API version from the binary and checks that its deployer API version is compatible. Before this PR, the resulting error message looked like this: ``` version mismatch: deployer's deployer API version v0.17.0 is incompatible with app' deployer API version v0.14.0 ``` Now, it looks like this: ``` ERROR: The binary you're trying to deploy ("collatz") was built with github.com/ServiceWeaver/weaver module version v0.17.0 (deployer API version v0.14.0). However, the 'weaver multi' binary you're using was built with weaver module version v0.17.0 (deployer API version v0.15.0). These versions are incompatible. We recommend updating both the weaver module your application is built with and updating the 'weaver multi' command by running the following. go get github.com/ServiceWeaver/weaver@latest go install github.com/ServiceWeaver/weaver/cmd/weaver@latest Then, re-build your code and re-run 'weaver multi deploy'. If the problem persists, please file an issue at https://github.com/ServiceWeaver/weaver/issues. ``` This PR also makes the multi and ssh deployers check these versions earlier, before trying to deploy anything. See #431 for a similar PR.
mwhittaker
added a commit
that referenced
this pull request
Jun 29, 2023
Recall that when a deployer deploys a binary, it first extracts the deployer API version from the binary and checks that its deployer API version is compatible. Before this PR, the resulting error message looked like this: ``` version mismatch: deployer's deployer API version v0.17.0 is incompatible with app' deployer API version v0.14.0 ``` Now, it looks like this: ``` ERROR: The binary you're trying to deploy ("collatz") was built with github.com/ServiceWeaver/weaver module version v0.17.0 (deployer API version v0.14.0). However, the 'weaver multi' binary you're using was built with weaver module version v0.17.0 (deployer API version v0.15.0). These versions are incompatible. We recommend updating both the weaver module your application is built with and updating the 'weaver multi' command by running the following. go get github.com/ServiceWeaver/weaver@latest go install github.com/ServiceWeaver/weaver/cmd/weaver@latest Then, re-build your code and re-run 'weaver multi deploy'. If the problem persists, please file an issue at https://github.com/ServiceWeaver/weaver/issues. ``` This PR also makes the multi and ssh deployers check these versions earlier, before trying to deploy anything. See #431 for a similar PR.
spetrovic77
approved these changes
Jun 30, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
mwhittaker
force-pushed
the
codegen_version_error
branch
from
July 5, 2023 17:04
1e58cb8
to
cf2a0d8
Compare
Recall that 'weaver generate' embeds its codegen API version in the weaver_gen.go files it generates. If these files are compiled with a different codegen API version, the code fails to build, and a helpful error message is shown to the user. Before this PR, the error message looked like this: ``` You used 'weaver generate' codegen version 0.17.0, but you built your code with an incompatible weaver module version. Try upgrading 'weaver generate' and re-running it. ``` Now, it looks like this: ``` ERROR: You generated this file with 'weaver generate' v0.17.0 (codegen version v0.17.0). The generated code is incompatible with the version of the github.com/ServiceWeaver/weaver module that you're using. The weaver module version can be found in your go.mod file or by running the following command. go list -m github.com/ServiceWeaver/weaver We recommend updating the weaver module and the 'weaver generate' command by running the following. go get github.com/ServiceWeaver/weaver@latest go install github.com/ServiceWeaver/weaver/cmd/weaver@latest Then, re-run 'weaver generate' and re-build your code. If the problem persists, please file an issue at https://github.com/ServiceWeaver/weaver/issues. ``` The old error message allowed people to ask us for help, and we could tell them how to fix it. The new error message should hopefully allow people to understand and fix the bug on their own.
mwhittaker
force-pushed
the
codegen_version_error
branch
from
July 5, 2023 17:05
cf2a0d8
to
5256462
Compare
mwhittaker
added a commit
that referenced
this pull request
Jul 5, 2023
Recall that when a deployer deploys a binary, it first extracts the deployer API version from the binary and checks that its deployer API version is compatible. Before this PR, the resulting error message looked like this: ``` version mismatch: deployer's deployer API version v0.17.0 is incompatible with app' deployer API version v0.14.0 ``` Now, it looks like this: ``` ERROR: The binary you're trying to deploy ("collatz") was built with github.com/ServiceWeaver/weaver module version v0.17.0 (deployer API version v0.14.0). However, the 'weaver multi' binary you're using was built with weaver module version v0.17.0 (deployer API version v0.15.0). These versions are incompatible. We recommend updating both the weaver module your application is built with and updating the 'weaver multi' command by running the following. go get github.com/ServiceWeaver/weaver@latest go install github.com/ServiceWeaver/weaver/cmd/weaver@latest Then, re-build your code and re-run 'weaver multi deploy'. If the problem persists, please file an issue at https://github.com/ServiceWeaver/weaver/issues. ``` This PR also makes the multi and ssh deployers check these versions earlier, before trying to deploy anything. See #431 for a similar PR.
mwhittaker
added a commit
that referenced
this pull request
Jul 5, 2023
Recall that when a deployer deploys a binary, it first extracts the deployer API version from the binary and checks that its deployer API version is compatible. Before this PR, the resulting error message looked like this: ``` version mismatch: deployer's deployer API version v0.17.0 is incompatible with app' deployer API version v0.14.0 ``` Now, it looks like this: ``` ERROR: The binary you're trying to deploy ("collatz") was built with github.com/ServiceWeaver/weaver module version v0.17.0 (deployer API version v0.14.0). However, the 'weaver multi' binary you're using was built with weaver module version v0.17.0 (deployer API version v0.15.0). These versions are incompatible. We recommend updating both the weaver module your application is built with and updating the 'weaver multi' command by running the following. go get github.com/ServiceWeaver/weaver@latest go install github.com/ServiceWeaver/weaver/cmd/weaver@latest Then, re-build your code and re-run 'weaver multi deploy'. If the problem persists, please file an issue at https://github.com/ServiceWeaver/weaver/issues. ``` This PR also makes the multi and ssh deployers check these versions earlier, before trying to deploy anything. See #431 for a similar PR.
1 task
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.
Recall that
weaver generate
embeds its codegen API version in theweaver_gen.go
files it generates. If these files are compiled with a different codegen API version, the code fails to build, and a helpful error message is shown to the user. Before this PR, the error message looked like this:Now, it looks like this:
The old error message allowed people to ask us for help, and we could tell them how to fix it. The new error message should hopefully allow people to understand and fix the bug on their own.