DataDog / serverless-plugin-datadog

Serverless plugin to automagically instrument your Lambda functions with Datadog
Apache License 2.0
96 stars 49 forks source link

chore: Refactor sfn->sfn context injection code by merging two functions #533

Closed lym953 closed 1 month ago

lym953 commented 1 month ago

What does this PR do?

Right now updateDefinitionForStepFunctionInvocationStep() calls isSafeToModifyStepFunctionInvoctation(). This PR merges the latter into the former.

Motivation

Depending on the existing state, we will have slightly different instrumentation strategies. For example, if Input field doesn't exist, we will need to create this field then inject fields there. If Input already exists, then inject fields there directly.

Merging these two functions will make it more clear what we will do in each case.

Testing Guidelines

Passed the existing tests.

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 2m.

Use /merge -c to cancel this operation!

dd-devflow[bot] commented 1 month ago

:rotating_light: MergeQueue: This merge request is in error

mergequeue build completed successfully, but the github api returned an error while merging the pr. It's probably because:

Details Error: PUT https://api.github.com/repos/DataDog/serverless-plugin-datadog/pulls/533/merge: 405 4 of 4 required status checks are expected. [] FullStacktrace: activity error (type: github.GithubService_MergePullRequest, scheduledEventID: 41, startedEventID: 42, identity: 1@github-worker-75df5c885-scvs6@): PUT https://api.github.com/repos/DataDog/serverless-plugin-datadog/pulls/533/merge: 405 4 of 4 required status checks are expected. [] (type: ErrorResponse, retryable: true)

If you need support, contact us on Slack #devflow with those details!

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 2m.

Use /merge -c to cancel this operation!

dd-devflow[bot] commented 1 month ago

:rotating_light: MergeQueue: This merge request is in error

mergequeue build completed successfully, but the github api returned an error while merging the pr. It's probably because:

Details Error: PUT https://api.github.com/repos/DataDog/serverless-plugin-datadog/pulls/533/merge: 405 4 of 4 required status checks are expected. [] FullStacktrace: activity error (type: github.GithubService_MergePullRequest, scheduledEventID: 41, startedEventID: 42, identity: 1@github-worker-77594488c6-mgs62@): PUT https://api.github.com/repos/DataDog/serverless-plugin-datadog/pulls/533/merge: 405 4 of 4 required status checks are expected. [] (type: ErrorResponse, retryable: true)

If you need support, contact us on Slack #devflow with those details!

lym953 commented 1 month ago

/merge

lym953 commented 1 month ago

/merge

dd-devflow[bot] commented 1 month ago

:steam_locomotive: MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals. Note: if you pushed new commits since the last approval, you may need additional approval. You can remove it from the waiting list with /remove command.

Use /merge -c to cancel this operation!

dd-devflow[bot] commented 1 month ago

:steam_locomotive: MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals. Note: if you pushed new commits since the last approval, you may need additional approval. You can remove it from the waiting list with /remove command.

Use /merge -c to cancel this operation!

dd-devflow[bot] commented 1 month ago

:steam_locomotive: MergeQueue: pull request added to the queue

The median merge time in main is 2m.

Use /merge -c to cancel this operation!