Skip to content

Propagate stable code identifier pickling and preserve pickler config - #40453

Open
kristynsmith wants to merge 4 commits into
apache:masterfrom
kristynsmith:stable-code-identifier-pickling
Open

kristynsmith wants to merge 4 commits into
apache:masterfrom
kristynsmith:stable-code-identifier-pickling

Conversation

@kristynsmith

Copy link
Copy Markdown
Contributor

Previously, Pipeline.to_runner_api did not forward the runner's enable_stable_code_identifier_pickling setting onto PipelineContext, preventing downstream transforms from using stable code object identifiers during Runner API serialization. Additionally, enabling enable_stable_code_identifier_pickling in cloudpickle_pickler replaced the active config with a static STABLE_CODE_IDENTIFIER_CONFIG instance initialized at import time, discarding runtime overrides made to DEFAULT_CONFIG (such as custom id_generator and pickle_main_by_ref settings).

Copy enable_stable_code_identifier_pickling from the runner onto PipelineContext in Pipeline.to_runner_api, and use dataclasses.replace in cloudpickle_pickler._dumps so get_code_object_params is updated without overwriting other fields on the active CloudPickleConfig.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README for a list of workflows and how to trigger them.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.56%. Comparing base (c275c97) to head (88ae832).
⚠️ Report is 137 commits behind head on master.

Additional details and impacted files
@@              Coverage Diff              @@
##             master   #40453       +/-   ##
=============================================
+ Coverage     56.20%   79.56%   +23.35%     
=============================================
  Files          1123      487      -636     
  Lines        178213    82226    -95987     
  Branches       1489        0     -1489     
=============================================
- Hits         100168    65421    -34747     
+ Misses        75524    16805    -58719     
+ Partials       2521        0     -2521     
Flag Coverage Δ
go ?
java ?
python 79.56% <100.00%> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @tvalentyn for label python.

This pull request likely touches a core component ("core" label). Please review with scrutiny.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@tvalentyn

Copy link
Copy Markdown
Contributor

Reached out to @kristynsmith offline

@tvalentyn

Copy link
Copy Markdown
Contributor

waiting on author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants