Skip to content

Fix Sampling rules not being deleted - #244

Merged
willarmiros merged 3 commits into
aws:masterfrom
friscoMad:fix-sampling-rule-deletion
Dec 8, 2020
Merged

Fix Sampling rules not being deleted#244
willarmiros merged 3 commits into
aws:masterfrom
friscoMad:fix-sampling-rule-deletion

Conversation

@friscoMad

Copy link
Copy Markdown
Contributor

Issue #, if available:
#239

Description of changes:
Review if any of the rules present in the manifest is not present in the payload to rebuild the manifest (I am not sure if removing just that rule is enough or we need to rebuild so I opted for rebuilding).

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

}
}
// Check if any rule was removed
if (!invalidate) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What would happen if inputs has more than one items but the last item gets true?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't understand your question.
If we receive a set with a new rule invalidate will be true and the whole set will be rebuilt so we don't need to do anything, otherwise, we check if there is a rule that is no longer present and if that's the case these changes trigger a rebuild to remove it and reconstruct the rule priorities.

@willarmiros
willarmiros merged commit a0b3a89 into aws:master Dec 8, 2020
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.

3 participants