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

Event filtering using the backend #4831

Merged
merged 13 commits into from
Nov 11, 2021
Merged

Event filtering using the backend #4831

merged 13 commits into from
Nov 11, 2021

Conversation

kschiffer
Copy link
Contributor

@kschiffer kschiffer commented Nov 5, 2021

Summary

This PR introduces filtering logic for events in the backend, as well as the Console making use of the new feature. Client-side filtering is hence retired.

Referencing #2231

Changes

  • Add server-side filtering via the names prop
  • Removing client-side filtering from the Console
  • Updating structure of event filters, and associated handling logic in the Console
    • Using specific per-entity filters to avoid server overhead
    • Using a more sustainable

Testing

Manual testing.

Regressions

Possible but hard to check right now. We should check this closely once on staging.

Checklist

  • Scope: The referenced issue is addressed, there are no unrelated changes.
  • Compatibility: The changes are backwards compatible with existing API, storage, configuration and CLI, according to the compatibility commitments in README.md for the chosen target branch.
  • Documentation: Relevant documentation is added or updated.
  • Changelog: Significant features, behavior changes, deprecations and fixes are added to CHANGELOG.md.
  • Commits: Commit messages follow guidelines in CONTRIBUTING.md, there are no fixup commits left.

@kschiffer kschiffer added c/console This is related to the Console in progress We're working on it ui/web This is related to a web interface labels Nov 5, 2021
@kschiffer kschiffer self-assigned this Nov 5, 2021
@github-actions github-actions bot added compat/api This could affect API compatibility ui/cli This is related to ttn-lw-cli labels Nov 5, 2021
@htdvisser htdvisser force-pushed the feature/2231-event-filter branch from 90d99de to 012b05c Compare November 8, 2021 12:32
@kschiffer kschiffer force-pushed the feature/2231-event-filter branch 3 times, most recently from 6afc80b to 5127786 Compare November 9, 2021 12:11
@kschiffer kschiffer marked this pull request as ready for review November 9, 2021 12:17
@kschiffer kschiffer removed the in progress We're working on it label Nov 9, 2021
errUnknownEventName = errors.DefineInvalidArgument("unknown_event_name", "unknown event `{name}`")
)

func (srv *EventsServer) processNames(names ...string) ([]string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is clever.

@kschiffer kschiffer added this to the v3.16.0 milestone Nov 10, 2021
'synthetic.status.filter_disabled:type': 'Filter disabled',
'synthetic.status.filter_disabled:preview': 'The previously set event filter has been disabled',
'synthetic.status.filter_disabled:details':
'The event stream is will not be filtered any more. This means that you will see all events that come out of the event stream for this entity.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'The event stream is will not be filtered any more. This means that you will see all events that come out of the event stream for this entity.',
'The event stream will not be filtered any more. This means that you will see all events that come out of the event stream for this entity.',

@kschiffer kschiffer force-pushed the feature/2231-event-filter branch from 5127786 to 7b4835a Compare November 10, 2021 09:40
Copy link
Contributor

@htdvisser htdvisser left a comment

Choose a reason for hiding this comment

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

I can't really review the code-owned files here, since I wrote those changes myself....

@kschiffer kschiffer force-pushed the feature/2231-event-filter branch from 7b4835a to 8cd6eaf Compare November 10, 2021 10:07
@kschiffer kschiffer force-pushed the feature/2231-event-filter branch from 8cd6eaf to d7e1025 Compare November 10, 2021 13:25
@kschiffer
Copy link
Contributor Author

kschiffer commented Nov 10, 2021

@johanstokking Can you review in this case since this PR is co-authored by @htdvisser. I cannot merge otherwise.

@htdvisser htdvisser merged commit 82713dc into v3.16 Nov 11, 2021
@htdvisser htdvisser deleted the feature/2231-event-filter branch November 11, 2021 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/console This is related to the Console compat/api This could affect API compatibility ui/cli This is related to ttn-lw-cli ui/web This is related to a web interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants