-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Updated AlertPolicy resource to include sql condition types. #12971
Conversation
Hello! I am a robot. Tests will require approval from a repository maintainer to run. @hao-nan-li, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_monitoring_alert_policy" "primary" {
conditions {
condition_sql {
boolean_test {
column = # value needed
}
daily {
execution_time {
hours = # value needed
minutes = # value needed
nanos = # value needed
seconds = # value needed
}
periodicity = # value needed
}
hourly {
minute_offset = # value needed
periodicity = # value needed
}
minutes {
periodicity = # value needed
}
query = # value needed
row_count_test {
comparison = # value needed
threshold = # value needed
}
}
}
}
|
1 similar comment
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_monitoring_alert_policy" "primary" {
conditions {
condition_sql {
boolean_test {
column = # value needed
}
daily {
execution_time {
hours = # value needed
minutes = # value needed
nanos = # value needed
seconds = # value needed
}
periodicity = # value needed
}
hourly {
minute_offset = # value needed
periodicity = # value needed
}
minutes {
periodicity = # value needed
}
query = # value needed
row_count_test {
comparison = # value needed
threshold = # value needed
}
}
}
}
|
Tests analyticsTotal tests: 56 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
Tests analyticsTotal tests: 56 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_monitoring_alert_policy" "primary" {
conditions {
condition_sql {
boolean_test {
column = # value needed
}
daily {
execution_time {
hours = # value needed
minutes = # value needed
nanos = # value needed
seconds = # value needed
}
periodicity = # value needed
}
hourly {
minute_offset = # value needed
periodicity = # value needed
}
}
}
}
|
Tests analyticsTotal tests: 56 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
|
||
condition_sql { | ||
query = "SELECT severity, resource FROM project.global._Default._AllLogs WHERE severity IS NOT NULL" | ||
duration = "60s" |
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.
Looks like this field is not expected here.
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.
Yeah - duration isn't valid with SQL. I've updated the tests.
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.
Could you also add the missing fields in the test?
done. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 56 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
…QL conditions require additional GCP resources to be created and billed.
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 56 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
…QL conditions require additional GCP resources to be created and billed.
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 56 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 56 Click here to see the affected service packages
🟢 All tests passed! View the build log |
Fixes hashicorp/terraform-provider-google#21259.
Adds support for SQL condition types when creating an Alert Policy. SQL conditions are currently configurable through the UI or API directly: https://cloud.google.com/logging/docs/analyze/sql-in-alerting
Release Note Template for Downstream PRs (will be copied)
See Write release notes for guidance.