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

Clean last check on trigger update #596

Merged

Conversation

litleleprikon
Copy link
Contributor

PR Summary

In last check some targets have a records in MetricsToTargetRelation
dictionary. This records did not cleaned during trigger update that led
checker to use metric names from this dictionary to populate the set of
metrics to check.

Closes #593

@litleleprikon litleleprikon requested a review from a team as a code owner November 25, 2020 12:25
@coveralls
Copy link

coveralls commented Nov 25, 2020

Coverage Status

Coverage decreased (-0.02%) to 74.598% when pulling e80fb18 on feature/593-remove-last-check-on-trigger-change into ec3e4fb on master.

@@ -80,13 +84,13 @@ func TestSaveTrigger(t *testing.T) {
So(resp, ShouldResemble, &dto.SaveTriggerResponse{ID: triggerID, Message: "trigger updated"})
})
Convey("Has last check", func() {
actualLastCheck := lastCheck
actualLastCheck := emptyLastCheck
Copy link
Contributor

Choose a reason for hiding this comment

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

А разве тест не работал без этой правки? Кажется же и так всё норм, у тебя был lastCheck, ты его почистил, получился emptyLastCheck.
Так же не понял, зачем ты в saveTrigger добавил map[string]bool{"super.metric1": true, "super.metric2": true}.
Кароче, да, мой поинт такой - тест вроде и без правок в самом тесте должен был работать же.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Поправил тест

@litleleprikon litleleprikon force-pushed the feature/593-remove-last-check-on-trigger-change branch from f7a544c to 9ac4843 Compare February 10, 2021 12:18
borovskyav
borovskyav previously approved these changes Feb 10, 2021
In last check some targets have a records in MetricsToTargetRelation
dictionary. This records did not cleaned during trigger update that led
checker to use metric names from this dictionary to populate the set of
metrics to check.

Closes #593
@litleleprikon litleleprikon merged commit 0343c97 into master Feb 10, 2021
@litleleprikon litleleprikon deleted the feature/593-remove-last-check-on-trigger-change branch February 10, 2021 13:32
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.

Old metrics in last check do not remove on trigger change
3 participants