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

aws integration cf resource to use new v2 api #317

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

jvanbrie
Copy link
Contributor

@jvanbrie jvanbrie commented Jan 22, 2025

What does this PR do?

Our new v2 api has been released for managing the Datadog AWS Integration. We want to use it in place of our old v1 api everywhere the v1 is currently used. This pr replaces our v1 endpoint with the v2 for the aws-integration cloudformation resource.

Note for reviewers:
There are a lot of generated files. The main files changed are handlers.py, and datadog-integrations-aws.json. Mostly everything else is generated.
Since I made a new resource type for this change, the diff between the handlers isn't visible. If you view the commits up through 8c910faeada02660b8f1ff31914057c65f38ebcc, you can see the diff more clearly.

Verification Process

Uploaded and ran the new custom cloudformation resource. Confirmed Create, Update, and Delete work as expected.

Additional Notes

Release Notes

Review checklist (to be filled by reviewers)

  • Feature or bug fix MUST have appropriate tests (unit, integration, etc...)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have one changelog/ label attached. If applicable it should have the backward-incompatible label attached.
  • PR should not have do-not-merge/ label attached.
  • If Applicable, issue must have kind/ and severity/ labels attached at least.

@github-actions github-actions bot added resource/aws Impacts the datadog-aws-integration-handler package resource/common Impacts the datadog-cloudformation-common package labels Jan 22, 2025
@github-actions github-actions bot added the documentation Documentation related changes label Jan 31, 2025
Comment on lines 121 to 124
if desired_metrics_config.NamespaceFilters.IncludeOnly is not None:
new_namespace_filters = AWSNamespaceFiltersIncludeOnly(
include_only=desired_metrics_config.NamespaceFilters.IncludeOnly
)

Choose a reason for hiding this comment

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

🔴 Code Quality Violation

too many nesting levels (...read more)

Avoid to nest too many loops together. Having too many loops make your code harder to understand.
Prefer to organize your code in functions and unit of code you can clearly understand.

Learn More

View in Datadog  Leave us feedback  Documentation

Comment on lines 167 to 168
if xray_services_desired_config.IncludeOnly is not None:
new_xray_services = XRayServicesIncludeOnly(xray_services_desired_config.IncludeOnly)

Choose a reason for hiding this comment

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

🔴 Code Quality Violation

too many nesting levels (...read more)

Avoid to nest too many loops together. Having too many loops make your code harder to understand.
Prefer to organize your code in functions and unit of code you can clearly understand.

Learn More

View in Datadog  Leave us feedback  Documentation

Comment on lines 125 to 128
if desired_metrics_config.NamespaceFilters.ExcludeOnly is not None:
new_namespace_filters = AWSNamespaceFiltersExcludeOnly(
exclude_only=desired_metrics_config.NamespaceFilters.ExcludeOnly
)

Choose a reason for hiding this comment

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

🔴 Code Quality Violation

too many nesting levels (...read more)

Avoid to nest too many loops together. Having too many loops make your code harder to understand.
Prefer to organize your code in functions and unit of code you can clearly understand.

Learn More

View in Datadog  Leave us feedback  Documentation

@jvanbrie jvanbrie changed the title testing v2 api import aws integration cf resource to use new v2 api Jan 31, 2025
@jvanbrie jvanbrie marked this pull request as ready for review January 31, 2025 19:58
@jvanbrie jvanbrie requested a review from a team as a code owner January 31, 2025 19:58
@@ -1 +1 @@
git+https://github.com/datadog/datadog-cloudformation-resources.git@datadog-cloudformation-common-python-0.0.17#egg=datadog_cloudformation_common&subdirectory=datadog-cloudformation-common-python
git+https://github.com/datadog/datadog-cloudformation-resources.git@0b54e768b81bf33e75e774b14fb938698b7add27#egg=datadog_cloudformation_common&subdirectory=datadog-cloudformation-common-python
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is referencing a particular commit. This will be changed to reference a release before it goes out. I can't reference the release as it's not out yet.

Copy link
Contributor

Choose a reason for hiding this comment

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

updated after merging api version bump #316

Comment on lines 170 to 173
if xray_services_desired_config.IncludeOnly is not None:
new_xray_services = XRayServicesIncludeOnly(
xray_services_desired_config.IncludeOnly
)

Choose a reason for hiding this comment

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

🔴 Code Quality Violation

too many nesting levels (...read more)

Avoid to nest too many loops together. Having too many loops make your code harder to understand.
Prefer to organize your code in functions and unit of code you can clearly understand.

Learn More

View in Datadog  Leave us feedback  Documentation

Comment on lines +170 to +173
if xray_services_desired_config.IncludeOnly is not None:
new_xray_services = XRayServicesIncludeOnly(
xray_services_desired_config.IncludeOnly
)

Choose a reason for hiding this comment

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

🔴 Code Quality Violation

too many nesting levels (...read more)

Avoid to nest too many loops together. Having too many loops make your code harder to understand.
Prefer to organize your code in functions and unit of code you can clearly understand.

Learn More

View in Datadog  Leave us feedback  Documentation

Comment on lines +125 to +128
if desired_metrics_config.NamespaceFilters.IncludeOnly is not None:
new_namespace_filters = AWSNamespaceFiltersIncludeOnly(
include_only=desired_metrics_config.NamespaceFilters.IncludeOnly
)

Choose a reason for hiding this comment

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

🔴 Code Quality Violation

too many nesting levels (...read more)

Avoid to nest too many loops together. Having too many loops make your code harder to understand.
Prefer to organize your code in functions and unit of code you can clearly understand.

Learn More

View in Datadog  Leave us feedback  Documentation

Comment on lines +129 to +132
if desired_metrics_config.NamespaceFilters.ExcludeOnly is not None:
new_namespace_filters = AWSNamespaceFiltersExcludeOnly(
exclude_only=desired_metrics_config.NamespaceFilters.ExcludeOnly
)

Choose a reason for hiding this comment

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

🔴 Code Quality Violation

too many nesting levels (...read more)

Avoid to nest too many loops together. Having too many loops make your code harder to understand.
Prefer to organize your code in functions and unit of code you can clearly understand.

Learn More

View in Datadog  Leave us feedback  Documentation

@ktmq ktmq added the changelog/Added Added features results into a minor version bump label Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/Added Added features results into a minor version bump documentation Documentation related changes resource/aws Impacts the datadog-aws-integration-handler package resource/awsaccount resource/common Impacts the datadog-cloudformation-common package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants