-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Fix TestSilenceLimits tests #3866
Merged
gotjosh
merged 1 commit into
prometheus:main
from
grobinson-grafana:grobinson/fix-silence-tests
Jun 5, 2024
Merged
Fix TestSilenceLimits tests #3866
gotjosh
merged 1 commit into
prometheus:main
from
grobinson-grafana:grobinson/fix-silence-tests
Jun 5, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -465,12 +465,7 @@ func TestSilenceLimits(t *testing.T) { | |||
MaxSilences: 1, | |||
MaxPerSilenceBytes: 2 << 11, // 4KB | |||
}, | |||
Retention: 100 * time.Millisecond, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disabled the retention period so I don't need time.Sleep
in the tests.
grobinson-grafana
force-pushed
the
grobinson/fix-silence-tests
branch
2 times, most recently
from
June 5, 2024 13:43
ee5e754
to
afd2a30
Compare
This commit fixes silence tests that relied on the maintenance function running at a fixed 100ms interval. If the go runtime that runs the maintenance is not scheduled with 150ms then the test will fail. Signed-off-by: George Robinson <[email protected]>
grobinson-grafana
force-pushed
the
grobinson/fix-silence-tests
branch
from
June 5, 2024 13:57
afd2a30
to
47fcd3f
Compare
grobinson-grafana
added a commit
to grafana/prometheus-alertmanager
that referenced
this pull request
Jun 5, 2024
This commit fixes silence tests that relied on the maintenance function running at a fixed 100ms interval. If the go runtime that runs the maintenance is not scheduled with 150ms then the test will fail. Signed-off-by: George Robinson <[email protected]>
santihernandezc
pushed a commit
to grafana/prometheus-alertmanager
that referenced
this pull request
Jun 5, 2024
This commit fixes silence tests that relied on the maintenance function running at a fixed 100ms interval. If the go runtime that runs the maintenance is not scheduled with 150ms then the test will fail. Signed-off-by: George Robinson <[email protected]>
santihernandezc
added a commit
to grafana/prometheus-alertmanager
that referenced
this pull request
Jun 5, 2024
Fix TestSilenceLimits tests (prometheus#3866)
grobinson-grafana
added a commit
to grafana/mimir
that referenced
this pull request
Jun 5, 2024
This commit fixes the silence tests, using the exact same tests in prometheus/alertmanager to avoid regressions due to modules. It bumps go.mod to commit 2410524 which is a no-op as Mimir does not vendor tests, but its meant to indicate we are using the fix from prometheus/alertmanager#3866.
4 tasks
grobinson-grafana
added a commit
to grafana/mimir
that referenced
this pull request
Jun 5, 2024
This commit fixes the silence tests, using the exact same tests in prometheus/alertmanager to avoid regressions due to modules, but using the New function in pkg/alertmanager/alertmanager.go to ensure the correct limits are set. It bumps go.mod to commit 2410524 which is a no-op as Mimir does not vendor tests, but its meant to indicate we are using the fix from prometheus/alertmanager#3866.
grobinson-grafana
added a commit
to grafana/mimir
that referenced
this pull request
Jun 5, 2024
This commit fixes the silence tests, using the exact same tests in prometheus/alertmanager to avoid regressions due to modules, but using the New function in pkg/alertmanager/alertmanager.go to ensure the correct limits are set. It bumps go.mod to commit 2410524 which is a no-op as Mimir does not vendor tests, but its meant to indicate we are using the fix from prometheus/alertmanager#3866.
grobinson-grafana
added a commit
to grafana/mimir
that referenced
this pull request
Jun 5, 2024
This commit fixes the silence tests, using the exact same tests in prometheus/alertmanager to avoid regressions due to modules, but using the New function in pkg/alertmanager/alertmanager.go to ensure the correct limits are set. It bumps go.mod to commit 2410524 which is a no-op as Mimir does not vendor tests, but its meant to indicate we are using the fix from prometheus/alertmanager#3866.
grobinson-grafana
added a commit
to grafana/mimir
that referenced
this pull request
Jun 5, 2024
This commit fixes the silence tests, using the exact same tests in prometheus/alertmanager to avoid regressions due to modules, but using the New function in pkg/alertmanager/alertmanager.go to ensure the correct limits are set. It bumps go.mod to commit 2410524 which is a no-op as Mimir does not vendor tests, but its meant to indicate we are using the fix from prometheus/alertmanager#3866.
grobinson-grafana
added a commit
to grafana/prometheus-alertmanager
that referenced
this pull request
Jun 5, 2024
This commit fixes silence tests that relied on the maintenance function running at a fixed 100ms interval. If the go runtime that runs the maintenance is not scheduled with 150ms then the test will fail. Signed-off-by: George Robinson <[email protected]>
grobinson-grafana
added a commit
to grafana/prometheus-alertmanager
that referenced
this pull request
Jun 5, 2024
This commit fixes silence tests that relied on the maintenance function running at a fixed 100ms interval. If the go runtime that runs the maintenance is not scheduled with 150ms then the test will fail. Signed-off-by: George Robinson <[email protected]>
grobinson-grafana
added a commit
to grafana/prometheus-alertmanager
that referenced
this pull request
Jun 5, 2024
This commit fixes silence tests that relied on the maintenance function running at a fixed 100ms interval. If the go runtime that runs the maintenance is not scheduled with 150ms then the test will fail. Signed-off-by: George Robinson <[email protected]>
grobinson-grafana
added a commit
to grafana/prometheus-alertmanager
that referenced
this pull request
Jun 5, 2024
This commit fixes silence tests that relied on the maintenance function running at a fixed 100ms interval. If the go runtime that runs the maintenance is not scheduled with 150ms then the test will fail. Signed-off-by: George Robinson <[email protected]>
grobinson-grafana
added a commit
to grafana/prometheus-alertmanager
that referenced
this pull request
Jun 5, 2024
This commit fixes silence tests that relied on the maintenance function running at a fixed 100ms interval. If the go runtime that runs the maintenance is not scheduled with 150ms then the test will fail. Signed-off-by: George Robinson <[email protected]>
grobinson-grafana
added a commit
to grafana/prometheus-alertmanager
that referenced
this pull request
Jun 5, 2024
This commit fixes silence tests that relied on the maintenance function running at a fixed 100ms interval. If the go runtime that runs the maintenance is not scheduled with 150ms then the test will fail. Signed-off-by: George Robinson <[email protected]>
grobinson-grafana
added a commit
to grafana/prometheus-alertmanager
that referenced
this pull request
Jun 5, 2024
This commit fixes silence tests that relied on the maintenance function running at a fixed 100ms interval. If the go runtime that runs the maintenance is not scheduled with 150ms then the test will fail. Signed-off-by: George Robinson <[email protected]>
grobinson-grafana
added a commit
to grafana/prometheus-alertmanager
that referenced
this pull request
Jun 5, 2024
This commit fixes silence tests that relied on the maintenance function running at a fixed 100ms interval. If the go runtime that runs the maintenance is not scheduled with 150ms then the test will fail. Signed-off-by: George Robinson <[email protected]>
grobinson-grafana
added a commit
to grafana/mimir
that referenced
this pull request
Jun 5, 2024
This commit fixes the silence tests, using the exact same tests in prometheus/alertmanager to avoid regressions due to modules, but using the New function in pkg/alertmanager/alertmanager.go to ensure the correct limits are set. It bumps go.mod to commit db27a98 which is a no-op as Mimir does not vendor tests, but its meant to indicate we are using the fix from prometheus/alertmanager#3866.
grobinson-grafana
added a commit
to grobinson-grafana/alertmanager
that referenced
this pull request
Jun 6, 2024
This commit fixes inconsistent behavior of silences.Set where if a silence was invalid or exceeds limits, sil.Id would contain the silence UUID but the Id returned would be the empty string. This bug was introduced in prometheus#3866. Signed-off-by: George Robinson <[email protected]>
grobinson-grafana
added a commit
to grobinson-grafana/alertmanager
that referenced
this pull request
Jun 6, 2024
This commit fixes inconsistent behavior of silences.Set where if a silence was invalid or exceeds limits, sil.Id would contain the silence UUID but the Id returned would be the empty string. This bug was introduced in prometheus#3866. Signed-off-by: George Robinson <[email protected]>
TheMeier
pushed a commit
to TheMeier/alertmanager
that referenced
this pull request
Sep 29, 2024
This commit fixes silence tests that relied on the maintenance function running at a fixed 100ms interval. If the go runtime that runs the maintenance is not scheduled with 150ms then the test will fail. Signed-off-by: George Robinson <[email protected]>
gotjosh
added a commit
that referenced
this pull request
Oct 24, 2024
* Release v0.28.0-rc.0 * [CHANGE] Templating errors in the SNS integration now return an error. #3531 #3879 * [FEATURE] Add a new Microsoft Teams integration based on Flows #4024 * [FEATURE] Add a new Rocket.Chat integration #3600 * [FEATURE] Add a new Jira integration #3590 #3931 * [FEATURE] Add support for `GOMEMLIMIT`, enable it via the feature flag `--enable-feature=auto-gomemlimit`. #3895 * [FEATURE] Add support for `GOMAXPROCS`, enable it via the feature flag `--enable-feature=auto-gomaxprocs`. #3837 * [FEATURE] Add support for limits of silences including the maximum number of active and pending silences, and the maximum size per silence (in bytes). You can use the flags `--silences.max-silences` and `--silences.max-silence-size-bytes` to set them accordingly #3852 #3862 #3866 #3885 #3886 #3877 * [FEATURE] Muted alerts now show whether they are suppressed or not in both the `/api/v2/alerts` endpoint and the Alertmanager UI. #3793 #3797 #3792 * [ENHANCEMENT] Add support for `content`, `username` and `avatar_url` in the Discord integration. `content` and `username` also support templating. #4007 * [ENHANCEMENT] Only invalidate the silences cache if a new silence is created or an existing silence replaced - should improve latency on both `GET api/v2/alerts` and `POST api/v2/alerts` API endpoint. #3961 * [ENHANCEMENT] Add image source label to Dockerfile. To get changelogs shown when using Renovate #4062 * [ENHANCEMENT] Build using go 1.23 #4071 * [ENHANCEMENT] Support setting a global SMTP TLS configuration. #3732 * [ENHANCEMENT] The setting `room_id` in the WebEx integration can now be templated to allow for dynamic room IDs. #3801 * [ENHANCEMENT] Enable setting `message_thread_id` for the Telegram integration. #3638 * [ENHANCEMENT] Support the `since` and `humanizeDuration` functions to templates. This means users can now format time to more human-readable text. #3863 * [ENHANCEMENT] Support the `date` and `tz` functions to templates. This means users can now format time in a specified format and also change the timezone to their specific locale. #3812 * [ENHANCEMENT] Latency metrics now support native histograms. #3737 * [BUGFIX] Fix the SMTP integration not correctly closing an SMTP submission, which may lead to unsuccessful dispatches being marked as successful. #4006 * [BUGFIX] The `ParseMode` option is now set explicitly in the Telegram integration. If we don't HTML tags had not been parsed by default. #4027 * [BUGFIX] Fix a memory leak that was caused by updates silences continuously. #3930 * [BUGFIX] Fix hiding secret URLs when the URL is incorrect. #3887 * [BUGFIX] Fix a race condition in the alerts - it was more of a hypothetical race condition that could have occurred in the alert reception pipeline. #3648 * [BUGFIX] Fix a race condition in the alert delivery pipeline that would cause a firing alert that was delivered earlier to be deleted from the aggregation group when instead it should have been delivered again. #3826 * [BUGFIX] Fix version in APIv1 deprecation notice. #3815 * [BUGFIX] Fix crash errors when using `url_file` in the Webhook integration. #3800 * [BUGFIX] fix `Route.ID()` returns conflicting IDs. #3803 * [BUGFIX] Fix deadlock on the alerts memory store. #3715 * [BUGFIX] Fix `amtool template render` when using the default values. #3725 * [BUGFIX] Fix `webhook_url_file` for both the Discord and Microsoft Teams integrations. #3728 #3745 --------- Signed-off-by: SuperQ <[email protected]> Signed-off-by: gotjosh <[email protected]> Co-authored-by: gotjosh <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit fixes silence tests that relied on the maintenance function running at a fixed 100ms interval. If the go runtime that runs the maintenance is not scheduled with 150ms then the test will fail.