Skip to content

go_server: unify logging and Pub/Sub behind a transport option#849

Merged
akkomar merged 2 commits into
mozilla:mainfrom
tanfarming:ads/go_server_combined
Jun 8, 2026
Merged

go_server: unify logging and Pub/Sub behind a transport option#849
akkomar merged 2 commits into
mozilla:mainfrom
tanfarming:ads/go_server_combined

Conversation

@tanfarming

@tanfarming tanfarming commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Pull Request checklist

  • Quality: This PR builds and tests run cleanly
    • make test runs without emitting any warnings
    • make lint runs without emitting any errors
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry to CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to language binding APIs are noted explicitly

@tanfarming tanfarming changed the title init/example tanfarming:ads/go_server_combined Jun 2, 2026
@tanfarming tanfarming marked this pull request as ready for review June 2, 2026 16:20
@tanfarming tanfarming requested review from a team and akkomar as code owners June 2, 2026 16:20
@tanfarming tanfarming requested review from chutten and removed request for a team June 2, 2026 16:20

@akkomar akkomar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, this will make migration easier. Holding off merging until @tanfarming tests on his side.

@badboy

badboy commented Jun 4, 2026

Copy link
Copy Markdown
Member

Can you give the PR a proper title so we know what this is about?

@badboy

badboy commented Jun 4, 2026

Copy link
Copy Markdown
Member

Same for the commit descriptions btw.

Comment thread CHANGELOG.md Outdated
@tanfarming tanfarming marked this pull request as draft June 8, 2026 16:03
@tanfarming tanfarming changed the title tanfarming:ads/go_server_combined go_server: unify logging and Pub/Sub behind a transport option Jun 8, 2026
@tanfarming tanfarming force-pushed the ads/go_server_combined branch 3 times, most recently from 691be28 to 9568e2f Compare June 8, 2026 16:45
@tanfarming

tanfarming commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

all done, tested locally on mars, ready for re-review @badboy @akkomar --

  • new pr title
  • single commit, polished commit message
  • refactored/consolidated payload construction

@tanfarming tanfarming marked this pull request as ready for review June 8, 2026 16:48
…tion

- Replace the go_server_pubsub outputter (shipped in 19.2.0) with a
  `transport` option on the existing go_server outputter, with three
  modes:
    - `-s transport=logging`: stdout MozLog (default, unchanged behavior)
    - `-s transport=pubsub`: Pub/Sub message builder
    - `-s transport=combined`: both in one file, sharing common types
- The combined mode lets the one known 19.2.0 consumer migrate
  incrementally without running two parallel build pipelines.
- Add an optional `DocumentID` field on each ping params struct. If set,
  it is used as the ping's `document_id`; otherwise a fresh UUID is
  generated. Set the same `DocumentID` on a params value passed to both
  `RecordXxxPing` and `BuildXxxMessage` to share an ID across transports
  during dual-write verification.
- Extract per-ping payload assembly into a shared
  `(p XxxPing).buildPayload(...)` helper so the logging and Pub/Sub
  code paths share one source of truth for metrics-map / events-slice
  construction.
- BREAKING: the go_server_pubsub outputter is removed; callers must
  switch to `--format go_server -s transport=pubsub`.
@tanfarming tanfarming force-pushed the ads/go_server_combined branch from 9568e2f to b3d4689 Compare June 8, 2026 17:37
@akkomar akkomar merged commit b953370 into mozilla:main Jun 8, 2026
8 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