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

Read-write deployment mode: add integration test for recording rule evaluation #3510

Merged
merged 4 commits into from
Nov 28, 2022

Conversation

charleskorn
Copy link
Contributor

What this PR does

This PR adds an integration test for recording rule evaluation in read-write deployment mode.

I'm not 100% convinced I've found a robust method to avoid race conditions between setting up the rule, pushing data and then checking the evaluation of the rule - very open to feedback and alternative suggestions.

I will add a separate test for alertmanager in a subsequent PR.

Which issue(s) this PR fixes or relates to

#3363

Checklist

  • [n/a] Tests updated
  • [n/a] Documentation added
  • [n/a] CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@charleskorn charleskorn requested a review from a team as a code owner November 24, 2022 06:22
@charleskorn charleskorn changed the title Read-write deployment mode: add integration test for recording rule Read-write deployment mode: add integration test for recording rule evaluation Nov 24, 2022
Copy link
Collaborator

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

The test LGTM, thanks! I left a comment about making the test more robust (hopefully...).

integration/read_write_mode_test.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@pracucci pracucci merged commit 63b656a into main Nov 28, 2022
@pracucci pracucci deleted the read-write-mode-ruler-integration-test branch November 28, 2022 08:53
masonmei pushed a commit to udmire/mimir that referenced this pull request Dec 16, 2022
…valuation (grafana#3510)

* Rename read-write mode integration test to better convey its purpose.

* Extract read-write mode cluster setup to its own function.

* Add a test for a recording rule in read-write deployment mode.

* Incorporate PR feedback - push data before creating recording rule to remove possible race condition.
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