-
Notifications
You must be signed in to change notification settings - Fork 333
WPB-26489 backend adminless scheduled jobs model for deletion and reminder #5289
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
Open
battermann
wants to merge
65
commits into
develop
Choose a base branch
from
WPB-26489-backend-adminless-scheduled-jobs-model-and-teardown-support
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
65 commits
Select commit
Hold shift + click to select a range
3bee7ec
bootstrap arbiter into wire-server
battermann f78d550
migrate the meetings clean up job to arbiter
battermann c7a7d41
brig internal: route plumbing the arbiter UI
battermann 089dab5
refactoring and implementing admin ui
battermann 92f8ad7
resolve warning, formatting
battermann 594ab9f
inline arbiter ui/api
battermann c0ae7eb
removed unused code
battermann 6733db4
job store
battermann f8dba71
schema
battermann 96c1fcd
job subsystem
battermann 761acd7
resolve warning
battermann f6be631
revomve obsolete job subsystem operations
battermann 42fb6d6
formatting
battermann 14ba21c
linting
battermann 2292bcf
single worker start effect, renaming
battermann 6095211
clean up
battermann 07f2d61
reminder and deletion jobs
battermann b245390
migrate the meetings clean up to a real arbiter cron
battermann 51d11a9
send reminder events
battermann 1ebce4a
fixed parser for tean feature
battermann 34562ad
remove wire-server scheduled_job entry when job is finished
battermann 933c2d4
test that jobs get created correctly
battermann 46fbe9f
test execution of job
battermann b89993d
make the arbiter config explicit
battermann 5419ade
make arbiter worker parallelism setting explicit
battermann 1d8cadc
use correct feature store
battermann a7c55c3
logging
battermann 5bd6df0
poll intervall configurable
battermann 8e95209
comment and formatting
battermann 69744a7
formatting
battermann 5586097
update test for job excecution
battermann baadc18
fix bw config map and add config options doc
battermann 777495b
changelog
battermann 903b4be
formatting
battermann 3b4eb04
wip: arbiter adapter
battermann fe879e3
Potential fix for pull request finding
battermann 1e7d687
Potential fix for pull request finding
battermann b1b1be2
wip: arbiter adapter
battermann 636542b
Revert "wip: arbiter adapter"
battermann c4a23c2
typo
battermann acc582e
extract into where
battermann 12186b2
dependencies
battermann 32cd24d
give arbiter a resource pool of conncetion
battermann 0867a36
honor new feature config shape
battermann 4bb51e0
do not use arbiter api in tests, check for reminders and deletion
battermann a9e399b
remove arbiter API/UI
battermann 69eeecb
removed not needed scheduled jobs table and migrations
battermann 3ee24da
fixed some merge/rebase issues
battermann 23a78d3
fixed postgres schema
battermann 78419c2
fix
battermann 7261074
fix dependencies after rebase
battermann 778589b
small fixes after rebase
battermann 7ddfeea
monad arbeiter adapter
battermann 7c7f99c
wire monad arbiter adapter and remove second conn pool
battermann 124d305
dependency clean up
battermann ed24355
fix flake.lock
battermann 12d04a8
adapt adapter
battermann d4d78b4
adress PR findings
battermann 471b651
dedup keys for jobs
battermann 80c2465
reject non positive poll interval
battermann 4667315
Initialize scheduled-job Arbiter schema before startup
battermann b717dfd
remove redundant db query
battermann 864f421
coordinate arbiter migration runs via advisory locks
battermann de85b43
linter
battermann aeba23a
removed unused parameter
battermann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Background-worker scheduled jobs now run through Arbiter. The background-worker configuration includes `scheduledJobs.pollInterval`, which controls how often the scheduler wakes up to look for due jobs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Introduce Arbiter-backed schedulable background jobs, migrate meetings cleanup to the new job runner, and add the initial adminless reminder and deletion jobs. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -205,6 +205,9 @@ isConvCreateNotifNotSelf n = | |
| isConvDeleteNotif :: (HasCallStack, MakesValue a) => a -> App Bool | ||
| isConvDeleteNotif n = fieldEquals n "payload.0.type" "conversation.delete" | ||
|
|
||
| isConvAdminlessReminderNotif :: (HasCallStack, MakesValue a) => a -> App Bool | ||
| isConvAdminlessReminderNotif n = fieldEquals n "payload.0.type" "conversation.adminless-reminder" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. More a note rather than a concern for this PR: we should introduce helpers to assert payloads' type |
||
|
|
||
| notifTypeIsEqual :: (HasCallStack, MakesValue a) => String -> a -> App Bool | ||
| notifTypeIsEqual typ n = nPayload n %. "type" `isEqual` typ | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| -- This file is part of the Wire Server implementation. | ||
| -- | ||
| -- Copyright (C) 2026 Wire Swiss GmbH <[email protected]> | ||
| -- | ||
| -- This program is free software: you can redistribute it and/or modify it under | ||
| -- the terms of the GNU Affero General Public License as published by the Free | ||
| -- Software Foundation, either version 3 of the License, or (at your option) | ||
| -- any later version. | ||
| -- | ||
| -- This program is distributed in the hope that it will be useful, but WITHOUT | ||
| -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
| -- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more | ||
| -- details. | ||
| -- | ||
| -- You should have received a copy of the GNU Affero General Public License along | ||
| -- with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
|
||
| module Data.Secret | ||
| ( SecretText, | ||
| secretText, | ||
| revealSecretText, | ||
| ) | ||
| where | ||
|
|
||
| import Imports | ||
|
|
||
| -- | Text that may contain credentials or other sensitive material. | ||
| -- | ||
| -- The constructor is intentionally opaque. 'revealSecretText' should only be | ||
| -- used at the narrow boundary where an external API requires the plaintext | ||
| -- representation. | ||
| newtype SecretText = SecretText Text | ||
|
|
||
| instance Show SecretText where | ||
| show _ = "<redacted>" | ||
|
|
||
| -- | Wrap sensitive text without exposing it through the public constructor. | ||
| secretText :: Text -> SecretText | ||
| secretText = SecretText | ||
|
|
||
| -- | Reveal sensitive text for an API that explicitly requires plaintext. | ||
| revealSecretText :: SecretText -> Text | ||
| revealSecretText (SecretText value) = value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| -- This file is part of the Wire Server implementation. | ||
| -- | ||
| -- Copyright (C) 2026 Wire Swiss GmbH <[email protected]> | ||
| -- | ||
| -- This program is free software: you can redistribute it and/or modify it under | ||
| -- the terms of the GNU Affero General Public License as published by the Free | ||
| -- Software Foundation, either version 3 of the License, or (at your option) | ||
| -- any later version. | ||
| -- | ||
| -- This program is distributed in the hope that it will be useful, but WITHOUT | ||
| -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
| -- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more | ||
| -- details. | ||
| -- | ||
| -- You should have received a copy of the GNU Affero General Public License along | ||
| -- with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
|
||
| module Test.Data.Secret (tests) where | ||
|
|
||
| import Data.Secret | ||
| import Imports | ||
| import Test.Tasty | ||
| import Test.Tasty.HUnit | ||
|
|
||
| tests :: TestTree | ||
| tests = | ||
| testGroup | ||
| "SecretText" | ||
| [ testCase "does not expose its value through Show" $ | ||
| show (secretText "database-password") @?= "<redacted>" | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure whether it's a feature, nor it's necessary with the other file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better more information than less, I would say.