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

[BEAM-3713] Moving integration tests from nose to pytest #14481

Merged
merged 10 commits into from Apr 26, 2021

Conversation

benWize
Copy link
Contributor

@benWize benWize commented Apr 8, 2021

Move integration tests from nose to pytest on the following jobs:

  • job_PostCommit_Python
  • job_PostCommit_Python_ValidatesContainer_Dataflow
  • job_PostCommit_Python_ValidatesRunner_Dataflow
  • job_PostCommit_Python_ValidatesRunner_Flink

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).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • 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.

Post-Commit Tests Status (on master branch)

Lang SDK ULR Dataflow Flink Samza Spark Twister2
Go Build Status --- Build Status Build Status --- Build Status ---
Java Build Status Build Status Build Status
Build Status
Build Status
Build Status
Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status
Build Status
Build Status
Build Status
Python Build Status
Build Status
Build Status
--- Build Status
Build Status
Build Status
Build Status
Build Status
--- Build Status ---
XLang Build Status --- Build Status Build Status --- Build Status ---

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website Whitespace Typescript
Non-portable Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status Build Status Build Status
Portable --- Build Status Build Status --- --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

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.

@codecov
Copy link

codecov bot commented Apr 8, 2021

Codecov Report

Merging #14481 (3395efa) into master (325471d) will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14481      +/-   ##
==========================================
+ Coverage   83.64%   83.67%   +0.03%     
==========================================
  Files         443      443              
  Lines       59007    59011       +4     
==========================================
+ Hits        49354    49376      +22     
+ Misses       9653     9635      -18     
Impacted Files Coverage Δ
...dks/python/apache_beam/options/pipeline_options.py
...ython/apache_beam/io/gcp/tests/bigquery_matcher.py
...on/apache_beam/runners/portability/spark_runner.py
...e_beam/examples/complete/top_wikipedia_sessions.py
.../examples/snippets/transforms/aggregation/count.py
...am/testing/benchmarks/chicago_taxi/process_tfma.py
...apache_beam/runners/portability/portable_runner.py
...he_beam/io/flink/flink_streaming_impulse_source.py
...ython/apache_beam/examples/complete/estimate_pi.py
.../srcs/sdks/python/apache_beam/typehints/schemas.py
... and 876 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 f61d100...3395efa. Read the comment docs.

@benWize
Copy link
Contributor Author

benWize commented Apr 8, 2021

Run Python 3.7 PostCommit

@benWize
Copy link
Contributor Author

benWize commented Apr 8, 2021

Run Python Dataflow ValidatesContainer

@benWize
Copy link
Contributor Author

benWize commented Apr 8, 2021

Run Python Dataflow ValidatesRunner

@benWize benWize marked this pull request as ready for review April 9, 2021 17:26
@benWize
Copy link
Contributor Author

benWize commented Apr 9, 2021

R: @udim, could you take a look at this? Thanks in advance!

@udim
Copy link
Member

udim commented Apr 9, 2021

Run Python 3.7 PostCommit

@udim
Copy link
Member

udim commented Apr 9, 2021

Run PythonDocs PreCommit

@udim
Copy link
Member

udim commented Apr 9, 2021

In https://ci-beam.apache.org/job/beam_PostCommit_Py_ValCont_PR/176/console I see this:

18:15:51 ERROR: Step ‘Publish JUnit test result report’ failed: No test report files were found. Configuration error?

I see that you updated the archiveJunit paths, so it's probably because the Jenkins job config is not updated (needs a "run seed job").

@udim
Copy link
Member

udim commented Apr 9, 2021

rnu seed job

@udim
Copy link
Member

udim commented Apr 9, 2021

run seed job

@benWize
Copy link
Contributor Author

benWize commented Apr 12, 2021

In https://ci-beam.apache.org/job/beam_PostCommit_Py_ValCont_PR/176/console I see this:

18:15:51 ERROR: Step ‘Publish JUnit test result report’ failed: No test report files were found. Configuration error?

I see that you updated the archiveJunit paths, so it's probably because the Jenkins job config is not updated (needs a "run seed job").

Thanks Udi, I think the "Seed Job" is not triggering on the comment (https://ci-beam.apache.org/job/beam_SeedJob/), I was thinking maybe because I'm not a committer and that job probably only runs on committer's PRs.

@aaltay
Copy link
Member

aaltay commented Apr 23, 2021

In ci-beam.apache.org/job/beam_PostCommit_Py_ValCont_PR/176/console I see this:

18:15:51 ERROR: Step ‘Publish JUnit test result report’ failed: No test report files were found. Configuration error?

I see that you updated the archiveJunit paths, so it's probably because the Jenkins job config is not updated (needs a "run seed job").

Thanks Udi, I think the "Seed Job" is not triggering on the comment (ci-beam.apache.org/job/beam_SeedJob), I was thinking maybe because I'm not a committer and that job probably only runs on committer's PRs.

I believe this is true. And @tvalentyn had a work around for this. Maybe he could share, @udim could help with running tests.

@udim
Copy link
Member

udim commented Apr 23, 2021

Running a seed job from a copy of this PR: https://ci-beam.apache.org/job/beam_SeedJob/7972/ (#14629)

@udim
Copy link
Member

udim commented Apr 23, 2021

Run Python 3.7 PostCommit

@udim
Copy link
Member

udim commented Apr 23, 2021

Run Python Dataflow ValidatesContainer

@udim
Copy link
Member

udim commented Apr 23, 2021

https://ci-beam.apache.org/job/beam_PostCommit_Py_ValCont_PR/182/ passed and has test results correctly reported. Overall an improvement since it now has stderr/out captured.

https://ci-beam.apache.org/job/beam_PostCommit_Python37_PR/257/ timed out after 1h40m. I think the above result is enough to verify the .groovy changes.

Copy link
Member

@udim udim left a comment

Choose a reason for hiding this comment

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

Some comments and lint failures, but otherwise LGTM

sdks/python/scripts/run_integration_test.sh Outdated Show resolved Hide resolved
sdks/python/scripts/run_integration_test.sh Outdated Show resolved Hide resolved
sdks/python/scripts/run_integration_test.sh Outdated Show resolved Hide resolved
sdks/python/apache_beam/io/gcp/bigquery_read_it_test.py Outdated Show resolved Hide resolved
@attr('IT', 'ValidatesRunner', 'sickbay-batch')
@pytest.mark.no_sickbay_batch
@pytest.mark.it_validatesrunner
@pytest.mark.it_postcommit
Copy link
Member

Choose a reason for hiding this comment

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

This is the only test that runs in both ValidatesRunner and post-commit. I think that's a bug but let's leave it for this PR.

@benWize benWize requested a review from udim April 26, 2021 16:01
@udim
Copy link
Member

udim commented Apr 26, 2021

Lint failure:

09:32:57 apache_beam/testing/test_pipeline.py:149:0: C0301: Line too long (100/80) (line-too-long)

You can run lint checks locally as well using ./gradlew lint: https://cwiki.apache.org/confluence/display/BEAM/Python+Tips#PythonTips-LintandFormattingChecks

Copy link
Member

@udim udim left a comment

Choose a reason for hiding this comment

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

Thanks!

@udim udim merged commit 38e879b into apache:master Apr 26, 2021
@benWize
Copy link
Contributor Author

benWize commented Apr 26, 2021

Thanks!

Thanks to you

@TheNeuralBit
Copy link
Member

Is it possible this broke Python PostCommits? They've been failing since this went in: https://ci-beam.apache.org/job/beam_PostCommit_Python38/1146/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants