Skip to content

fix: set connector version in service mode Hello RPC - #44

Open
c1-dev-bot[bot] wants to merge 2 commits into
mainfrom
fix/set-version-in-service-mode
Open

fix: set connector version in service mode Hello RPC#44
c1-dev-bot[bot] wants to merge 2 commits into
mainfrom
fix/set-version-in-service-mode

Conversation

@c1-dev-bot

@c1-dev-bot c1-dev-bot Bot commented May 20, 2026

Copy link
Copy Markdown

Summary

  • 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 always showed (devel) because it relied on runtime/debug.ReadBuildInfo().Main.Version, which returns (devel) for binaries built with go build
  • Adds connectorrunner.WithConnectorVersion(version) to the DefineConfiguration call in main.go

Dependency 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.mod to point to the released version and re-vendor before merging.

Note: The vendored SDK changes were applied manually because network constraints prevented running go get in the build environment. The changes are identical to the SDK branch. A proper go mod vendor should be run before merging.

Test plan

  • Build succeeds (go build ./cmd/baton-ipa/)
  • Tests pass (go test ./...)
  • Deploy connector in service mode and verify build_info.package_version shows the release version instead of (devel)
  • Verify CLI --version flag still works correctly

Fixes: CXH-1521


Automated PR Notice

This PR was automatically created by c1-dev-bot as a potential implementation.

This code requires:

  • Human review of the implementation approach
  • Manual testing to verify correctness
  • Approval from the appropriate team before merging

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.
@c1-dev-bot
c1-dev-bot Bot requested a review from a team May 20, 2026 21:23
@linear-code

linear-code Bot commented May 20, 2026

Copy link
Copy Markdown

CXH-1521

targetedSyncResourceIDs []string
externalResourceC1Z string
externalResourceEntitlementIdFilter string
connectorVersion string

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

@github-actions

github-actions Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

Connector PR Review: fix: set connector version in service mode Hello RPC

Blocking Issues: 0 | Suggestions: 1 | Threads Resolved: 0
Review mode: incremental since aa1a629
View review run

Review Summary

The new commit (86d5b70) wraps the long NewC1TaskManager call across multiple lines in the vendored runner.go to satisfy line-length lint. This is a cosmetic-only change with no functional impact. The previous suggestion about reconciling go.mod with the manually vendored SDK changes still applies — go.mod declares baton-sdk v0.3.31 while the vendor directory contains unreleased edits from SDK PR #846.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

  • vendor/github.com/conductorone/baton-sdk/pkg/connectorrunner/runner.go:346 — go.mod declares baton-sdk v0.3.31 but vendor contains manually applied unreleased changes; needs go get + go mod vendor against the released SDK before merging.
Prompt for AI agents
Verify each finding against the current code and only fix it if needed.

## Suggestions

In `go.mod` and `vendor/`:
- The go.mod declares baton-sdk v0.3.31 but the vendor directory contains manually
  applied changes from the unreleased SDK PR #846. Once the SDK dependency is released,
  run `go get github.com/conductorone/baton-sdk@<released-version>` and `go mod vendor`
  to replace the manual vendor edits with the proper released version.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking issues found.

Break the NewC1TaskManager call across multiple lines to stay within
the 200-character line length limit.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking issues found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants