-
Notifications
You must be signed in to change notification settings - Fork 306
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
[MA-669] Add support for /v1/downtime/cancel/by_scope
.
#488
[MA-669] Add support for /v1/downtime/cancel/by_scope
.
#488
Conversation
/azp run DataDog.datadogpy.integration |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run DataDog.datadogpy.integration |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Thanks for this! Left two minor comments
|
||
# Create downtime with scope_one | ||
end = start + 1000 | ||
downtime_one = dog.Downtime.create(scope=scope_one, start=start, end=end) |
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.
Thinking about subsequent test runs here. Would creating
a downtime that already exists and is disabled just flip the disabled
flag back to False
?
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.
Ahh no, it will create a separate downtime with a different downtime["id"]
.
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.
Sorry, to clarify: it creates a new one because the start
and end
will be different depending on the test execution - so you schedule it for a different time period.
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.
Ahh ok that sounds good to me.
/azp run DataDog.datadogpy.integration |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
LGTM, thanks!
@DataDog/monitor-app
https://docs.datadoghq.com/api/?lang=python#cancel-monitor-downtimes-by-scope