Skip to content

change: notifications - split property OriginUri into OriginClass and OriginResourceID#284

Merged
mgoetzegb merged 1 commit intomainfrom
VTI-785-adjust-ns-client
Feb 6, 2026
Merged

change: notifications - split property OriginUri into OriginClass and OriginResourceID#284
mgoetzegb merged 1 commit intomainfrom
VTI-785-adjust-ns-client

Conversation

@mgoetzegb
Copy link
Copy Markdown
Member

@mgoetzegb mgoetzegb commented Feb 3, 2026

What

change: notifications - split property OriginUri into OriginClass and OriginResourceID

Why

In the notification rules we want filter/match by a class of notification. But we also want to be able to pinpoint to a specific event instance in the notification (center). So far we had this information combined in the OriginUri, but it is more structured if we have to separate fields rather than needing to split up the value of OriginUri.

References

VTI-785

Adjustment in Notification Service: greenbone/opensight-notification-service#185

Checklist

  • Tests

@mgoetzegb mgoetzegb requested review from a team as code owners February 3, 2026 15:14
@mgoetzegb mgoetzegb added the minor release Set label to create a minor release label Feb 3, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 3, 2026

Conventional Commits Report

Type Number
Changed 1

🚀 Conventional commits found.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.67%. Comparing base (1266cd5) to head (86c186a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #284      +/-   ##
==========================================
+ Coverage   57.66%   57.67%   +0.01%     
==========================================
  Files          69       69              
  Lines        3812     3813       +1     
==========================================
+ Hits         2198     2199       +1     
  Misses       1433     1433              
  Partials      181      181              
Flag Coverage Δ
opensearch-tests 95.66% <ø> (ø)
postgres-tests 91.96% <ø> (ø)
unit-tests 52.17% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

… and `OriginResourceID`

Motivation: In the notification rules we want filter/match by a class of notification. But we also want to be able to pinpoint to a specific event instance in the notification (center). So far we had this information combined in the OriginUri, but it is more structured if we have to separate fields rather than needing to split up the value of OriginUri.
@mgoetzegb mgoetzegb force-pushed the VTI-785-adjust-ns-client branch from f6f0f2f to 86c186a Compare February 6, 2026 13:10
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 6, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 86c186a.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

None

@mgoetzegb mgoetzegb enabled auto-merge (squash) February 6, 2026 13:11
@mgoetzegb mgoetzegb merged commit 815decb into main Feb 6, 2026
12 checks passed
@mgoetzegb mgoetzegb deleted the VTI-785-adjust-ns-client branch February 6, 2026 13:13
mgoetzegb added a commit to greenbone/opensight-notification-service that referenced this pull request Feb 12, 2026
Add register Origins endpoint, also split property `originUri` into
`originClass` and `originResourceID`

In the future every notification sent to the notification service must
have the property `originClass` set. This property will be used for the
alert rules, where a notification from a specific origin (class) and
level (info, warning,...) is forwarded to e.g. a mattermost channel.

Note: For now `originClass` remains optional, to give client time to
adjust, it will be made mandatory at a later point of time. Therefore
this is not a breaking change so far. The effect of not setting
`originClass` is that no rule will match such a notification (which is
not yet implemented anyways so far).

## Why

Preparation for the alert feature.

## References

VTI-785

Related Client change:
greenbone/opensight-golang-libraries#284
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor release Set label to create a minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants