Skip to content

_stream: Persist soft workspace resets - #2166

Open
kotborealis wants to merge 1 commit into
apache:masterfrom
kotborealis:fix/workspace-soft-reset-persistence
Open

_stream: Persist soft workspace resets#2166
kotborealis wants to merge 1 commit into
apache:masterfrom
kotborealis:fix/workspace-soft-reset-persistence

Conversation

@kotborealis

Copy link
Copy Markdown
Contributor

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.

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

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant