Skip to content

feat: deprecate analytics environment routing - #56

Merged
francoischalifour merged 3 commits into
mainfrom
feat/environment-routing-pr
Nov 9, 2026
Merged

francoischalifour merged 3 commits into
mainfrom
feat/environment-routing-pr

Conversation

@francoischalifour

@francoischalifour francoischalifour commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

What

Deprecate the environment option. It is still accepted (with a debug-mode warning) and the public default constant is retained, but it is ignored for routing and never sent: request payloads no longer include an environment field for scalar, hash, batch, identify, or alias calls. Nested business properties named environment are preserved. README, changelog, and RBS/RBI typings mark the option as deprecated.

Why

An environment-bound Product Analytics API key now selects the destination. Callers using unbound legacy keys must replace them before upgrading.

Stacked on #55 (audience collection); this PR contains only the environment slice.

Checklist

  • Client specs verify the deprecated option is accepted and environment is omitted from scalar, hash, batch, identify, and alias requests while nested properties are preserved.
  • Audience and product specs updated for the removed field.
  • Changelog and README updated; the compatibility impact (unbound keys require migration) is noted in the changelog.

@francoischalifour

Copy link
Copy Markdown
Member Author

Rebased on the updated audience PR. Removed remove_deprecated_environment (payload builders only copy named fields, so environment can no longer reach the wire) and the README migration guide; migration docs will live on the official docs site.

Comment thread lib/altertable/client.rb Outdated
@api_key = api_key
@base_url = options[:base_url] || DEFAULT_BASE_URL
@environment = options[:environment] || DEFAULT_ENVIRONMENT
warn "[Altertable] The environment is determined by your API key. Remove the :environment option." if options.key?(:environment) && options[:debug]

@redox redox Nov 9, 2026 •

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.

we usually don't do any logging on the backend - I would remove this

Suggested change
warn "[Altertable] The environment is determined by your API key. Remove the :environment option." if options.key?(:environment) && options[:debug]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removed, along with the equivalent debug warning for ignored identify/alias calls in #55.

@francoischalifour
francoischalifour force-pushed the feat/environment-routing-pr branch from 97bfca7 to d46e6de Compare November 9, 2026 14:05
@francoischalifour
francoischalifour deleted the branch feat/audience-collection-pr November 9, 2026 14:12
Payload builders select fields explicitly, so environment cannot reach the
wire once the client stops adding it. Migration guidance belongs on the
docs site.
@francoischalifour
francoischalifour changed the base branch from feat/audience-collection-pr to main November 9, 2026 14:16
@francoischalifour
francoischalifour force-pushed the feat/environment-routing-pr branch from d46e6de to 2c16d9b Compare November 9, 2026 14:17
@francoischalifour
francoischalifour merged commit 020e3bf into main Nov 9, 2026
7 checks passed
@francoischalifour
francoischalifour deleted the feat/environment-routing-pr branch November 9, 2026 14:19
francoischalifour pushed a commit that referenced this pull request Nov 17, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.4.0](altertable/v1.3.0...altertable/v1.4.0)
(2026-11-09)


### Features

* add audience collection mode
([#55](#55))
([7ecb88c](7ecb88c))
* deprecate analytics environment routing
([#56](#56))
([020e3bf](020e3bf))


### Bug Fixes

* **httpx:** resolve request paths against the base URL
([#57](#57))
([f3473fb](f3473fb))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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