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

[VR-12269] Enable alerter to propagate store_aggregate for finding samples #2519

Merged
merged 5 commits into from Jul 30, 2021

Conversation

convoliution
Copy link
Contributor

Problem

If an alert is defined with summary_sample_base fields that aren't explicitly supported by the client, those fields end up getting dropped when alert.summary_sample_base is accessed because of SummarySampleQuery's implementation.

Solution

Rather than have a bunch of explicit conversion logic in SummarySampleQuery._from_proto_request() and SummarySampleQuery._to_proto_request(), I've changed SummarySampleQuery to transparently carry an protobuf message. I've listed some alternative solutions I considered in a Google Doc linked on the ticket.

Tests

$ pytest monitoring/
==================================================== test session starts ====================================================
platform darwin -- Python 3.7.10, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /Users/miliu/Documents/modeldb/client/verta/tests, configfile: pytest.ini
plugins: hypothesis-6.14.0
collected 70 items                                                                                                          

monitoring/test_aggregation.py ..                                                                                     [  2%]
monitoring/test_client.py ..                                                                                          [  5%]
monitoring/test_profilers.py ....s                                                                                    [ 12%]
monitoring/test_queries.py .                                                                                          [ 14%]
monitoring/test_summaries.py ...                                                                                      [ 18%]
monitoring/test_summary_samples.py ..                                                                                 [ 21%]
monitoring/alerts/test_alerter.py ........                                                                            [ 32%]
monitoring/alerts/test_entities.py .............                                                                      [ 51%]
monitoring/alerts/test_status.py .........                                                                            [ 64%]
monitoring/comparison/test_comparison.py ..................                                                           [ 90%]
monitoring/notification_channels/test_config_classes.py ..                                                            [ 92%]
monitoring/notification_channels/test_entities.py .....                                                               [100%]

================================== 69 passed, 1 skipped, 43 warnings in 166.94s (0:02:46) ===================================

@convoliution convoliution merged commit 3484396 into master Jul 30, 2021
@convoliution convoliution deleted the ml/query-objs branch July 30, 2021 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants