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

feat(pipes-targets): add CloudWatch Logs #30665

Merged
merged 22 commits into from
Oct 16, 2024
Merged

Conversation

msambol
Copy link
Contributor

@msambol msambol commented Jun 25, 2024

Add CloudWatch Logs as a Pipe target.

@github-actions github-actions bot added the p2 label Jun 25, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team June 25, 2024 20:47
@github-actions github-actions bot added the distinguished-contributor [Pilot] contributed 50+ PRs to the CDK label Jun 25, 2024
@msambol msambol marked this pull request as ready for review June 26, 2024 00:27
@msambol msambol force-pushed the pipes-targets-cwl branch from a90f01f to a6f3013 Compare June 26, 2024 01:53
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jun 26, 2024
Copy link
Contributor

@nmussy nmussy left a comment

Choose a reason for hiding this comment

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

LGTM, just a couple of nitpicks

packages/@aws-cdk/aws-pipes-targets-alpha/README.md Outdated Show resolved Hide resolved
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargetcloudwatchlogsparameters.html#cfn-pipes-pipe-pipetargetcloudwatchlogsparameters-timestamp
* @default - none
*/
readonly timestamp?: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason not to have a number here? You can convert it back to a string in the constructor, and it reduces the chance that a user enters something like a ISO date

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 can't get this to work in the Console even:

[ECMA 262 regex "^\$(\.[\w/_-]+(\[(\d+|\*)\])*)*$" does not match input string "1719416220650"]

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'm no regex expert but I can't make sense of that 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@redwheeler3 is there a disconnect between the docs and the API? or am I missing something?

Copy link

@redwheeler3 redwheeler3 Jun 26, 2024

Choose a reason for hiding this comment

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

For this one, we expect a JSONPath expression that references the timestamp in your payload. If you try the string "$.data.timestamp" it will validate. Leaving it blank updates it to the current time. We didn't think there was a use case here for specifying an actual time value... you either are going to want the current time or a time extracted from the payload of the event.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@redwheeler3 I updated the above and added an example. I also confirmed $.data.timestamp worked in the Console. We should update the API docs.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jun 26, 2024
@msambol msambol force-pushed the pipes-targets-cwl branch from 05c4cfd to 8194e1f Compare June 26, 2024 21:44
This was referenced Jul 1, 2024
@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

1 similar comment
@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

@msambol msambol force-pushed the pipes-targets-cwl branch from 0aa06cb to b647ed3 Compare October 7, 2024 21:07
@msambol
Copy link
Contributor Author

msambol commented Oct 7, 2024

@Leo10Gama Could we keep rolling on these ? 😄

@msambol msambol force-pushed the pipes-targets-cwl branch from 005a566 to c879abd Compare October 8, 2024 19:48
@Leo10Gama Leo10Gama self-assigned this Oct 11, 2024
Copy link
Member

@Leo10Gama Leo10Gama left a comment

Choose a reason for hiding this comment

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

Thanks for another contribution to the pipes targets! Just a few minor requests from my end, but overall looks good

@mergify mergify bot dismissed Leo10Gama’s stale review October 15, 2024 17:20

Pull request has been modified.

@msambol
Copy link
Contributor Author

msambol commented Oct 15, 2024

@Leo10Gama Fixed! Thanks for the review.

Copy link
Member

@Leo10Gama Leo10Gama left a comment

Choose a reason for hiding this comment

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

Thanks for the changes! I'm still only in disagreement on the current phrasing of the timestamp parameter, since we don't want to give the impression that it supports a value that might be a number. My understanding of how it looks now, we should also aim to describe the value itself, as opposed to exclusively defining it as being referenced by another value, if that makes sense.

Copy link
Member

@Leo10Gama Leo10Gama left a comment

Choose a reason for hiding this comment

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

LGTM, thanks again for the contribution!

@Leo10Gama
Copy link
Member

@Mergifyio update

Copy link
Contributor

mergify bot commented Oct 16, 2024

update

✅ Branch has been successfully updated

Copy link
Contributor

mergify bot commented Oct 16, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: a54781a
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor

mergify bot commented Oct 16, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 893769e into aws:main Oct 16, 2024
9 checks passed
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 16, 2024
@msambol msambol deleted the pipes-targets-cwl branch October 16, 2024 19:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
distinguished-contributor [Pilot] contributed 50+ PRs to the CDK p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants