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

Add warning for unknown pipeline options #29474

Merged
merged 2 commits into from
Nov 28, 2023

Conversation

riteshghorse
Copy link
Contributor

@riteshghorse riteshghorse commented Nov 17, 2023

Adds a warning log for unknown pipeline option.
Screenshot 2023-11-17 at 4 37 59 PM

Part of #28402


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.

Copy link

codecov bot commented Nov 17, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (1f4bc68) 38.28% compared to head (0839ca3) 37.81%.
Report is 32 commits behind head on master.

Files Patch % Lines
...dks/python/apache_beam/options/pipeline_options.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #29474      +/-   ##
==========================================
- Coverage   38.28%   37.81%   -0.47%     
==========================================
  Files         694      690       -4     
  Lines      102255   101189    -1066     
==========================================
- Hits        39147    38266     -881     
+ Misses      61518    61333     -185     
  Partials     1590     1590              
Flag Coverage Δ
python 29.01% <0.00%> (-0.88%) ⬇️

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.

@Abacn
Copy link
Contributor

Abacn commented Nov 17, 2023

I remember currently we have similar warning, but just not quite accurate (many false positive). For example, this load test: 2023-11-17_07_58_43-10220172113544842485, It has a WARNING worker log:

Discarding unparseable args: ['--autoscalingAlgorithm=NONE', '--dataflowJobId=2023-11-17_07_58_43-10220172113544842485',
'--direct_runner_use_stacked_bundle', '--fanout=1', '--gcpTempLocation=gs://temp-storage-for-perf-tests/loadtests/load-tests-python-dataflow-batch-gbk-1-1117155301.1700236723.066487',
'--influx_db_name=beam_test_metrics', '--influx_hostname=http://10.128.0.96:8086',
'--influx_measurement=python_batch_gbk_1', '--input_options={"algorithm": "lcg", "key_size": 1, "num_records": 200000000, "value_size": 9}', '--iterations=1',
'--jobId=2023-11-17_07_58_43-10220172113544842485', '--maxNumWorkers=0', '--metrics_dataset=load_test',
'--metrics_table=python_dataflow_batch_gbk_1', '--numWorkers=5',
'--pipelineUrl=gs://temp-storage-for-perf-tests/loadtests/load-tests-python-dataflow-batch-gbk-1-1117155301.1700236723.066487/pipeline.pb', '--pipeline_type_check', '--publish_to_big_query',
'--tempLocation=gs://temp-storage-for-perf-tests/loadtests/load-tests-python-dataflow-batch-gbk-1-1117155301.1700236723.066487', '--timeout_ms=0']

the full pipeline option also output in another INFO log:

Pipeline_options: {'runner': 'DataflowRunner', 'project': 'apache-beam-testing', 'job_name': 'load-tests-python-dataflow-batch-gbk-1-1117155301',
'staging_location': 'gs://temp-storage-for-perf-tests/loadtests/load-tests-python-dataflow-batch-gbk-1-1117155301.1700236723.066487', 'temp_location': 'gs://temp-storage-for-perf-tests/loadtests/load-tests-python-dataflow-batch-gbk-1-1117155301.1700236723.066487', 'region': 'us-central1',
'gcp_oauth_scopes': ['https://www.googleapis.com/auth/bigquery', 'https://www.googleapis.com/auth/cloud-platform', 'https://www.googleapis.com/auth/devstorage.full_control', 'https://www.googleapis.com/auth/userinfo.email', 'https://www.googleapis.com/auth/datastore', 'https://www.googleapis.com/auth/spanner.admin', 'https://www.googleapis.com/auth/spanner.data', 'https://www.googleapis.com/auth/bigquery', 'https://www.googleapis.com/auth/cloud-platform', 'https://www.googleapis.com/auth/devstorage.full_control', 'https://www.googleapis.com/auth/userinfo.email', 'https://www.googleapis.com/auth/datastore', 'https://www.googleapis.com/auth/spanner.admin', 'https://www.googleapis.com/auth/spanner.data']
 'num_workers': 5, 'autoscaling_algorithm': 'NONE',
'experiments': ['beam_fn_api', 'use_unified_worker', 'use_runner_v2', 'use_portable_job_submission', 'use_multiple_sdk_containers', 'enable_always_on_exception_sampling'],
'beam_plugins': ['apache_beam.io.filesystem.FileSystem', 'apache_beam.io.hadoopfilesystem.HadoopFileSystem', 'apache_beam.io.localfilesystem.LocalFileSystem', 'apache_beam.io.gcp.gcsfilesystem.GCSFileSystem', 'apache_beam.io.aws.s3filesystem.S3FileSystem', 'apache_beam.io.azure.blobstoragefilesystem.BlobStorageFileSystem'],
'sdk_location': '/runner/_work/beam/beam/sdks/python/build/apache-beam.tar.gz', 'sdk_worker_parallelism': '1', 'environment_cache_millis': '0'}

Copy link
Contributor

@Abacn Abacn left a comment

Choose a reason for hiding this comment

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

Thanks, I see here and "Discarding unparseable args" logs are in different code paths.

sdks/python/apache_beam/options/pipeline_options.py Outdated Show resolved Hide resolved
sdks/python/apache_beam/options/pipeline_options.py Outdated Show resolved Hide resolved
@riteshghorse
Copy link
Contributor Author

yeah but if the retain_unknown_option is set to true (in case of dataflow runner) then the warning for unknown flag is not shown

Copy link
Contributor

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

R: @damccorm for label python.

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

Copy link
Contributor

@Abacn Abacn left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

Reminder, please take a look at this pr: @damccorm

Copy link
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

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

LGTM

@riteshghorse riteshghorse merged commit 29cd0aa into apache:master Nov 28, 2023
73 of 74 checks passed
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.

3 participants