Skip to content

add headers to websocket connection#79

Merged
cbrady merged 2 commits into
mainfrom
chris/schy-347-add-headers-to-replicator-websocket-connection
May 14, 2026
Merged

add headers to websocket connection#79
cbrady merged 2 commits into
mainfrom
chris/schy-347-add-headers-to-replicator-websocket-connection

Conversation

@cbrady
Copy link
Copy Markdown
Collaborator

@cbrady cbrady commented May 7, 2026

No description provided.

@cbrady cbrady self-assigned this May 7, 2026
@cbrady cbrady requested a review from a team as a code owner May 7, 2026 15:21
Copy link
Copy Markdown
Contributor

@bpapillon bpapillon left a comment

Choose a reason for hiding this comment

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

This makes sense and looks good to me. My Claude sweep came up with this, which I have not tested and am not sure whether is valid or not:

- handshake.go — resolveClientVersion(): Because the replicator is the main module (not a dependency), info.Main.Version will be "(devel)" for go build . builds, which is what deployments/Dockerfile runs. The doc
   comment claims "For tagged releases this returns the tag" but that only holds if a consumer runs go install github.com/schematichq/schematic-datastream-replicator@v1.2.3 — not the path CI/CD takes here. In
  practice the X-Schematic-Client-Version header will report (devel) from every Docker build, undermining the ticket's "correlate them to a release" goal.

  - The Dockerfile already passes a real version via -ldflags="-X main.version=${VERSION:-dev} ..." (Dockerfile line ~42), but main.go has no var version string to receive it — a pre-existing dead injection.
  Consider declaring var version string (and commit, buildTime) in main.go and having resolveClientVersion() prefer it when set:
  if version != "" {
      return version
  }

@cbrady cbrady requested a review from bpapillon May 13, 2026 18:47
@cbrady cbrady merged commit 34597aa into main May 14, 2026
2 checks passed
@cbrady cbrady deleted the chris/schy-347-add-headers-to-replicator-websocket-connection branch May 14, 2026 17:36
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.

2 participants