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

new: Add support for polling on events with a secondary entity ID #349

Merged
merged 3 commits into from
Aug 2, 2023

Conversation

lgarber-akamai
Copy link
Contributor

📝 Description

This change adds support for polling on events while filtering on both a primary and secondary entity ID. This includes a new NewEventPollerWithSecondary(...) function and a new SecondaryEntityID event poller field.

NOTE: The filtering logic for secondary entity IDs has been implemented on the client as this functionality is not currently offered by the API.

✔️ How to Test

make ARGS="-run TestEventPoller_Secondary" fixtures

@lgarber-akamai lgarber-akamai requested a review from a team as a code owner July 24, 2023 18:36
@jriddle-linode jriddle-linode requested a review from a team July 25, 2023 18:18
Comment on lines +668 to +671
if !eventMatchesSecondary(p.SecondaryEntityID, event) {
continue
}

Copy link
Member

@zliang-akamai zliang-akamai Aug 1, 2023

Choose a reason for hiding this comment

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

Is adding an additional API filter when SecondaryEntityID != nil a better and workable idea? (this is just a discussion, and feel free to merge the PR)

Copy link
Contributor Author

@lgarber-akamai lgarber-akamai Aug 2, 2023

Choose a reason for hiding this comment

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

Good question! Unfortunately filtering on a secondary entity ID isn't supported through the API as of now

@lgarber-akamai lgarber-akamai merged commit 0308927 into linode:main Aug 2, 2023
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.

3 participants