-
Notifications
You must be signed in to change notification settings - Fork 477
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
Fix/initsteps race condition #8145
base: master
Are you sure you want to change the base?
Changes from all commits
f3f4a8c
2261ba9
e21241f
b68937d
5c4f734
5960515
6961235
4351029
717fb45
4483614
e880128
9590c1b
1962c5b
2c040c8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ public async Task With_steps_from_here() | |
LimboLogs.Instance); | ||
|
||
using CancellationTokenSource source = new CancellationTokenSource(TimeSpan.FromSeconds(1)); | ||
|
||
source.Cancel(); | ||
try | ||
{ | ||
await stepsManager.InitializeAll(source.Token); | ||
|
@@ -97,7 +97,7 @@ public async Task With_failing_steps() | |
LimboLogs.Instance); | ||
|
||
using CancellationTokenSource source = new CancellationTokenSource(TimeSpan.FromSeconds(2)); | ||
|
||
source.Cancel(); | ||
try | ||
{ | ||
await stepsManager.InitializeAll(source.Token); | ||
|
@@ -153,7 +153,7 @@ public StepA(NethermindApi runnerContext) | |
} | ||
} | ||
|
||
[RunnerStepDependencies(typeof(StepC))] | ||
[RunnerStepDependencies(typeof(StepCStandard))] | ||
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. I think the previous test case is correct, the dependency is declared by base type not the subtype. Its a subtle thing that plugins rely on. 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. Ok I see. If that is the intended behavior there can be an issue if steps are inhering from another step like 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. Many scary issue that I don't want to bring in my sleep. 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. In my original implementation, that wasn't an issue, steps were grouped by base step for dependency resolution that is why _allStepsByBaseType existed |
||
public class StepB : IStep | ||
{ | ||
public Task Execute(CancellationToken cancellationToken) | ||
|
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.
The dependency is mapped by
StepBaseType