Skip to content

Event notifications#87

Merged
das-Abroxas merged 82 commits intodevfrom
feat/event-notifications
Jun 29, 2023
Merged

Event notifications#87
das-Abroxas merged 82 commits intodevfrom
feat/event-notifications

Conversation

@das-Abroxas
Copy link
Copy Markdown
Contributor

@das-Abroxas das-Abroxas commented Jun 26, 2023

This adds to the ArunaServer that notifications are emitted for certain events. The condition for this is that a running AOSEventStreamer instance is registered in the configuration of the server. In order to retrieve notifications for specific resources and or their sub-resources, the public interface of an AOSEventStreamer instance must be used to create a so-called stream group.

In the first iteration, the following event notifications are delivered:

  • Project [Create, Update, Delete]
  • Collection [Create, Update, Delete]
  • Object [Create, Update, Delete]

A properly functioning system for sending event notifications is also the basis for allowing system-internal services to communicate with each other asynchronously.

In addition, the relations_db_optimisations branch (thanks @St4NNi) was included in this branch, which improves the internal management of path meta-information for objects. This makes it way easier to fetch the needed information for notifications and optimises database performance in the long term, which also plays a role in #75.

Changelog

das-Abroxas and others added 30 commits May 5, 2023 13:06
Currently missing: Resource authorization for path identifier.
@das-Abroxas das-Abroxas added the enhancement New feature or request label Jun 26, 2023
@das-Abroxas das-Abroxas added this to the v1.1.0 milestone Jun 26, 2023
@das-Abroxas das-Abroxas requested review from St4NNi and lfbrehm June 26, 2023 07:36
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 26, 2023

Codecov Report

Patch coverage: 38.43% and project coverage change: -3.01 ⚠️

Comparison is base (684edbd) 59.02% compared to head (e1ec42a) 56.01%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #87      +/-   ##
==========================================
- Coverage   59.02%   56.01%   -3.01%     
==========================================
  Files          42       44       +2     
  Lines        9164    10147     +983     
==========================================
+ Hits         5409     5684     +275     
- Misses       3755     4463     +708     
Impacted Files Coverage Δ
src/database/crud/info.rs 0.00% <0.00%> (ø)
src/database/crud/notifications.rs 0.00% <0.00%> (ø)
src/database/crud/user.rs 65.40% <ø> (ø)
src/error.rs 24.76% <0.00%> (+1.72%) ⬆️
src/server/clients/event_emit_client.rs 0.00% <0.00%> (ø)
src/server/clients/kube_client.rs 0.00% <ø> (ø)
src/server/clients/mail_client.rs 0.00% <ø> (ø)
src/server/grpc_server.rs 0.00% <0.00%> (ø)
src/server/mod.rs 0.00% <0.00%> (ø)
src/server/services/authz.rs 55.67% <0.00%> (-8.96%) ⬇️
... and 18 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

This function takes a relation instead of a Vec<EmittedResource> which
makes it easier to emit events which concern Objects.
Copy link
Copy Markdown
Member

@St4NNi St4NNi left a comment

Choose a reason for hiding this comment

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

LGTM, way too much to properly review. Skimming over it i have not found any major flaws.

@das-Abroxas das-Abroxas merged commit 386a3d4 into dev Jun 29, 2023
@St4NNi St4NNi deleted the feat/event-notifications branch August 29, 2023 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants