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 async tests for plugins #425

Merged
merged 3 commits into from
Jul 24, 2023

Conversation

florianvazelle
Copy link
Collaborator

Description

  1. Add asynchronous testing for plugins
  2. Clean title in USER GUIDE for alerting section

Issues Resolved

  1. To increase coverage
  2. As requested here Index State Management support #398 (comment)

@codecov
Copy link

codecov bot commented Jun 29, 2023

Codecov Report

Merging #425 (92fb09e) into main (4dba35d) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #425   +/-   ##
=======================================
  Coverage   71.49%   71.49%           
=======================================
  Files          81       81           
  Lines        7668     7668           
=======================================
  Hits         5482     5482           
  Misses       2186     2186           

@florianvazelle florianvazelle marked this pull request as draft June 29, 2023 08:50
@dblock
Copy link
Member

dblock commented Jun 30, 2023

LGTM, finish it up?

@dblock dblock added the skip-changelog Skips changelog verifier label Jun 30, 2023
@florianvazelle
Copy link
Collaborator Author

Hi @dblock, there are two points I'd like to look at:

  • the tests pass but the teardown of the last test is flaky, because the event loop seems closed
  • and coverage isn't increasing, because it seems that coverage reports sent to codecov are from the test workflow (https://github.com/opensearch-project/opensearch-py/blob/main/.github/workflows/test.yml), and in the test workflow no OpenSearch is run. So in fact coverage doesn't really represent what's being tested. I'm taking a little more time to see if it isn't possible to have a workflow that would launch all the tests (with a running OpenSearch), and that would send a complete report, which would make it possible to have a real coverage report on plugins for example.

@dblock
Copy link
Member

dblock commented Jul 5, 2023

@florianvazelle I wouldn't worry about coverage

Signed-off-by: florian <florian@harfanglab.fr>
Signed-off-by: florian <florian@harfanglab.fr>
Signed-off-by: florian <florian@harfanglab.fr>
@florianvazelle florianvazelle marked this pull request as ready for review July 21, 2023 14:33
@florianvazelle
Copy link
Collaborator Author

@dblock Ok, so It's good to me now

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

LGTM, two small changes with the license headers please? Sorry for the hassle.

tl;dr:

  • new files only need the SPDX header + first paragraph
  • existing files license headers should not be changed

# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
#
# Modifications Copyright OpenSearch Contributors. See
Copy link
Member

Choose a reason for hiding this comment

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

You can remove the modifications part from new files. That was added during the fork for files that had an ES license before.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But the utils/license-headers.py enforce the Modifications Copyright OpenSearch Contributors part. Should I adapt checks made in the script ?

Copy link
Member

Choose a reason for hiding this comment

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

Hmmm, we can deal with this separately.

# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
#
# Modifications Copyright OpenSearch Contributors. See
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 a new file, so I believe everything including and down from Modifications ... should be removed. Just leave the SPDX header and the paragraph that says "The OpenSearch ... open source license.".

@dblock dblock merged commit 5866880 into opensearch-project:main Jul 24, 2023
47 checks passed
@florianvazelle florianvazelle deleted the add-async-tests branch July 24, 2023 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Skips changelog verifier
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants