Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override log levels after log handler is created #22191

Merged
merged 3 commits into from
Jul 11, 2022

Conversation

Abacn
Copy link
Contributor

@Abacn Abacn commented Jul 7, 2022

Follow up of #18222

  • This fixes error message about log level overrides not shown when
    executed with Dataflow runner

Please add a meaningful description for your change here


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

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • 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

See CI.md for more information about GitHub Actions CI.

* This fixes error message about log level overrides not shown when
  executed with Dataflow runner
@github-actions github-actions bot added the python label Jul 7, 2022
@codecov
Copy link

codecov bot commented Jul 7, 2022

Codecov Report

Merging #22191 (5ad1e9b) into master (ec47b12) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master   #22191      +/-   ##
==========================================
+ Coverage   74.21%   74.24%   +0.02%     
==========================================
  Files         702      702              
  Lines       92829    92962     +133     
==========================================
+ Hits        68892    69018     +126     
- Misses      22670    22677       +7     
  Partials     1267     1267              
Flag Coverage Δ
python 83.62% <100.00%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
...thon/apache_beam/runners/worker/sdk_worker_main.py 78.48% <100.00%> (+0.12%) ⬆️
.../python/apache_beam/testing/test_stream_service.py 88.09% <0.00%> (-4.77%) ⬇️
.../apache_beam/runners/interactive/dataproc/types.py 93.10% <0.00%> (-3.45%) ⬇️
sdks/python/apache_beam/utils/interactive_utils.py 95.12% <0.00%> (-2.44%) ⬇️
.../python/apache_beam/transforms/periodicsequence.py 98.38% <0.00%> (-1.62%) ⬇️
...che_beam/runners/interactive/interactive_runner.py 90.06% <0.00%> (-1.33%) ⬇️
...ache_beam/runners/dataflow/ptransform_overrides.py 90.12% <0.00%> (-0.62%) ⬇️
sdks/python/apache_beam/typehints/schemas.py 94.32% <0.00%> (-0.34%) ⬇️
...dks/python/apache_beam/options/pipeline_options.py 94.76% <0.00%> (-0.21%) ⬇️
...hon/apache_beam/runners/worker/bundle_processor.py 93.54% <0.00%> (-0.13%) ⬇️
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ec47b12...5ad1e9b. Read the comment docs.

@Abacn
Copy link
Contributor Author

Abacn commented Jul 7, 2022

Tested on dataflow runner v2. Invalid log overrides option now has the following log message (at the very beginning of worker log):

2022-07-07T20:13:44.765811204ZUnable to parse sdk_harness_log_level_overrides ['{"apache_beam.io.fileio":WARN}']. Log level overrides won't take effect.

Using a valid option (e.g. --sdk_harness_log_level_overrides={\"apache_beam.io.fileio\":\"WARN\"}), log level settings take effect as expected.

R: @tvalentyn

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2022

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control

@Abacn
Copy link
Contributor Author

Abacn commented Jul 7, 2022

R: @TheNeuralBit

@TheNeuralBit
Copy link
Member

Would it be possible to add a test that fails without this change?

fix ghost "NoneType" in default level error message
@Abacn
Copy link
Contributor Author

Abacn commented Jul 8, 2022

retest this please

@Abacn
Copy link
Contributor Author

Abacn commented Jul 11, 2022

Would it be possible to add a test that fails without this change?

Addressed. please take another look, thanks!

@tvalentyn tvalentyn changed the title Adjust log level overrides executed after log handler created Override log levels after log handler is created Jul 11, 2022
Fix method name typos

Co-authored-by: tvalentyn <[email protected]>
@tvalentyn tvalentyn merged commit eb071fa into apache:master Jul 11, 2022
@Abacn Abacn deleted the loginitialorder branch July 11, 2022 18:56
konstantinurysov pushed a commit to akvelon/beam that referenced this pull request Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants