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

Fix python deprecation warnings #20603

Merged
merged 8 commits into from
Sep 7, 2020

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Aug 14, 2020

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

@jsoriano jsoriano added :Testing Team:Integrations Label for the Integrations team labels Aug 14, 2020
@jsoriano jsoriano self-assigned this Aug 14, 2020
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Aug 14, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented Aug 14, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #20603 updated]

  • Start Time: 2020-09-04T15:21:28.298+0000

  • Duration: 72 min 27 sec

Test stats 🧪

Test Results
Failed 0
Passed 19804
Skipped 1834
Total 21638

@jsoriano jsoriano marked this pull request as ready for review September 4, 2020 22:22
@jsoriano jsoriano requested review from a team as code owners September 4, 2020 22:22
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@jsoriano jsoriano changed the title Fail on python deprecation warnings Fix python deprecation warnings Sep 4, 2020
@botelastic botelastic bot added the Team:Automation Label for the Observability productivity team label Sep 7, 2020
@jsoriano jsoriano merged commit bed3964 into elastic:master Sep 7, 2020
@jsoriano jsoriano deleted the python-deprecation-errors branch September 7, 2020 12:09
jsoriano added a commit to jsoriano/beats that referenced this pull request Sep 7, 2020
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 added a commit that referenced this pull request Sep 9, 2020
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)
v1v added a commit to v1v/beats that referenced this pull request Oct 2, 2020
v1v added a commit to v1v/beats that referenced this pull request Oct 2, 2020
v1v added a commit to v1v/beats that referenced this pull request Oct 2, 2020
…ne-2.0-arm

* upstream/master: (54 commits)
  [CI] Change x-pack/auditbeat build events (comments, labels) (elastic#21463)
  [CI] changeset from elastic#20603 was not added to CI2.0 (elastic#21464)
  Add new log file reader for filestream input (elastic#21450)
  [CI] Send slack message with build status (elastic#21428)
  Remove duplicated sources url in dependencies report (elastic#21462)
  Add implementation of FSWatcher and FSScanner for filestream (elastic#21444)
  [Ingest Manager] Split index restrictions into type,dataset, namespace parts (elastic#21406)
  Update Filebeat module expected logs files (elastic#21454)
  Edit SQL module docs and fix broken doc structure (elastic#21233)
  [Ingest Manager] Send snapshot flag together with metadata (elastic#21285)
  Revert "[JJBB] Set shallow cloning to 10 (elastic#21409)" (elastic#21447)
  [JJBB] Use reference repo for fast checkouts (elastic#21410)
  Add initial skeleton of filestream input (elastic#21427)
  Initial spec file for apm-server (elastic#21225)
  [Ingest Manager] Upgrade Action: make source URI optional (elastic#21372)
  Add field limit check for AWS Cloudtrail flattened fields (elastic#21388)
  [Winlogbeat] Move winlogbeat javascript processor to libbeat (elastic#21402)
  ci: pipeline to generate the changelog (elastic#21426)
  [JJBB] Set shallow cloning to 10 (elastic#21409)
  docs: add link to release notes for 7.9.2 (elastic#21405) (elastic#21419)
  ...
v1v added a commit to v1v/beats that referenced this pull request Oct 2, 2020
…ci-build-label-support

* upstream/master:
  [CI] Change x-pack/auditbeat build events (comments, labels) (elastic#21463)
  [CI] changeset from elastic#20603 was not added to CI2.0 (elastic#21464)
  Add new log file reader for filestream input (elastic#21450)
  [CI] Send slack message with build status (elastic#21428)
  Remove duplicated sources url in dependencies report (elastic#21462)
  Add implementation of FSWatcher and FSScanner for filestream (elastic#21444)
  [Ingest Manager] Split index restrictions into type,dataset, namespace parts (elastic#21406)
  Update Filebeat module expected logs files (elastic#21454)
  Edit SQL module docs and fix broken doc structure (elastic#21233)
  [Ingest Manager] Send snapshot flag together with metadata (elastic#21285)
  Revert "[JJBB] Set shallow cloning to 10 (elastic#21409)" (elastic#21447)
  [JJBB] Use reference repo for fast checkouts (elastic#21410)
  Add initial skeleton of filestream input (elastic#21427)
  Initial spec file for apm-server (elastic#21225)
  [Ingest Manager] Upgrade Action: make source URI optional (elastic#21372)
  Add field limit check for AWS Cloudtrail flattened fields (elastic#21388)
  [Winlogbeat] Move winlogbeat javascript processor to libbeat (elastic#21402)
  ci: pipeline to generate the changelog (elastic#21426)
v1v added a commit to v1v/beats that referenced this pull request Oct 5, 2020
…-matches-found

* upstream/master: (21 commits)
  Skip filestream flaky tests (elastic#21490)
  Ignore unsupported metrics in the azure module (elastic#21486)
  Do not run symlink tests on Windows (elastic#21472)
  Map `cloud.account.id` to azure sub id (elastic#21483)
  Add support for app_state metricset (elastic#20639)
  Include original error when metricbeat fails to connect with Kafka (elastic#21484)
  Prompt only when agent is already enrolled (elastic#21473)
  Fix leftover delpoyment example (elastic#21474)
  Bump version to ECS 1.6 in modules without ECS updates (elastic#21455)
  Clarify input type configuration options (elastic#19284)
  Increase index pattern size check to 10MiB (elastic#21487)
  Migrate S3 Input to Filebeat Input V2 (elastic#20005)
  [libbeat] Add configurable exponential backoff for disk queue write errors (elastic#21493)
  Revert "Revert "[JJBB] Set shallow cloning to 10 (elastic#21409)" (elastic#21447)" (elastic#21467)
  Fix format of debug messages in tlscommon (elastic#21482)
  [CI] Change x-pack/auditbeat build events (comments, labels) (elastic#21463)
  [CI] changeset from elastic#20603 was not added to CI2.0 (elastic#21464)
  Add new log file reader for filestream input (elastic#21450)
  [CI] Send slack message with build status (elastic#21428)
  Remove duplicated sources url in dependencies report (elastic#21462)
  ...
melchiormoulin pushed a commit to melchiormoulin/beats that referenced this pull request Oct 14, 2020
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Automation Label for the Observability productivity team Team:Integrations Label for the Integrations team technical debt :Testing v7.10.0
Projects
None yet
4 participants