Correctly track session elements in dynamic build plan - #2104
Open
abderrahim wants to merge 1 commit into
Open
Conversation
abderrahim
requested review from
BenjaminSchubert,
cs-shadow,
gtristan and
juergbi
as code owners
February 6, 2026 12:12
juergbi
reviewed
Feb 6, 2026
abderrahim
force-pushed
the
abderrahim/dynamic-session-elements
branch
from
August 4, 2026 11:39
bc72d34 to
4f18986
Compare
juergbi
reviewed
Aug 4, 2026
| if not track and not self.queues: | ||
| # First non-track queue | ||
| queue.set_required_element_check() | ||
| queue.set_session_elements(self.session_elements) |
Contributor
There was a problem hiding this comment.
This is never executed for bst source track, resulting in the frontend indicating 0 session elements.
query_cache marks the CacheQueryQueue (with storage-service) also as track=True. Need to make sure that fixing bst source track won't make the counter wrong in sessions with a CacheQueryQueue.
juergbi
reviewed
Aug 4, 2026
| # | ||
| def _enqueue_element(self, element): | ||
| if self.session_elements is not None: | ||
| self.session_elements.append(element) |
Contributor
There was a problem hiding this comment.
_enqueue_element seems to be called also for retried jobs. I haven't tested it but this might increase the counter too much. Maybe session_elements should be a set instead? (May need to use OrderedDict as the order may be significant).
abderrahim
force-pushed
the
abderrahim/dynamic-session-elements
branch
from
August 4, 2026 16:51
4f18986 to
bf69297
Compare
When using a dynamic build plan, all elements are passed to the queue to be enqueued, but are only actually enqueued when they become required. This moves the tracking of session elements to the first queue rather than just take everything that we pass to the queue (which would be all elements). This also makes session_elements a set rather than a list since an element can be enqueued more than once (e.g. if it is retried). This is only used in the UI, and doesn't actually affect the build.
abderrahim
force-pushed
the
abderrahim/dynamic-session-elements
branch
from
August 4, 2026 18:00
bf69297 to
e14c936
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When using a dynamic build plan, all elements are passed to the queue to be enqueued, but are only actually enqueued when they become required.
This moves the tracking of session elements to the first queue rather than just take everything that we pass to the queue (which would be all elements).
This is only used in the UI AFAICT, and doesn't actually affect the build.