Skip to content

Add streaming tests to Storage Write API Python wrapper - #26491

Merged
Abacn merged 24 commits into
apache:masterfrom
ahmedabu98:storage_write_python_tests
May 5, 2023
Merged

Add streaming tests to Storage Write API Python wrapper#26491
Abacn merged 24 commits into
apache:masterfrom
ahmedabu98:storage_write_python_tests

Conversation

@ahmedabu98

Copy link
Copy Markdown
Contributor

No description provided.

@ahmedabu98

Copy link
Copy Markdown
ContributorAuthor

R: @chamikaramj

@github-actions

Copy link
Copy Markdown
Contributor

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

@codecov

codecovBot commented May 1, 2023

Copy link
Copy Markdown

Codecov Report

Merging #26491 (82d9ec3) into master (a13749f) will decrease coverage by 9.20%.
The diff coverage is n/a.

@@ Coverage Diff @@## master #26491 +/- ##
==========================================
- Coverage 81.11% 71.92% -9.20% 
==========================================
Files 469 752 +283 Lines 67438 101698 +34260 ==========================================
+ Hits 54705 73142 +18437 - Misses 12733 27065 +14332 - Partials 0 1491 +1491 
FlagCoverage Δ
python81.10% <ø> (-0.02%)⬇️

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

see 290 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Abacn

Abacn commented May 3, 2023

Copy link
Copy Markdown
Contributor

Some tips to make tests running faster

@Abacn

Abacn commented May 3, 2023

Copy link
Copy Markdown
Contributor

Adding the flag is not yet effective as the sdk_location is set here for this test:

"--sdk_location=${pythonDir}/build/apache-beam.tar.gz"

instead of needsSdkLocation, probably provide the wheel location here and config that the test suite depends on initializeForDataflowJob.

}
}
if (config.pythonPipelineOptions.contains("--runner=TestDataflowRunner")) {
pythonTask.configure {dependsOn ':sdks:python:test-suites:dataflow:initializeForDataflowJob'}

@AbacnAbacnMay 3, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This actually won't work. initializeForDataflowJob exists in project like :sdks:python:test-suites:dataflow:py310 not :sdks:python:test-suites:dataflow.

We can add a parameter(s) setupTasks to createCrossLanguageUsingJavaExpansionTask , and then declare here

pythonTask.configure {dependsOn setupTask}

and call

createCrossLanguageUsingJavaExpansionTask(setupTask: 'initializeForDataflowJob'
...

@chamikaramjchamikaramj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks.

@chamikaramj

Copy link
Copy Markdown
Contributor

LGTM.

@ahmedabu98

Copy link
Copy Markdown
ContributorAuthor

Run Python_Xlang_Gcp_Dataflow PostCommit

@ahmedabu98

Copy link
Copy Markdown
ContributorAuthor

Run Python_Xlang_Gcp_Direct PostCommit

@AbacnAbacn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

possible followup: move CROSS_LANGUAGE_VALIDATES_RUNNER_PYTHON_VERSIONS and the logic of pick up two py versions from jenkins script to gradle property of test-suites,

dataflow_validates_runner_batch_tests_V2=3.7,3.11

Then claim a gradle task in dataflow/build.gradle:

task validatesRunnerBatchTestsV2 {

like what we did for validate runner tests:

The running time of the dataflow test suite would decrease by half because now py37 and py311 tests are running concurrently. Same thing can be done for the direct runner test.

@Abacn
Abacn merged commit 79e4809 into apache:masterMay 5, 2023
@ahmedabu98
ahmedabu98 deleted the storage_write_python_tests branch May 5, 2023 14:56
@AbacnAbacn mentioned this pull request May 5, 2023
3 tasks
@ahmedabu98ahmedabu98 mentioned this pull request Aug 14, 2023
3 tasks
cushon pushed a commit to cushon/beam that referenced this pull request May 24, 2024
* add autosharding and use at-least-once tests
* at-least-once, streaming, and autosharding tests
* spotless
* assign argument to parameter name
* fix
* increase timeout for dataflow tests
* use wheel distribution
* use wheels sdk location
* add dependency on initializeForDataflowJob for tests using TestDataflowRunner
* tab
* correct method call
* correct path for initializeForDataflowJob
* use python version set by applyPythonNature
* wait for initializeForDataflowJob earlier
* fetch sdkLocation in doLast
* streaming and at-least-once test
* spotless
* sanity check
* revert sanity check
* remove ref to sdkLocation from common
* fix path to initializeForDataflowJob
Sign up for freeto 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

@ahmedabu98@Abacn@chamikaramj