Skip to content

Check DDR status in order to run#289

Merged
michael-richey merged 17 commits intomainfrom
michael.richey/check-ddr-status
Oct 4, 2024
Merged

Check DDR status in order to run#289
michael-richey merged 17 commits intomainfrom
michael.richey/check-ddr-status

Conversation

@michael-richey
Copy link
Copy Markdown
Collaborator

@michael-richey michael-richey commented Oct 1, 2024

What does this PR do?

Check the DDR status at both the source and the destination and don't run if we cannot confirm that it is safe to do so.

Description of the Change

Calls the endpoint to get the DDR status for both source and destination.
If we cannot get the DDR status exit.
If the status in not ONBOARDING, PASSIVE, or RECOVERY then exit.
The user can override this behavior with --verify-ddr-status=False

Possible Drawbacks

Users that currently use the tool for migration but don't have DDR will need to pass the --verify-ddr-status=False flag

Comment thread datadog_sync/utils/configuration.py Outdated
Comment thread datadog_sync/utils/configuration.py Outdated
Comment thread datadog_sync/utils/configuration.py Outdated
Comment thread datadog_sync/utils/configuration.py Outdated
Comment thread .gitignore

# sync-cli resources
resources/
/resources/
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This rule was ignoring too much.

from __future__ import annotations
import logging
from sys import exit
import sys
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This change was due to a code quality violation from the static analysis bot.

@michael-richey michael-richey marked this pull request as ready for review October 3, 2024 17:06
@michael-richey michael-richey requested a review from a team as a code owner October 3, 2024 17:06
@michael-richey michael-richey requested a review from a team as a code owner October 3, 2024 17:18
jhgilbert
jhgilbert previously approved these changes Oct 3, 2024
Copy link
Copy Markdown
Contributor

@jhgilbert jhgilbert left a comment

Choose a reason for hiding this comment

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

Approved with suggestions for style and to fix a typo. Thanks!

Comment thread README.md Outdated
Co-authored-by: Jen Gilbert <j.h.gilbert@gmail.com>
Comment thread datadog_sync/utils/configuration.py Outdated
Comment thread datadog_sync/utils/configuration.py Outdated
@michael-richey michael-richey merged commit ae8a443 into main Oct 4, 2024
@michael-richey michael-richey deleted the michael.richey/check-ddr-status branch October 4, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants