Skip to content

Conversation

@jsoriano
Copy link
Member

@jsoriano jsoriano commented Sep 7, 2020

Cherry-pick of PR #20603 to 7.x branch. Original message:

What does this PR do?

Solve python deprecation warnings, and make python tests to fail if deprecated code is added.

Summary of changes:

  • Add error::DeprecationWarning to pytest's filterwarnings (so tests fail if use deprecated code).
  • Add pytest.ini to the list of files that trigger all CI builds.
  • Refactor tests to don't require deprecated assertDictContainsSubset.
  • Update autopep8 to latest version, and run it once with -a (aggresive).
  • Solve some other deprecation warnings not solved automatically by autopep8 -a.

Why is it important?

To avoid introducing deprecated Python code on testing.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

Solve python deprecation warnings, and make python tests to
fail if deprecated code is added.

Changes here:
* Add error::DeprecationWarning to pytest's filterwarnings (so tests
  fail if use deprecated code).
* Add pytest.ini to the list of files that trigger all CI builds.
* Refactor tests to don't require deprecated assertDictContainsSubset.
* Update autopep8 to latest version, and run it once with -a (aggresive).
* Solve some other deprecation warnings not solved automatically by
  autopep8 -a.

(cherry picked from commit bed3964)
@jsoriano jsoriano requested review from a team as code owners September 7, 2020 12:09
@jsoriano jsoriano added [zube]: In Review backport Team:Automation Label for the Observability productivity team Team:Integrations Label for the Integrations team labels Sep 7, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 7, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Sep 7, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented Sep 7, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #21007 updated]

  • Start Time: 2020-09-07T15:22:16.303+0000

  • Duration: 74 min 15 sec

Test stats 🧪

Test Results
Failed 0
Passed 19741
Skipped 1863
Total 21604

@jsoriano jsoriano merged commit a1e40f4 into elastic:7.x Sep 9, 2020
@jsoriano jsoriano deleted the backport_20603_7.x branch September 9, 2020 09:37
@zube zube bot removed the [zube]: Done label Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Team:Automation Label for the Observability productivity team Team:Integrations Label for the Integrations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants