fix: set connector version in service mode Hello RPC - #44
fix: set connector version in service mode Hello RPC#44c1-dev-bot[bot] wants to merge 2 commits into
Conversation
Pass the connector's version variable (set via ldflags at release time) through to the Hello RPC's build_info.package_version field. Previously this field was always populated from runtime/debug.ReadBuildInfo() which returns "(devel)" for go build binaries, making it impossible to determine which version a customer is running in service mode. Vendors unreleased baton-sdk changes from the fix/pass-connector-version-to-hello-v0.3.x branch.
| targetedSyncResourceIDs []string | ||
| externalResourceC1Z string | ||
| externalResourceEntitlementIdFilter string | ||
| connectorVersion string |
There was a problem hiding this comment.
🟡 Suggestion: The go.mod still declares baton-sdk v0.3.31 while the vendor directory contains manually applied unreleased changes from SDK PR #846. As noted in the PR description, this needs a proper go get + go mod vendor against the released SDK version before merging to ensure go.mod and vendor stay consistent. A go mod verify would fail in the current state.
Connector PR Review: fix: set connector version in service mode Hello RPCBlocking Issues: 0 | Suggestions: 1 | Threads Resolved: 0 Review SummaryThe new commit ( Security IssuesNone found. Correctness IssuesNone found. Suggestions
Prompt for AI agents |
Break the NewC1TaskManager call across multiple lines to stay within the 200-character line length limit.
Summary
versionvariable (set via ldflags at release time) through to the Hello RPC'sbuild_info.package_versionfield(devel)because it relied onruntime/debug.ReadBuildInfo().Main.Version, which returns(devel)for binaries built withgo buildconnectorrunner.WithConnectorVersion(version)to theDefineConfigurationcall inmain.goDependency Notice
This PR vendors unreleased changes from baton-sdk PR #846 (backport branch:
fix/pass-connector-version-to-hello-v0.3.x).Before merging this PR, the dependency PR must be reviewed, merged, and released. After the dependency is released, update
go.modto point to the released version and re-vendor before merging.Note: The vendored SDK changes were applied manually because network constraints prevented running
go getin the build environment. The changes are identical to the SDK branch. A propergo mod vendorshould be run before merging.Test plan
go build ./cmd/baton-ipa/)go test ./...)build_info.package_versionshows the release version instead of(devel)--versionflag still works correctlyFixes: CXH-1521
Automated PR Notice
This PR was automatically created by c1-dev-bot as a potential implementation.
This code requires: