Skip to content

Release v1.0.1 - #84

Merged
cmworkato merged 2 commits into
mainfrom
develop
Jul 1, 2026
Merged

Release v1.0.1#84
cmworkato merged 2 commits into
mainfrom
develop

Conversation

@cmworkato

Copy link
Copy Markdown
Collaborator

Merge develop into main for v1.0.1 release.

Changes:

zaynelt and others added 2 commits June 28, 2026 18:50
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Send wk/<version> User-Agent so telemetry can attribute releases

The backend telemetry pipeline attributes CLI requests by their
User-Agent header (the old workato-platform-cli sends
"workato-platform-cli/<version>"). Here the header was a hardcoded
const userAgent = "wk/dev", so every release reported "wk/dev" and
its traffic was indistinguishable across versions. The MCP client
sent no User-Agent at all.

Build-time version info is already injected via goreleaser ldflags
into main.version/commit/date, but only flowed to the `version`
command, not the HTTP clients. This wires it through:

- Add internal/version: single source of truth for build version,
  exposing UserAgent() -> "wk/<version>" (keeps the existing "wk"
  product token; mirrors the old CLI's product/version convention).
- main.go records the ldflags values via version.Set (var names kept
  as main.version/commit/date so existing -X flags keep working).
- Remove the duplicated version state from internal/commands; the
  version command now reads from the shared package.
- Replace the hardcoded `const userAgent = "wk/dev"` and its three
  call sites (api do/doRaw and package upload) with version.UserAgent().
- Add the User-Agent header to the MCP client (it had none) and wire
  the real version into its clientInfo.

Verified: go build/vet/test all pass; a release build
(-X main.version=1.0.6-beta) reports the injected version, and a wire
test confirms the header reaches the network.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Use distinctive workato-cli/<version> User-Agent token; add tests

Two changes from review feedback:

- Change the User-Agent product token from "wk" to "workato-cli". The nginx
  access-log field telemetry lands in is analyzed/tokenized, so the short
  "wk" token collides with stray "wk" tokens in unrelated user-agents
  (e.g. Customer.io), forcing fragile exclusion filters in the dashboards.
  "workato-cli" matches cleanly as a phrase and mirrors the old Python CLI's
  distinctive "workato-platform-cli" convention. The command stays `wk`;
  only the telemetry token changes.

- Normalize a leading "v" in Set() via strings.TrimPrefix. Git tags are
  "v1.0.6-beta"; goreleaser strips the "v" but the Makefile's `git describe`
  does not, so without this the User-Agent differed by build path. Now it's
  consistently "workato-cli/1.0.6-beta".

- Add internal/version/version_test.go covering Set/accessors, the
  User-Agent format, the v-prefix stripping, and the dev fallback.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Clarify in comments that ldflags are declared in the Makefile + goreleaser

Spell out, where the version vars are defined, that the values come from the
linker's -X flags declared in both the Makefile (via `git describe`) and
.goreleaser.yaml, and that plain `go run`/`go build` leaves the defaults.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Use wk-cli/<version> User-Agent token

Switch the telemetry token from workato-cli to wk-cli. wk-cli filters cleanly
as a phrase (avoiding the bare "wk" collision) and matches the token the
original beta builds already sent, so it reconnects with existing telemetry
history instead of starting a new naming era.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cmworkato
cmworkato requested a review from zaynelt July 1, 2026 05:49
@cmworkato
cmworkato merged commit 142e5c5 into main Jul 1, 2026
10 checks passed
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.

3 participants