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

[MA-669] Add support for /v1/downtime/cancel/by_scope. #488

Merged
merged 5 commits into from Dec 10, 2019

Conversation

armcburney
Copy link
Member

datadog/dogshell/downtime.py Outdated Show resolved Hide resolved
datadog/dogshell/downtime.py Outdated Show resolved Hide resolved
@armcburney
Copy link
Member Author

/azp run DataDog.datadogpy.integration

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@armcburney
Copy link
Member Author

/azp run DataDog.datadogpy.integration

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@nmuesch nmuesch left a 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

tests/integration/api/test_api.py Outdated Show resolved Hide resolved

# Create downtime with scope_one
end = start + 1000
downtime_one = dog.Downtime.create(scope=scope_one, start=start, end=end)
Copy link
Contributor

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?

Copy link
Member Author

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"].

Copy link
Member Author

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.

Copy link
Contributor

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.

@armcburney
Copy link
Member Author

/azp run DataDog.datadogpy.integration

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@nmuesch nmuesch 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!

@armcburney armcburney merged commit 9da1e45 into master Dec 10, 2019
@armcburney armcburney deleted the armcburney/downtime_cancel_by_scope_endpoint branch December 10, 2019 23:08
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.

None yet

5 participants