_stream: Persist soft workspace resets - #2166
Open
kotborealis wants to merge 1 commit into
Open
Conversation
The soft reset path cleared workspace.last_build only in memory. Since workspace_reset() returned without Workspaces.save_config(), the old hash remained in .bst2/workspaces.yml and was loaded by the next BuildStream invocation. That retained the previous buildtree and could skip configure-commands. This regressed in 1eedab4, when the final save after the reset loop was removed as hard reset moved to workspace_close()/workspace_open(); those methods save the config themselves, but the soft path does not. The later last_successful -> last_build rename preserved the omission. Save the config once after all soft-reset targets are processed and cover the on-disk state before and after a new CLI invocation.
kotborealis
requested review from
BenjaminSchubert,
abderrahim,
cs-shadow,
gtristan and
juergbi
as code owners
August 11, 2026 09:23
Contributor
Author
|
@abderrahim please take a look at this, it would be great to merge this into buildstream 2.8, as it breaks local workflows a bit. |
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.
The soft reset path cleared
workspace.last_buildonly in memory. Sinceworkspace_reset()returned withoutWorkspaces.save_config(), the old hash remained in.bst2/workspaces.ymland was loaded by the next BuildStream invocation. That retained the previous buildtree and could skip configure-commands.This regressed in 1eedab4, when the final save after the reset loop was removed as hard reset moved to
workspace_close()/workspace_open(); those methods save the config themselves, but the soft path does not. The laterlast_successful->last_buildrename preserved the omission.Save the config once after all soft-reset targets are processed and cover the on-disk state before and after a new CLI invocation.