Skip to content

feat(destination): recognize machine_oauth accounts as oauth - #7549

Merged
achettyiitr merged 8 commits into
masterfrom
harness/INT-7470-fix-destination-recognize-machi-b66af4fc
Nov 6, 2026
Merged

achettyiitr merged 8 commits into
masterfrom
harness/INT-7470-fix-destination-recognize-machi-b66af4fc

Conversation

@rudder-devbox

@rudder-devbox rudder-devbox Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

Treat linked account definitions with authenticationType machine_oauth as OAuth alongside oauth in DestinationT.IsOAuthDestination, preserving account-definition precedence and the destination-definition fallback. The only new tests are classifier cases in backend-config/oauth_test.go.

The router, OAuth transport, and regulation-delete paths all call IsOAuthDestination, so they pick up machine_oauth detection without code changes. Their existing tests do not exercise machine_oauth. Token fetch, caching, expiry refresh, and secretVersion eviction are unchanged. See rudder-specs PR #245.

Linear Ticket

INT-7470

Security

  • Reviewed the scoped classifier change; no credential-handling code changed.

Validation

  • make fmt — completed.
  • TestDestinationT_IsOAuthDestination in backend-config/oauth_test.go — passed.
  • go build ./backend-config ./router ./services/oauth/v2/http ./regulation-worker/internal/delete/api ./regulation-worker/cmd and git diff --check — passed.
  • Verified on mini against this code: first grant, refresh and delivery for machine_oauth, including real Pinterest. Regulation deletion wasn’t exercised.
  • make lint — golangci-lint reported 0 issues and actionlint completed; gitleaks reported 34 findings in committed history. Scanning master alone reproduced all 34, while the PR-only commit range found none.

Known Issues

  • The full router package test run failed in DB-backed lifecycle code after network failures; the focused TestTransformForDestination passed. This failure was not established on an unchanged baseline.

Rollout

  • Before opening the Client Credentials gate, verify the release has reached every region and that hybrid and self-hosted data planes have upgraded. No rollout or merge was performed.

@rudder-devbox

rudder-devbox Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

👋 I'm rudder-devbox. I opened this PR from task INT-7470.

Mention @devbox or @rudder-devbox and I'll act on it — on a top-level PR comment,
in a review summary, or on an inline comment on the diff. Without a mention I won't see it.

@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.20%. Comparing base (ca85eb2) to head (9e6ac4f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7549      +/-   ##
==========================================
- Coverage   85.23%   85.20%   -0.03%     
==========================================
  Files         631      631              
  Lines       63031    63032       +1     
==========================================
- Hits        53722    53705      -17     
- Misses       9306     9324      +18     
  Partials        3        3              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rudder-devbox

rudder-devbox Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

The failed jobs stopped at go mod download, before any tests ran. Package Unit could not download github.com/apache/arrow-go/v18; Unit hit the same stream error ... INTERNAL_ERROR; received from peer from proxy.golang.org for six dependencies. The “All” check failed because those jobs failed.

This is a dependency-proxy infrastructure failure, with no source change to make in the PR. I requeued the failed jobs; their new result is pending.

@rudder-devbox

rudder-devbox Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

The semantic PR action failed with Service Unavailable while contacting GitHub; the log contains no title-validation error. This is a transient API failure, so I made no PR metadata or code changes. I requeued the failed check; its new result is pending.

@achettyiitr
achettyiitr marked this pull request as ready for review November 4, 2026 07:21
Copilot AI balanced review requested due to automatic review settings November 4, 2026 07:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the change extending existing OAuth handling to machine_oauth accounts.

No open issues 🎉

What changed in this PR

Updates backend-config OAuth detection to recognize machine_oauth accounts alongside oauth, allowing them to use existing OAuth handling without changing account-definition precedence or destination-definition fallback.

Changes:

  • Adds a shared predicate for both OAuth account authentication types.
  • Adds delivery and deletion detection tests for machine_oauth.
  • Strengthens regression coverage for account-definition precedence and fallback when an account is absent.
File Description
backend-config/​oauth.go Recognizes machine_oauth account definitions as OAuth.
backend-config/​oauth_test.go Covers machine OAuth detection, precedence, and missing-account fallback.

Review effort: Balanced

@achettyiitr achettyiitr changed the title fix(destination): recognize machine_oauth accounts as oauth feat(destination): recognize machine_oauth accounts as oauth Nov 5, 2026
Copilot AI balanced review requested due to automatic review settings November 5, 2026 08:42

This comment was marked as outdated.

@rudder-devbox

rudder-devbox Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

The Snowflake integration subtest TestIntegration/Event_flow/Upload_Job_in_append_mode failed because the Go race detector found concurrent reads and writes in the pinned upstream gosnowflake/[email protected] driver, at (*transportFactory).createTransport (transport.go:188). The log ends that subtest with race detected during execution of test; “All” failed as a consequence.

The PR changes only OAuth classification and tests, and the raced code is in the third-party driver. I made no unrelated warehouse change or commit. Resolving the race requires an upstream driver fix and a separately validated dependency update.

Copilot AI balanced review requested due to automatic review settings November 5, 2026 14:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the change extending OAuth destination classification to recognize machine_oauth accounts.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@rudder-devbox

rudder-devbox Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

The MSSQL TestIntegration/Events_flow failure came from Docker Compose startup, not a test assertion: the Docker daemon reported failed to start userland proxy for port mapping 0.0.0.0:32768:172.18.0.2:1433/tcp: timed out. The other MSSQL test groups passed; “All” failed because this warehouse job failed.

This is a runner/container networking failure with no source fix in the PR. I requeued the failed jobs; their new result is pending. No code or PR metadata was changed.

@achettyiitr
achettyiitr merged commit f51e4ca into master Nov 6, 2026
114 of 116 checks passed
@achettyiitr
achettyiitr deleted the harness/INT-7470-fix-destination-recognize-machi-b66af4fc branch November 6, 2026 18:23
atzoum pushed a commit that referenced this pull request Nov 9, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.93.0-rc.1](v1.92.0...v1.93.0-rc.1)
(2026-11-09)


