Skip to content

Conversation

@liferoad
Copy link
Contributor

#34364 reverted the PR.


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

@github-actions
Copy link
Contributor

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

R: @shunping for label python.
R: @chamikaramj for label io.

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

@codecov
Copy link

codecov bot commented Mar 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.37%. Comparing base (3595a33) to head (ddbb675).

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #34390      +/-   ##
============================================
- Coverage     56.37%   56.37%   -0.01%     
  Complexity     3285     3285              
============================================
  Files          1174     1174              
  Lines        179353   179362       +9     
  Branches       3398     3398              
============================================
+ Hits         101119   101122       +3     
- Misses        74974    74980       +6     
  Partials       3260     3260              
Flag Coverage Δ
python 81.30% <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.

"when calling ReadFromText")

with unittest.mock.patch('os.path.dirname') as mock_dirname:
mock_dirname.side_effect = TypeError(expected_error_message)
Copy link
Member

@kennknowles kennknowles Mar 26, 2025

Choose a reason for hiding this comment

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

Is it possible to actually cause this error, instead? Mocking makes the test possibly masking things if the presumed behavior of os.path.dirname is not quite right, or if it changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The code changes are quite clear in sdks/python/apache_beam/io/textio.py. We mock TypeError and then this causes the OS error since the test file does not exist. This mainly tests TypeError is captured and passes.

try:
if not os.path.dirname(file_pattern):
file_pattern = os.path.join('.', file_pattern)
except TypeError:
Copy link
Member

Choose a reason for hiding this comment

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

Seems like a very broad exception catch. What is the failure mode that you are handling?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

file_pattern coud be passed in as other types, for example, ValueProvider.

damccorm and others added 17 commits April 4, 2025 19:41
added virtualenv-clone
* Create a varint32 coder and used it for RowCoder

* Fix checks

* Handle a race when multiple process downloading jar at the same time
This will allow other users to replace the default sql provider used by 'Join' and 'Combine-sql'.
…t stream to prevent precondition exception on reuse (apache#34418)
…#34416)

Bumps [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) from 1.17.62 to 1.17.67.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](aws/aws-sdk-go-v2@credentials/v1.17.62...feature/s3/manager/v1.17.67)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/feature/s3/manager
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) from 1.17.63 to 1.17.64.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](aws/aws-sdk-go-v2@credentials/v1.17.63...credentials/v1.17.64)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/credentials
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.