DataDog / datadog-cdk-constructs

CDK construct library to automagically instrument your Lambda functions with Datadog
Apache License 2.0
65 stars 28 forks source link

chore: Refactor example Python stack by extracting a base class #301

Closed lym953 closed 1 month ago

lym953 commented 1 month ago

What does this PR do?

Right now we have

class CdkPythonStack(Stack):

This PR adds a class CdkPythonStackBase, and makes:

class CdkPythonStackBase(Stack):

and

class CdkPythonStack(CdkPythonStackBase):

CdkPythonStackBase contains the setup of AWS resources, not related to Datadog. CdkPythonStack contains Datadog instrumentation code.

Motivation

I'm going to rename the interfaces like I did in https://github.com/DataDog/datadog-cdk-constructs/pull/288. To make sure both the new API and old API work, I will need to to write two stacks for testing the two APIs. The two stacks will share the non-Datadog setup code, so I'm putting this part in the base class.

Testing Guidelines

cdk deploy successfully deploys the Python stack.

Additional Notes

Types of Changes

Check all that apply

lym953 commented 1 month ago

/merge

dd-devflow[bot] commented 1 month ago

:steam_locomotive: MergeQueue: pull request added to the queue

The median merge time in main is 4m.

Use /merge -c to cancel this operation!