### Features

* **destination:** recognize machine_oauth accounts as oauth
([#7549](#7549))
([f51e4ca](f51e4ca))
* incremental definitions on the v2 namespace config
([#7487](#7487))
([ce51e38](ce51e38))
* **processor:** add flag to abort python transformations on deployments
that do not offer them
([#7571](#7571))
([ca85eb2](ca85eb2))
* **processor:** filter http v2 events by destination message types
([#7538](#7538))
([58fd176](58fd176))
* **processor:** send the workspace id to per-workspace pyt pods
([#7551](#7551))
([ea33835](ea33835))
* **warehouse:** add maxcompute destination
([#7568](#7568))
([a64bfd9](a64bfd9))


### Bug Fixes

* **batchrouter:** abort bq stream all events jobs on terminal auth
failures
([#7548](#7548))
([6b7e023](6b7e023))
* bump andybalholm/brotli to v1.2.7 [SEC-759]
([#7525](#7525))
([6dfe468](6dfe468))
* bump rudder-go-kit to v0.84.3
([#7547](#7547))
([355054a](355054a))
* **core:** schema forwarder panics on shutdown
([#7519](#7519))
([dd61cfc](dd61cfc))
* database connections hang when context is cancelled during a copy
([#7578](#7578))
([8dae6e3](8dae6e3))
* **jobsdb:** compaction missing pairs after one that doesn't fit
([#7574](#7574))
([573271b](573271b))
* **jobsdb:** multiconsumer recovery misses a consumer's executing
status after another consumer's later status
([#7554](#7554))
([69b43e0](69b43e0))
* **jobsdb:** old jobs not expiring for every consumer
([#7573](#7573))
([366f114](366f114))
* **jobsdb:** pickups stalling on status tables with skewed stats
([#7572](#7572))
([318446f](318446f))
* **jobsdb:** unionjobsdb functions pick the first datasets by table
name ([#7558](#7558))
([e94d6c5](e94d6c5))
* **router:** event order test only counts drained jobs of the last
dataset
([#7552](#7552))
([b0a097a](b0a097a))
* **router:** mask secrets in array-shaped reporting samples
([#7536](#7536))
([902160f](902160f))
* **warehouse:** hot-reload degraded workspaces without aborting
restored uploads
([#7564](#7564))
([cb98598](cb98598))
* **warehouse:** match deltalake columns case-insensitively
([#7563](#7563))
([a7d30d7](a7d30d7))
* **warehouse:** migrate snowflake to gosnowflake v2.3.0
([#7542](#7542))
([cc09426](cc09426))
* **warehouse:** skip job-creation error log on router shutdown
([#7567](#7567))
([895367e](895367e))


### Miscellaneous

* **deps:** bump github.com/go-jose/go-jose/v4 from 4.1.4 to 4.1.6
([#7545](#7545))
([35ee952](35ee952))
* export only the +Inf bucket for limiter timers
([#7570](#7570))
([4429472](4429472))
* **router:** add drainReason label to pipeline_processed_events
([#7561](#7561))
([af0aef8](af0aef8))
* sync release v1.92.0 to main branch
([#7534](#7534))
([9ab165d](9ab165d))
* **warehouse:** bump sqlconnect-go to v1.37.1
([#7575](#7575))
([acdad67](acdad67))

---
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: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
atzoum pushed a commit that referenced this pull request Nov 10, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.93.0](v1.92.0...v1.93.0)
(2026-11-09)


### Features

* **destination:** recognize machine_oauth accounts as oauth
([#7549](#7549))
([f51e4ca](f51e4ca))
* incremental definitions on the v2 namespace config
([#7487](#7487))
([ce51e38](ce51e38))
* **processor:** add flag to abort python transformations on deployments
that do not offer them
([#7571](#7571))
([ca85eb2](ca85eb2))
* **processor:** filter http v2 events by destination message types
([#7538](#7538))
([58fd176](58fd176))
* **processor:** send the workspace id to per-workspace pyt pods
([#7551](#7551))
([ea33835](ea33835))
* **warehouse:** add maxcompute destination
([#7568](#7568))
([a64bfd9](a64bfd9))


### Bug Fixes

* **batchrouter:** abort bq stream all events jobs on terminal auth
failures
([#7548](#7548))
([6b7e023](6b7e023))
* bump andybalholm/brotli to v1.2.7 [SEC-759]
([#7525](#7525))
([6dfe468](6dfe468))
* bump rudder-go-kit to v0.84.3
([#7547](#7547))
([355054a](355054a))
* **core:** schema forwarder panics on shutdown
([#7519](#7519))
([dd61cfc](dd61cfc))
* database connections hang when context is cancelled during a copy
([#7578](#7578))
([8dae6e3](8dae6e3))
* **jobsdb:** compaction missing pairs after one that doesn't fit
([#7574](#7574))
([573271b](573271b))
* **jobsdb:** multiconsumer recovery misses a consumer's executing
status after another consumer's later status
([#7554](#7554))
([69b43e0](69b43e0))
* **jobsdb:** old jobs not expiring for every consumer
([#7573](#7573))
([366f114](366f114))
* **jobsdb:** pickups stalling on status tables with skewed stats
([#7572](#7572))
([318446f](318446f))
* **jobsdb:** unionjobsdb functions pick the first datasets by table
name ([#7558](#7558))
([e94d6c5](e94d6c5))
* **router:** event order test only counts drained jobs of the last
dataset
([#7552](#7552))
([b0a097a](b0a097a))
* **router:** mask secrets in array-shaped reporting samples
([#7536](#7536))
([902160f](902160f))
* **warehouse:** hot-reload degraded workspaces without aborting
restored uploads
([#7564](#7564))
([cb98598](cb98598))
* **warehouse:** match deltalake columns case-insensitively
([#7563](#7563))
([a7d30d7](a7d30d7))
* **warehouse:** migrate snowflake to gosnowflake v2.3.0
([#7542](#7542))
([cc09426](cc09426))
* **warehouse:** skip job-creation error log on router shutdown
([#7567](#7567))
([895367e](895367e))


### Miscellaneous

* **deps:** bump github.com/go-jose/go-jose/v4 from 4.1.4 to 4.1.6
([#7545](#7545))
([35ee952](35ee952))
* export only the +Inf bucket for limiter timers
([#7570](#7570))
([4429472](4429472))
* **router:** add drainReason label to pipeline_processed_events
([#7561](#7561))
([af0aef8](af0aef8))
* sync release v1.92.0 to main branch
([#7534](#7534))
([9ab165d](9ab165d))
* **warehouse:** bump sqlconnect-go to v1.37.1
([#7575](#7575))
([acdad67](acdad67))

---
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: rudderstack-github-actions[bot] <236995729+rudderstack-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.

3 participants