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

chore: rename Lambda related interfaces #288

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

lym953
Copy link
Contributor

@lym953 lym953 commented Aug 29, 2024

What does this PR do?

  1. Rename: DatadogProps -> DatadogLambdaProps
  2. Rename: DefaultDatadogProps -> DatadogLambdaDefaultProps
  3. Rename: DatadogStrictProps -> DatadogLambdaStrictProps
  4. Add a type alias export type DatadogProps = DatadogLambdaProps; so the renaming won't affect users

Motivation

To make it cleaner to add DatadogStepFunction class later. Details in [RFC] Changing API for Datadog CDK Construct

Testing Guidelines

npm test

Additional Notes

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog

@lym953 lym953 requested a review from a team as a code owner August 29, 2024 20:14
@lym953 lym953 force-pushed the yiming.luo/step-function-refactor branch from 6bb35a2 to feb86a7 Compare August 29, 2024 21:42
src/constants.ts Outdated
@@ -27,7 +27,7 @@ export enum RuntimeType {
UNSUPPORTED,
}

export const DefaultDatadogProps = {
export const DefaultDatadogLambdaProps = {
Copy link
Contributor

Choose a reason for hiding this comment

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

I kinda prefer DatadogLambdaDefaultProps but only because it falls in line with the naming of the other props types

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't find another default prop type. Could you give an example?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I think I wasn't clear. My (nitpick) preference is that this prop be renamed DatadogLambdaDefaultProps rather than DefaultDatadogLambdaProps. The other prop types I was referring to were:

DatadogLambdaStrictProps
DatadogLambdaProps

Notice that these both start with Datadog, where as the default one doesn't.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make sense! Will rename it.

/**
* For backward compatibility. It's recommended to use DatadogLambda for
* users who want to add Datadog monitoring for Lambda functions.
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we include the word "Deprecated" in this statement somewhere? This will tell us and users what to expect when we do our next major version update.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, will add "To be deprecated.".

@lym953 lym953 force-pushed the yiming.luo/step-function-refactor branch from feb86a7 to feb6e4f Compare September 4, 2024 20:03
@lym953
Copy link
Contributor Author

lym953 commented Sep 9, 2024

/merge

@dd-devflow
Copy link

dd-devflow bot commented Sep 9, 2024

🚂 MergeQueue: pull request added to the queue

The median merge time in main is 4m.

Use /merge -c to cancel this operation!

@dd-mergequeue dd-mergequeue bot merged commit c4222a3 into main Sep 9, 2024
14 checks passed
@dd-mergequeue dd-mergequeue bot deleted the yiming.luo/step-function-refactor branch September 9, 2024 17:04
@automartin5000
Copy link

This is a breaking change
#294

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