-
Notifications
You must be signed in to change notification settings - Fork 50
recovery from key - store the parties being migrated in the local db for recovery in case of failure #3201
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
Merged
+511
−348
Merged
recovery from key - store the parties being migrated in the local db for recovery in case of failure #3201
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
9ea9d74
rollback
nicu-da e035e30
move
nicu-da aa041da
[ci] .
nicu-da c510967
[ci] info logs
nicu-da 3476fd2
[ci] .
nicu-da 299db18
[ci] .
nicu-da 53b7c62
[ci] .
nicu-da 771809f
[ci] add test
nicu-da 28ba32a
[ci] .
nicu-da 2e941e2
[ci] .
nicu-da 5c67b6d
Merge branch 'main' into nicuda/fix/resilience_key_recovery
nicu-da ccfd727
[ci] .
nicu-da 6560f64
[ci] .
nicu-da 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
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 |
|---|---|---|
|
|
@@ -22,6 +22,7 @@ object FutureUnlessShutdownUtil { | |
| )(implicit ec: ExecutionContext): OptionT[Future, A] = { | ||
| OptionT(futureUnlessShutdownToFuture(f.value)) | ||
| } | ||
|
|
||
|
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. Very important to have newlines! 😛 |
||
| implicit class FutureUnlessShutdownOps[A](val f: FutureUnlessShutdown[A]) extends AnyVal { | ||
| def toFuture(implicit ec: ExecutionContext): Future[A] = | ||
| f.failOnShutdownToAbortException("Splice unsafe shutdown future") | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -10,7 +10,6 @@ import org.apache.pekko.stream.Materializer | |
| import org.apache.pekko.stream.scaladsl.{Sink, Source} | ||
| import org.apache.pekko.stream.testkit.StreamSpec | ||
| import org.lfdecentralizedtrust.splice.admin.api.client.commands.HttpCommandException | ||
| import org.lfdecentralizedtrust.splice.util.{SpliceRateLimitMetrics, SpliceRateLimiter} | ||
|
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. Just going to pretend I understand how this passed static checks previously... |
||
| import org.lfdecentralizedtrust.splice.util.SpliceRateLimiterTest.runRateLimited | ||
|
|
||
| import scala.concurrent.Future | ||
|
|
||
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.
@martinflorian-da can you take another look? Added a test for the new functionality. In theory there's a slight chance that it will be flaky but I am confident enough that the startup is not fast enough for it to flake.
Uh oh!
There was an error while loading. Please reload this page.
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.
Ufff IDK, it does sound quite a bit shaky flaky to me... Things change, we'll forget what we did here, then we'll reorder app init order or change something else... and then go debug this.
I guess you run
startwhere you do so it sets up the DB for you? Can't we just do that in the test, before running start?Yes it seems a bit over the top for this particular PR, but the capability of initialing this store with arbitrary data before we start an app sounds like a handy thing to have also for other tests.
Not going to veto it but if it was my PR I think I'd lean towards not adding that test, even if the alternative was "I only tested it manually once".
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.
We could but it's not trivial
honestly SGTM, will just remove the test, I was on the fence about it but then realized that our startup is real slow but then again that can always change and we shouldn't count on it
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.
👍
...it's also a dangerous precedent... Not everyone's gut feeling is as well calibrated as yours, but they might still end up copying this approach...