Repository navigation
Conversation
The MCP server advertised a static version = "0.1.0" regardless of the actual binary version. Stamp the Server with pkg/version.Vers (already set via ldflags, defaulting to "v0.0.0+source" for source builds) and use it for both the MCP Implementation version and the healthcheck tool's reported version. Per review feedback, keep pkg/version a plain string-stamp package with no semver parsing (no Get(), no Masterminds dependency), and harden the Makefile's LDFLAGS so an empty VERS/KVER/HASH doesn't clear the package-level defaults via -X.
The stamp package does not import Masterminds. Moving semver/v3 into the direct require block was tidy noise. go mod tidy leaves go.mod matching main.
A hardcoded "0.1.0" still looks like a version, so the old healthcheck test stayed green. Compare the reported version with the build stamp.
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.
Fork-internal pre-check of the rebased contributor branch for knative#3832 (author: @Ankitsinghsisodya; authorship preserved).
Purpose: run the full Actions suite on our fork before any push to the contributor's branch. Not for merge.
Rebased onto knative/func main
d926a693. Thepkg/mcp/mcp.goconflict keeps main's readonly comment ("disables mutation tools when true").Checked against the requested design:
pkg/versionis a string stamp:Default = "v0.0.0+source",Vers = Default,KverandHashstrings. NoGet(), no Masterminds.-Xonly when that value is non-empty, and still appends the Socat/Tar/FuncUtil image lines.version.Versonce at construction. Healthcheck reports that field.cmd/root.gosetsDefaultVersion = version.Default.Versfallback incmd/version.gois gone.pkg/appalready passesversion.Vers,Kver, andHashthrough. Unchanged.go.modmatches main.semver/v3stays indirect.version.Vers, so a hardcoded0.1.0fails.Tip:
878395707dca8e53eed7964de0c984c9f78ce2f7