-
Notifications
You must be signed in to change notification settings - Fork 40
scheduler: Stop scheduling from the imperative queue when asked to quit #2005
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
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
b9e429f
scheduler: Stop scheduling from the imperative queue when asked to quit
abderrahim bde7d67
_testing/runcli.py: Don't fail when removing non-existant artifacts
gtristan 7dfb541
tests/integration/cachedfail.py: Refactored to use its own individual…
gtristan 8078dd7
tests/integration/cachedfail.py: Test scheduler behavior after failed…
gtristan 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 |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| kind: script | ||
|
|
||
| build-depends: | ||
| - base.bst | ||
|
|
||
| config: | ||
| commands: | ||
| - touch %{install-root}/foo | ||
| - false |
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,9 @@ | ||
| kind: script | ||
|
|
||
| build-depends: | ||
| - base.bst | ||
|
|
||
| config: | ||
| commands: | ||
| - touch %{install-root}/foo | ||
| - false |
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,8 @@ | ||
| kind: script | ||
|
|
||
| build-depends: | ||
| - base.bst | ||
|
|
||
| config: | ||
| commands: | ||
| - touch %{install-root}/foo |
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,17 @@ | ||
| kind: import | ||
|
|
||
| description: | | ||
| Alpine Linux base for tests | ||
|
|
||
| Generated using the `tests/integration-tests/base/generate-base.sh` script. | ||
|
|
||
| sources: | ||
| - kind: tar | ||
| base-dir: '' | ||
| (?): | ||
| - arch == "x86-64": | ||
| ref: 3eb559250ba82b64a68d86d0636a6b127aa5f6d25d3601a79f79214dc9703639 | ||
| url: "alpine:integration-tests-base.v1.x86_64.tar.xz" | ||
| - arch == "aarch64": | ||
| ref: 431fb5362032ede6f172e70a3258354a8fd71fcbdeb1edebc0e20968c792329a | ||
| url: "alpine:integration-tests-base.v1.aarch64.tar.xz" |
9 changes: 9 additions & 0 deletions
9
tests/integration/cached-fail/elements/depends-on-base-fail-expect-foo.bst
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,9 @@ | ||
| kind: script | ||
|
|
||
| build-depends: | ||
| - base.bst | ||
| - base-fail.bst | ||
|
|
||
| config: | ||
| commands: | ||
| - test -e /foo |
9 changes: 9 additions & 0 deletions
9
tests/integration/cached-fail/elements/depends-on-two-failures.bst
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,9 @@ | ||
| kind: script | ||
|
|
||
| build-depends: | ||
| - base-fail.bst | ||
| - base-also-fail.bst | ||
|
|
||
| config: | ||
| commands: | ||
| - test -e /foo |
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,37 @@ | ||
| # Project config for frontend build test | ||
| name: test | ||
| min-version: 2.0 | ||
| element-path: elements | ||
|
|
||
| aliases: | ||
| alpine: https://bst-integration-test-images.ams3.cdn.digitaloceanspaces.com/ | ||
| project_dir: file://{project_dir} | ||
|
|
||
| plugins: | ||
| - origin: pip | ||
| package-name: sample-plugins | ||
| elements: | ||
| - autotools | ||
|
|
||
| options: | ||
| linux: | ||
| type: bool | ||
| description: Whether to expect a linux platform | ||
| default: True | ||
| arch: | ||
| type: arch | ||
| description: Current architecture | ||
| variable: build_arch | ||
| values: | ||
| - x86-64 | ||
| - aarch64 | ||
|
|
||
| environment: | ||
| TEST_VAR: pony | ||
|
|
||
| split-rules: | ||
| test: | ||
| - | | ||
| /tests | ||
| - | | ||
| /tests/* |
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.
This line looks very dubious.
The first part of the function's job is to select the
queueson which to process in the latter half of the function, that seems to make sense. And except for this line you've changed, the rest of the function does only operate on the selectedqueues.I wonder if this change is really needed, or if only the previous change is needed.
Given this is such a sensitive code block, I think this change needs further clarity.
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.
Correct, and that's the root cause of the issue I'm trying to fix.
There are two operations in this function ("pull elements forward through queues", and "kickoff whatever processes can be processed at this time") and they shouldn't operate on the same list of queues.
Let's consider a simple example where we have three queues: fetch, build and push. Once we receive the quit signal, we only want to:
What the current code does is:
What the new code does is:
I hope this explains it. So while this line is indeed "dubious", it needs to be different from the other one. And since it's harmless to pull jobs into next queues even when asked to quit, I think it's fine to do that unconditionally.
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.
Ok... I've done some mental gymnastics and I agree with your statement :)
What I would like to see here is:
queuesvariable to something more explicit, perhapsqueues_to_process