-
Notifications
You must be signed in to change notification settings - Fork 0
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
add universal events archiver function #226
Conversation
lib/workload/stateless/universal-event-archiver/function/achiver.py
Outdated
Show resolved
Hide resolved
lib/workload/stateless/universal-event-archiver/function/achiver.py
Outdated
Show resolved
Hide resolved
Ah, very nice! |
lib/workload/stateless/universal-event-archiver/function/achiver.py
Outdated
Show resolved
Hide resolved
OK, looks great! Final suggestion / discusstion:
@victorskl your thoughts? |
lib/workload/stateless/universal-event-archiver/deploy/component.ts
Outdated
Show resolved
Hide resolved
lib/workload/stateless/universal-event-archiver/function/achiver.py
Outdated
Show resolved
Hide resolved
lib/workload/stateless/universal-event-archiver/deploy/component.ts
Outdated
Show resolved
Hide resolved
if we need add custom archiver, we can turn on Optional flag
|
lib/workload/stateful/stacks/shared/constructs/event-bus/custom-event-archiver/README.md
Outdated
Show resolved
Hide resolved
@raylrui Is this PR ready for review? Or, would you intend to complete remainder TODO items? Could you also pls help me do favour; after you finalised, can you pls tick/press the "Re-request review" circle button, next to the reviewer name, pls. That way, I will get notification and, I will attend to it, asap. Thank you. |
yes, @victorskl apology or that. So far this PR is ready for review, I will click the button, but nothing will happen when merged, as we don't open that flag and no bucket params defined. |
Thanks Ray, no apology need. I'll review in a tick, next & feedback. |
@victorskl FYI: just had a quick catch-up with Ray. He will add the archive bucket to the construct and create his own SG. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment to attend. And, could you do:
- rebase or merge on top of current
main
- turn
addCustomEventArchiver
flag on - follow up archival bucket and, tests
Then, pls re-request review for me. Tq
...hared/constructs/event-bus/custom-event-archiver/archiver-service/universal_event_achiver.py
Outdated
Show resolved
Hide resolved
securityGroups: [lambdaSG], | ||
architecture: Architecture.ARM_64, | ||
timeout: Duration.seconds(28), | ||
index: 'universal_event_achiver.py', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto fix filename:
index: 'universal_event_archiver.py',
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it should be a noun, like "archiver" sth, but happy to have any suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current filename is fine. It is just the typo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need fix filename typo:
universal_event_archiver.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also. Would be good, if you could unit test this handler. See token service cognitor as an example, if any. You can leverage botocore stubber.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And sanitize_string. Generally, all public functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, I will look it through first and make update in unit test for next commit
1dcd5f1
to
aba6f35
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
f89eab8
to
422f770
Compare
Hi team, recent updates on the archiver:
|
thkz for update, Ray. I will review in tick after lunch. ETA 3pm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done, Ray.! Go for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's roll!
I will try to test it after deployment finish... |
Feature/ universal-event-archiver
Features
Build a function to archive all events that go over the OrcaBus event bus, and write it as JSON to the dedicated S3 bucket Formatting the S3 key with year/month/day partitioning.
S3 object will be like: s3://{bucket_name}/events/{year}/{month}/{day}/{event_type}_{totalSeconds.microsecond}.json
To dos