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

Alerting Plugins #93

Merged
merged 28 commits into from
Oct 3, 2022
Merged

Alerting Plugins #93

merged 28 commits into from
Oct 3, 2022

Conversation

arnavdas88
Copy link
Contributor

@arnavdas88 arnavdas88 commented Nov 20, 2021

Signed-off-by: arnavdas88 [email protected]

Description

These commits are regarding the issue #90 . This is just the initial commit with OpenSearch.plugins.alerting.*.

Issues Resolved

The issue of creating alerts from the python client.

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@stockholmux stockholmux requested a review from rushiagr December 3, 2021 16:14
@stockholmux
Copy link
Member

Looks like lint is failing, can you take a look @arnavdas88?

@arnavdas88
Copy link
Contributor Author

@stockholmux Yup... Checking the code....

@elfisher elfisher requested a review from VijayanB December 3, 2021 16:35
@stockholmux
Copy link
Member

@arnavdas88 Can't tell you what's going on with some of these failures, but the DCO check failing is straight forward - I like this guide for fixing DCO issues.

@arnavdas88
Copy link
Contributor Author

Actually, 2 of the commits in between didn't take the '--signoff' switch for some reason... I am doing some rebase to fix the issue!! Sorry for the inconviniance

Actually, 2 of the commits in between didn't take the '--signoff' switch for some reason... I am doing some rebase to fix the issue!! Sorry for the inconviniance

@arnavdas88
Copy link
Contributor Author

Now the previously unsigned commits are gone... so hopefully, it should work now!!!

@stockholmux
Copy link
Member

@VijayanB is #97 related to the failures on this PR?

Copy link
Collaborator

@axeoman axeoman left a comment

Choose a reason for hiding this comment

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

Thanks a lot for your contribution. 👍
Overall looks good, there are, however, two issues that I would like to ask to change:

  1. CI lint currently is failing because stubs are located in the incorrect path, e.g. out/opensearchpy/plugins/alerting.pyi instead of opensearchpy/plugins/alerting.pyi
  2. It would be cool if you squash commits into one or prepare a meaningful list of commits in the PR. Of course, squash could be done by the person who will merge this, but it is always better to be done by the author.

P.S. Integration tests are failing because of #97 for sure.
edit: we probably will benefit from some regression tests checking that alerting plugin is called correctly, but this could be done separately.

@@ -0,0 +1,7 @@
from ..plugins.alerting import AlertingClient as AlertingClient
Copy link
Member

Choose a reason for hiding this comment

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

please add license header

Copy link
Collaborator

Choose a reason for hiding this comment

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

Need license headers here.

@arnavdas88
Copy link
Contributor Author

@VijayanB Give me a few minutes... i will apply the changes...

@arnavdas88
Copy link
Contributor Author

@VijayanB , I have squashed and pushed new commits with "license headers" and "removed warnings". Could you please check if the issues you pointed are solved or not.

@axeoman
Copy link
Collaborator

axeoman commented Dec 15, 2021

@arnavdas88 There are now 18 commits that are not good to push into main. Do you mind squashing everything (or splitting into a couple) and force pushing to a branch? If you want to fetch changes from main into your branch - better rebase on top of the master to avoid these "merge" commits.
Does it make sense to you? If not, we can just squash everything to one commit while merging anyway :)

@arnavdas88
Copy link
Contributor Author

@arnavdas88 There are now 18 commits that are not good to push into main. Do you mind squashing everything (or splitting into a couple) and force pushing to a branch? If you want to fetch changes from main into your branch - better rebase on top of the master to avoid these "merge" commits. Does it make sense to you? If not, we can just squash everything to one commit while merging anyway :)

Squashed into 1 single commit... Finally... 😆

Signed-off-by: Arnav Das <[email protected]>
axeoman
axeoman previously approved these changes Dec 29, 2021
@axeoman
Copy link
Collaborator

axeoman commented Dec 29, 2021

@dez @VijayanB do you have any complaints? Otherwise, I would merge it.

@VijayanB
Copy link
Member

@dez @VijayanB do you have any complaints? Otherwise, I would merge it.

Thanks for checking. Let me take one more pass at review.

@VijayanB
Copy link
Member

@arnavdas88 shall we add alerting to async as well?

@VijayanB VijayanB requested a review from Shivamdhar December 29, 2021 21:43
@harshavamsi
Copy link
Collaborator

@arnavdas88 @VachaShah @dblock the only check failing is whitesource which is addressed here. The issue is not relevant here as we're building the right versions of the library where appropriate and is harmless against older versions that still use it.

Also, @arnavdas88 we should be incrementing the version to 2.1.0.

dblock
dblock previously approved these changes Sep 27, 2022
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.

I am good with this! Any objections anyone else? Will wait a few days to hear back and/or merge.

@harshavamsi
Copy link
Collaborator

Opened #207 for docs and #206 to increment version.

VachaShah
VachaShah previously approved these changes Sep 28, 2022
Copy link
Collaborator

@VachaShah VachaShah left a comment

Choose a reason for hiding this comment

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

Thank you @arnavdas88 for this feature!

@dblock dblock requested a review from VijayanB September 28, 2022 22:04
Comment on lines 9 to 25
#
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
Copy link
Member

Choose a reason for hiding this comment

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

Can you remove this and other places where is this introduced?

Copy link
Member

Choose a reason for hiding this comment

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

Right. If it's new code added after the fork we don't carry the ES license anymore.

@harshavamsi
Copy link
Collaborator

Hi @arnavdas88 I forgot to remove some elastic licenses on files that have been added since the fork. Can you merge arnavdas88#2. Thanks.

harshavamsi and others added 2 commits September 29, 2022 17:40
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
Remove elastic search licenses on new files
@arnavdas88 arnavdas88 dismissed stale reviews from VachaShah and dblock via 9c14dae September 30, 2022 08:33
@arnavdas88
Copy link
Contributor Author

Hi @arnavdas88 I forgot to remove some elastic licenses on files that have been added since the fork. Can you merge arnavdas88#2. Thanks.

Thankyou @harshavamsi for fixing these issues in the code!!! I have merged the PR so you can run the workflow again...

@@ -97,7 +98,7 @@ def __init__(
http_compress=None,
opaque_id=None,
loop=None,
**kwargs,
**kwargs
Copy link
Member

Choose a reason for hiding this comment

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

nit: Was this change introduced by styling tool? If not, can you revert here and other places? Thanks

"""
Acknowledges an alert.

:arg monitor_id: The id of the monitor, the alert belongs to
Copy link
Member

Choose a reason for hiding this comment

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

nit: Doc doesn't reflect all parameters

@@ -24,6 +24,7 @@
# specific language governing permissions and limitations
# under the License.


Copy link
Member

Choose a reason for hiding this comment

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

nit: if this is not introduced by styling tool, please revert this change.

@dblock
Copy link
Member

dblock commented Sep 30, 2022

@VijayanB Since the remaining items are nits, want to approve/merge? otherwise which ones are must haves?

@VachaShah VachaShah requested a review from dblock September 30, 2022 21:39
@dblock dblock merged commit 2d03dc7 into opensearch-project:main Oct 3, 2022
@dblock
Copy link
Member

dblock commented Oct 3, 2022

Merged 🎆

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.

8 participants