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: bring eventbridge #42

Merged
merged 29 commits into from
Mar 13, 2024
Merged

feat: bring eventbridge #42

merged 29 commits into from
Mar 13, 2024

Conversation

skorfmann
Copy link
Contributor

@skorfmann skorfmann commented Dec 22, 2023

This adds an EventBridge library.

This implements the simulator version on top of the cloud.Topic and adds a subset of the available filters, namely:

  • Wildcard Matching: For simplicity, a basic wildcard match where * can represent any sequence of characters.
  • Comparison Operations: string operations "begins with", "ends with", and "equals-ignore-case".

progress

  • simulator
  • tf-aws

sim view

Screenshot 2023-12-22 at 21 51 28

Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

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

very elegant!

eventbridge/README.md Show resolved Hide resolved
eventbridge/lib.test.w Outdated Show resolved Hide resolved
eventbridge/lib.w Outdated Show resolved Hide resolved
eladb and others added 15 commits December 30, 2023 18:39
BREAKING CHANGE: the `url()` and `inflightUrl()` methods have been removed in favor of a `url` property.
* chore(bedrock): replacing BEDROCK_DEV with isTestEnvironment

* chore(bedrock): replacing BEDROCK_DEV with isTestEnvironment

* Update bedrock/README.md

* Update bedrock/bedrock.w

* Update bedrock/joke.test.w
* wip

* Update github/lib.test.w

* Update github/lib.test.w

* updates

* updates

* updated README

* ignore test due to winglang/wing#5408

* adding description to github/package.json

* adding author to github/package.json

---------

Co-authored-by: Eyal Keren <[email protected]>
* fix(github): mts to js files

* fix(github): mts to js files

* fix(github): mts to js files
* fix(github): using interface for credentials instead of cloud.secret

* fix(github): can't compile to tf-aws, missing cloud.service

* fix(github): can't compile to tf-aws, missing cloud.service
Set up GitHub releases. This will be used to set up a webhook that detects newly released packages from GitHub release events.

Version bumped `postgres` for testing purposes
Copy link

github-actions bot commented Feb 6, 2024

Hi,

This PR has not seen activity in 20 days. Therefore, we are marking the PR as stale for now. It will be closed after 7 days.
If you need help with the PR, do not hesitate to reach out in the winglang community slack at winglang.slack.com.
Feel free to re-open this PR when it is still relevant and ready to be worked on again.
Thanks!

@github-actions github-actions bot added the Stale label Feb 6, 2024
@github-actions github-actions bot closed this Feb 13, 2024
@skorfmann skorfmann reopened this Feb 29, 2024
@skorfmann
Copy link
Contributor Author

Pretty much finished - it deploys to AWS as well. However, the test is not properly working for some reason I couldn't figure out.

The node hiding doesn't work anymore, due to some changes in the way the map is rendered. But I think it's still pretty good anyway.

To find all the quirks and implementation mismatches between sim / tf-aws some real-world dog-fooding would be great!

@skorfmann skorfmann marked this pull request as ready for review February 29, 2024 23:01
@skorfmann skorfmann removed the Stale label Feb 29, 2024
eventbridge/platform/sim/bus.w Outdated Show resolved Hide resolved
eventbridge/platform/sim/bus.w Outdated Show resolved Hide resolved
eventbridge/platform/tf-aws/eventbridge.w Outdated Show resolved Hide resolved
eventbridge/lib.w Outdated Show resolved Hide resolved
eventbridge/package.json Outdated Show resolved Hide resolved
eventbridge/platform/aws/publish.js Outdated Show resolved Hide resolved
eventbridge/platform/aws/publish.js Outdated Show resolved Hide resolved
eventbridge/platform/aws/publish.js Outdated Show resolved Hide resolved
eventbridge/platform/awscdk/eventbridge.w Outdated Show resolved Hide resolved
eventbridge/platform/awscdk/eventbridge.w Show resolved Hide resolved
eventbridge/platform/awscdk/eventbridge.w Show resolved Hide resolved
eventbridge/platform/awscdk/eventbridge.w Outdated Show resolved Hide resolved
eventbridge/platform/awscdk/helper.js Show resolved Hide resolved
Copy link

mergify bot commented Mar 13, 2024

Thanks for contributing, @skorfmann! This PR will now be added to the merge queue, or immediately merged if eventbridge is up-to-date with main and the queue is empty.

@mergify mergify bot merged commit 794ecb9 into main Mar 13, 2024
5 checks passed
@mergify mergify bot deleted the eventbridge branch March 13, 2024 10:56
Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

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

cool stuff!

A few additional thoughts about api

});

new cloud.Function(inflight () => {
bus.putEvents([{
Copy link
Contributor

Choose a reason for hiding this comment

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

Would have made sense to be variadic (...) so the array is not needed:

Suggested change
bus.putEvents([{
bus.putEvents({


let bus = new eventbridge.Bus();

bus.subscribeFunction("github.pull-request.created", inflight (event) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Kind of feels like subscribeFunction should take a cloud.Function and this should be called onEvent

Copy link
Contributor

Choose a reason for hiding this comment

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

makes sense. do we need subscribeFunction ? seems redundant

Copy link
Contributor

Choose a reason for hiding this comment

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

Not required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants