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: eventbridge api-d cloudevents #2063

Merged
merged 2 commits into from
Mar 4, 2024
Merged

Conversation

embano1
Copy link
Contributor

@embano1 embano1 commented Jan 23, 2024

Closes: #2057

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@bfreiberg
Copy link
Contributor

Hi @embano1 is this PR ready for review? It is marked as a draft and I just want to make sure.

@embano1
Copy link
Contributor Author

embano1 commented Jan 25, 2024

Thx @bfreiberg ! Will do tomorrow, this was mainly for @boyney123 to take a look since he has related work here.

@embano1 embano1 marked this pull request as ready for review January 26, 2024 15:51
@embano1
Copy link
Contributor Author

embano1 commented Jan 26, 2024

TODO:

  • code
  • pattern json
  • README

@bfreiberg
Copy link
Contributor

Hi @embano1 , did you have a chance to work on this?

@embano1
Copy link
Contributor Author

embano1 commented Feb 9, 2024

@bfreiberg sorry for delaying this one. I'd love to have @boyney123 confirm the content of the pattern since he's writing a blog post. If this code is good, I'll amend with the example JSON, so please hold for a bit more :)


// structured mode CloudEvent
const structuredCeTransformer = {
specversion: "1.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

@embano1 should we update this to 1.0.2 is that the latest one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, 1.0 is the right version to use (see comments)

@boyney123
Copy link
Contributor

nice pattern @embano1 thanks, will include link on my blog post, guess this can't go out without custom header support?

@embano1
Copy link
Contributor Author

embano1 commented Feb 16, 2024

Yes, this needs /hold for now.

specversion: 1.0 is fine because

specversion
Type: String

Description: The version of the CloudEvents specification which the event uses. This enables the interpretation of the context. Compliant event producers MUST use a value of 1.0 when referring to this version of the specification.

Currently, this attribute will only have the 'major' and 'minor' version numbers included in it. This allows for 'patch' changes to the specification to be made without changing this property's value in the serialization. Note: for 'release candidate' releases a suffix might be used for testing purposes.

@embano1 embano1 force-pushed the issue-2057 branch 2 times, most recently from e10802a to ce26c72 Compare February 28, 2024 14:29
@embano1
Copy link
Contributor Author

embano1 commented Feb 28, 2024

@boyney123 @bfreiberg finalized the code. Please kindly review.


// example test. To run these tests, uncomment this file along with the
// example resource in lib/eventbridge-api-destinations-cloudevents-cdk-typescript-stack.ts
test('SQS Queue Created', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this supposed to be uncommented?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

bootstrap files :) will remove

"repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/eventbridge-api-destinations-cloudevents-cdk-typescript",
"templateURL": "serverless-patterns/eventbridge-api-destinations-cloudevents-cdk-typescript",
"projectFolder": "eventbridge-api-destinations-cloudevents-cdk-typescript",
"templateFile": "lib/eventbridge-api-destinations-cloudevents-cdk-typescript-stack.ts"
Copy link
Contributor

Choose a reason for hiding this comment

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

There is an issue when the templateFile contains the projectFolder name. Could you please rename the stack file to something that doesn't contain the folder name.

@embano1
Copy link
Contributor Author

embano1 commented Mar 1, 2024

@bfreiberg done

@bfreiberg
Copy link
Contributor

bfreiberg commented Mar 1, 2024

Great, thank you for your contribution.

@embano1
Copy link
Contributor Author

embano1 commented Mar 1, 2024

@singledigit singledigit merged commit 0311ac9 into aws-samples:main Mar 4, 2024
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.

New pattern submission - EventBridge API Destination to CloudEvents receiver
5 participants