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(event-source): ignore cache directories #621

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

mmalenic
Copy link
Member

Related to umccr/infrastructure#489

Changes

  • Ignore cache directories under byob-icav2 when processing incoming EventBridge events, and only forward Created and Deleted events to filemanager.

@mmalenic mmalenic self-assigned this Oct 29, 2024
@@ -94,9 +94,12 @@ const getEventSourceConstructProps = (stage: AppStage): EventSourceProps => {
rules: [
{
bucket: oncoanalyserBucket[stage],
eventTypes: ['Object Created', 'Object Deleted'],
Copy link
Member

Choose a reason for hiding this comment

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

Are those the only event types the FileManager is currently monitoring?
If yes, that's OK, just be aware that this is a while-listing and you'll miss any other events (which is OK for the portal use case, but you'll have to judge if it's also OK for the FileManager).

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, those are the only ones considered right now. It derives all the other information from HeadObject and GetObjectTagging. In the future, I can add support for "Object Storage Class Changed" and "Object Tags Added" to avoid using an API call.

Copy link
Member

Choose a reason for hiding this comment

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

Sound good. Go for it, Marko. Pls merge when you ready.

Copy link
Member Author

Choose a reason for hiding this comment

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

Adding to this issue: #322 (comment)

Copy link
Member

@victorskl victorskl left a comment

Choose a reason for hiding this comment

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

LGTM.

ditto Flo comment on the part either filtering on eventTypes or otherwise.

@mmalenic mmalenic merged commit 35e7d48 into main Oct 29, 2024
6 checks passed
@mmalenic mmalenic deleted the feat/ignore-cache-event-source branch October 29, 2024 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants