boyney123 / eventbridge-atlas Goto Github PK
View Code? Open in Web Editor NEWOpen-source tool to document, discover, and share your Amazon EventBridge schemas.
Home Page: https://eventbridge-atlas.netlify.app/
License: MIT License
Open-source tool to document, discover, and share your Amazon EventBridge schemas.
Home Page: https://eventbridge-atlas.netlify.app/
License: MIT License
This is what I saw when trying to start the server. Could it be there are no event rules on my bus?
2021/04/29 02:47:43 Docuowl v0.2
2021/04/29 02:47:43 Rendering contents...
2021/04/29 02:47:43 error scanning /usr/src/eventbridge-atlas/generated-docs: yaml: mapping values are not allowed in this context
> [email protected] add-event-atlas-ui-changes /Users/kencollins/Repositories/eventbridge-atlas
> babel-node src/add-event-atlas-ui-changes.js
(node:57047) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/Users/kencollins/Repositories/eventbridge-atlas/docs-html/index.html'
at Object.openSync (fs.js:458:3)
at Object.readFileSync (fs.js:360:35)
at _callee$ (/Users/kencollins/Repositories/eventbridge-atlas/src/add-event-atlas-ui-changes.js:7:19)
at tryCatch (/Users/kencollins/Repositories/eventbridge-atlas/node_modules/regenerator-runtime/runtime.js:63:40)
at Generator.invoke [as _invoke] (/Users/kencollins/Repositories/eventbridge-atlas/node_modules/regenerator-runtime/runtime.js:293:22)
at Generator.next (/Users/kencollins/Repositories/eventbridge-atlas/node_modules/regenerator-runtime/runtime.js:118:21)
at asyncGeneratorStep (/Users/kencollins/Repositories/eventbridge-atlas/src/add-event-atlas-ui-changes.js:13:103)
at _next (/Users/kencollins/Repositories/eventbridge-atlas/src/add-event-atlas-ui-changes.js:15:194)
at /Users/kencollins/Repositories/eventbridge-atlas/src/add-event-atlas-ui-changes.js:15:364
at new Promise (<anonymous>)
(node:57047) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
When I run npm run build:slate
the generated docs-html
directory and all the files in it are owned by root
. Following executions of npm run build:slate
fail, as the npm run clean
fails to remove the files due to not having permission to them (as I run npm on my own user account).
I'm using WSL2 with Ubuntu 20.04 and have docker running inside WSL2. The root cause for this error is that the started docker container runs under root
inside the container and all the files written from the container to the locally mounted volume is done with ID 0 (root).
I attempted to add to the docker run command the -u $(id -u):$(id -g)
parameters, but slate
container execution failed, as it did have permission to write to /
inside the container and attempted to use some temporary dir in /tmp
instead.
This looks like an issue in slate & its use of the bundler
, but I wanted to raise this issue for eventbridge-atlas, if another workaround could be discovered.
For now I use sudo rm -rf docs-html
to get rid of the docs-html
I wanted to try out the new flow parser, but executing the npm run build:flow
fails, running on tag 0.4
. All other parsers work fine with my .env
config.
npm run build:flow
> [email protected] build:flow
> npm run clean --silent && npm run generate --silent -- --format=flow
[1/3] ๐ Fetching data from AWS...
[2/3] ๐ง๐ปโ๐ป Generating format for desired tool: flow ...
e [Error: ENOENT: no such file or directory, open '/home/aki/src/github/eventbridge-atlas/src/parsers/flow/src/lib/data/registry.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/home/aki/src/github/eventbridge-atlas/src/parsers/flow/src/lib/data/registry.json'
}
We have a following type of event format in use that contains nested JSON objects with the detail
item in the EventBridge event:
"detail": {
"version": 1,
"principal": {
"type": "USER",
"id": "USERID",
"workspace_id": "WORKSPACEID"
},
"status": "SUCCEEDED",
"data": {
"workspace_id": "WORKSPACEID",
"activity_id": "ACTIVITYID",
"document_ids": [
"DOCID1",
"DOCID2"
]
}
I then try to describe this through the event_metadata.json
and add the principal
and data
objects with their sub-items:
"events": {
"ACTIVITY_DELETED": {
"description": "Event is raised when an Activity is deleted.",
"properties": {
"version": "Integer to define the event schema version",
"principal": {
"type": "USER or SYSTEM to identify the type for the principal",
"id": "ID of the principal (user ID or system identifier)",
"workspace_id": "Workspace ID for the principal"
},
"status": "One of the: SUCCESS, ERROR, IN_PROGRESS, CANCELLED",
"data": {
"workspace_id": "ID of the workspace for the Activity.",
"activity_id": "ID of the Activity.",
"document_ids": "List of Document IDs attached to the Activity."
}
},
When I run npm run build:slate
gives out the following error:
โฏ npm run build:slate
> [email protected] build:slate
> npm run clean --silent && npm run generate --silent -- --format=slate
[1/3] ๐ Fetching data from AWS...
[2/3] ๐ง๐ปโ๐ป Generating format for desired tool: slate ...
e Error: There is no such converter: type
at json2md (/home/aki/src/github/eventbridge-atlas/node_modules/json2md/lib/index.js:73:15)
at /home/aki/src/github/eventbridge-atlas/node_modules/json2md/lib/converters.js:178:20
at Array.map (<anonymous>)
at /home/aki/src/github/eventbridge-atlas/node_modules/json2md/lib/converters.js:177:13
at Array.map (<anonymous>)
at converters.table (/home/aki/src/github/eventbridge-atlas/node_modules/json2md/lib/converters.js:174:34)
at json2md (/home/aki/src/github/eventbridge-atlas/node_modules/json2md/lib/index.js:71:28)
at json2md (/home/aki/src/github/eventbridge-atlas/node_modules/json2md/lib/index.js:63:34)
at _callee$ (/home/aki/src/github/eventbridge-atlas/src/parsers/slate/src/init.js:79:3)
at tryCatch (/home/aki/src/github/eventbridge-atlas/node_modules/regenerator-runtime/runtime.js:63:40)
Removing or flattening the nested object for principal
or data
field removes the error and generates the docs, but I lose the nested structure and would need to use embedded HTML tags or similar for formatting it nicely.
Hi, this might be a silly question (apologies in advance ๐ )
When I look at the examples for AsyncAPI, I see commonly a servers:
section in the definition. However, when I look at the Bindings I do not see any (obvious) way to indicate that my API is using EventBridge.
Is this because using SNS/SQS is the better pattern?
I suppose I could deconstruct the PutEvents API call, and use the http:
binding... but that seems weird to me ๐
servers:
event-bridge:
url: events.amazonaws.com
protocol: http
Thanks in advance @boyney123 for what you do in the event-driven space ๐ โค๏ธ
Commit 71aa502 seems to remove event-metadata in favour of the newer metadata methods. Thereafter, there is no way to add descriptions for the eventsources themselves as far I can tell from my use of the tool so far. Keeping eventsource descriptions would be cool because it can add valuable context and insight to the meaning &/or purpose of a source's events.
Hello,
The tool looks promising and I would be interested to use it but could you specify which permissions are required for the tool to do its job ?
Thanks in advance
[1/3] ๐ Fetching data from AWS... (node:52080) UnhandledPromiseRejectionWarning: BadRequestException: Unsupported operation. at deserializeAws_restJson1ListSchemasCommandError (C:\git\eventbridge-atlas\node_modules\@aws-sdk\client-schemas\protocols\Aws_restJson1.ts:3048:39) at processTicksAndRejections (internal/process/task_queues.js:97:5) at C:\git\eventbridge-atlas\node_modules\@aws-sdk\middleware-serde\src\deserializerMiddleware.ts:18:20 at C:\git\eventbridge-atlas\node_modules\@aws-sdk\middleware-signing\src\middleware.ts:26:22 at StandardRetryStrategy.retry (C:\git\eventbridge-atlas\node_modules\@aws-sdk\middleware-retry\src\StandardRetryStrategy.ts:83:38) at C:\git\eventbridge-atlas\node_modules\@aws-sdk\middleware-logger\src\loggerMiddleware.ts:22:22 (node:52080) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag
--unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 17) (node:52080) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I am not exactly sure what this error is at this point but my HUNCH is that its probably puking at in internal Private CA.... and the chain possibly not matching....
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.