Skip to content

chore: cleanup python mirroring - #7395

Merged
fracasula merged 7 commits into
masterfrom
cleanupPythonMirroring
Sep 16, 2026
Merged

fracasula merged 7 commits into
masterfrom
cleanupPythonMirroring

Conversation

@fracasula

@fracasula fracasula commented Sep 15, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Removes Python user-transformation mirroring and the legacy shared Python transformer routing from the processor.

These are two separate things, going for two different reasons.

The first is routing. PYTHON_TRANSFORM_URL pointed at a single shared Python transformer, and PYTHON_TRANSFORM_VERSION_IDS gated which transformation versions were allowed to reach it. Per-workspace PyT replaced that: each workspace now runs its own Python deployment, selected by Processor.UserTransformer.perWorkspacePyTEnabled and the URL template, so there is no shared service left to point at and a global version allowlist no longer means anything.

The second is mirror filtering. Mirroring compared a Python transformation's output against a mirror deployment, and because Python transformations can contain fetch calls that are not safe to replay, the mirror could answer HTTP 297 to say "I refused this one"; rudder-server then cached that verdict per version ID so subsequent batches of the same transformation skipped mirroring altogether. That machinery is going because we decided not to support mirroring for Python at all. Mirroring is now JavaScript-only, and isUserTransformMirroringEnabled refuses any python* language up front.

What this removes:

  • PYTHON_TRANSFORM_URL, PYTHON_TRANSFORM_MIRROR_URL, PYTHON_TRANSFORM_VERSION_IDS, PYTHON_TRANSFORM_VERSION_IDS_ENABLE and Processor.userTransformationMirroring.filterCacheTTL.
  • transformerutils.PythonTransformConfig, LoadPythonTransformConfig and IsVersionAllowed.
  • HTTP status 297 (transformerutils.StatusMirrorFiltered) as a protocol between rudder-server and the transformer, along with types.Response.MirrorFiltered and the Handle.mirrorFilteredCache TTL cache.
  • The processor_ut_mirroring_filtered_count metric.

Behaviour after this change: a Python transformation goes to the per-workspace PyT deployment when Processor.UserTransformer.perWorkspacePyTEnabled is on. When it is off there is no fallback. The JavaScript transformer cannot execute Python, so routing there would fail every event rather than transform it, and the processor panics instead of quietly discarding customer data. Mirroring never sends Python traffic at all.

This is the first step of a wider cleanup. The env vars above stop being read here, so they can be dropped from rudder-devops and rudderstack-operator once this ships, and the 297 response path can then be retired from rudder-pytransformer.

Companion PRs

Linear Ticket

< Fixes PIPE-3370 >

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

@codecov

codecov Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.29630% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 84.42%. Comparing base (80353d1) to head (43f973d).

Files with missing lines Patch % Lines
...l/transformer/user_transformer/user_transformer.go 95.23% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7395      +/-   ##
==========================================
+ Coverage   84.33%   84.42%   +0.09%     
==========================================
  Files         620      620              
  Lines       62706    62640      -66     
==========================================
+ Hits        52882    52884       +2     
+ Misses       9821     9753      -68     
  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.

@fracasula
fracasula marked this pull request as ready for review September 15, 2026 10:52

@mihir20 mihir20 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@fracasula
fracasula merged commit 9f9bcde into master Sep 16, 2026
79 of 80 checks passed
@fracasula
fracasula deleted the cleanupPythonMirroring branch September 16, 2026 07:54
This was referenced Sep 21, 2026
achettyiitr pushed a commit that referenced this pull request Sep 21, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.88.0-rc.1](v1.87.0...v1.88.0-rc.1)
(2026-09-21)


### Features

* **warehouse:** bigquery workload identity federation authentication
([#7361](#7361))
([d16ab5f](d16ab5f))


### Bug Fixes

* bound clickHouse v2 s3 copy memory
([#7407](#7407))
([a17a78f](a17a78f))


### Miscellaneous

* cleanup python mirroring
([#7395](#7395))
([9f9bcde](9f9bcde))
* default failed-keys error capture on
([#7404](#7404))
([db84987](db84987))
* sync release v1.87.0 to main branch
([#7394](#7394))
([80353d1](80353d1))
* tag namespace config http client stats with version and mode
([#7401](#7401))
([d152ae5](d152ae5))

---
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>
mihir20 pushed a commit that referenced this pull request Sep 22, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.88.0](v1.87.0...v1.88.0)
(2026-09-21)


### Features

* **warehouse:** bigquery workload identity federation authentication
([#7361](#7361))
([d16ab5f](d16ab5f))


### Bug Fixes

* bound clickHouse v2 s3 copy memory
([#7407](#7407))
([a17a78f](a17a78f))


### Miscellaneous

* cleanup python mirroring
([#7395](#7395))
([9f9bcde](9f9bcde))
* default failed-keys error capture on
([#7404](#7404))
([db84987](db84987))
* sync release v1.87.0 to main branch
([#7394](#7394))
([80353d1](80353d1))
* tag namespace config http client stats with version and mode
([#7401](#7401))
([d152ae5](d152ae5))

---
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