Skip to content

Add pipeline hash#38357

Open
tarun-google wants to merge 12 commits intoapache:masterfrom
tarun-google:add_pipeline_hash
Open

Add pipeline hash#38357
tarun-google wants to merge 12 commits intoapache:masterfrom
tarun-google:add_pipeline_hash

Conversation

@tarun-google
Copy link
Copy Markdown
Contributor

@tarun-google tarun-google commented May 1, 2026

Add Pipeline Hash along with the PipelineURL. This will allow the RunnerHarness/Server to check the sanity of pipeline while downloading

Tested=Manually with printing logs from Runner in all 3 langs(Java,Python, Go)

Golang-Model pb
Screenshot 2026-05-01 at 11 23 28 AM
Python-Pipeline pb
Screenshot 2026-05-01 at 11 24 17 AM
Java-Pipeline pb
Screenshot 2026-05-01 at 11 25 26 AM

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 to see a list of phrases to trigger workflows.

@tarun-google tarun-google marked this pull request as ready for review May 1, 2026 20:03
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a mechanism to verify the integrity of a pipeline during the download process by calculating and attaching a SHA256 hash of the serialized pipeline proto to the job options. This change ensures that the RunnerHarness or Server can validate the pipeline's sanity before execution, enhancing reliability across the Java, Python, and Go SDKs.

Highlights

  • Pipeline Integrity: Added a SHA256 hash of the serialized pipeline proto to the pipeline options to ensure integrity during download.
  • Cross-Language Support: Implemented the pipeline hash calculation and inclusion in Java, Go, and Python SDKs.
  • Testing: Added unit tests in Go and Python to verify that the pipeline hash is correctly calculated and included in the job options.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request implements the generation and transmission of a SHA256 hash for the staged portable pipeline proto in the Java, Go, and Python Dataflow runners, adding it as a pipelineProtoHash option. Feedback for the Python implementation notes that re-serializing the pipeline proto to compute this hash can be resource-intensive and potentially non-deterministic; it is suggested to hash the actual bytes uploaded to GCS or allow the caller to provide a pre-computed hash.

Comment thread sdks/python/apache_beam/runners/dataflow/internal/apiclient.py Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

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
Copy link
Copy Markdown

codecov Bot commented May 1, 2026

Codecov Report

❌ Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.07%. Comparing base (9fdb366) to head (70464a9).
⚠️ Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
...m/runners/dataflow/DataflowPipelineTranslator.java 60.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master   #38357   +/-   ##
=========================================
  Coverage     58.07%   58.07%           
+ Complexity    13024    13022    -2     
=========================================
  Files          2509     2509           
  Lines        262111   262110    -1     
  Branches      10612    10615    +3     
=========================================
+ Hits         152208   152224   +16     
+ Misses       104238   104218   -20     
- Partials       5665     5668    +3     
Flag Coverage Δ
java 64.32% <71.42%> (+<0.01%) ⬆️
python 79.86% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

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.

1 participant