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

Set expiry for dismissed notifications #5186

Merged
merged 22 commits into from
Jan 8, 2025

Conversation

samgst-amazon
Copy link
Contributor

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

We store the list of dismissed notif ids in aws.xml, but we need to limit the size of this saved list.
To do this, dismissed notification IDs stored in the aws.xml are timestamped. Each time the persistent state component is loaded, any notifications older than 60 days will be removed from the set.

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@samgst-amazon samgst-amazon requested a review from a team as a code owner December 11, 2024 01:22
Copy link

github-actions bot commented Dec 11, 2024

Qodana Community for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]


data class NotificationDismissalConfiguration(
@Property
var dismissedNotifications: MutableSet<DismissedNotification> = mutableSetOf(),
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
var dismissedNotifications: MutableSet<DismissedNotification> = mutableSetOf(),
val dismissedNotifications: MutableSet<DismissedNotification> = mutableSetOf(),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These properties need to be var for the serialization to work without the property/attribute tags

@samgst-amazon samgst-amazon merged commit c0493f9 into main Jan 8, 2025
15 checks passed
@samgst-amazon samgst-amazon deleted the samgst/NotificationDismissedExpire branch January 8, 2025 23:31
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.

2 participants