DYN-7777 : change workspace hidden eventing
Purpose
This is a change in behavior for an existing api but imo it is more of a bug fix. Basically as an api dev I would expect the current workspace to remain unchanged while I receive and process the OnWorkspaceHidden event. The reason is that I might need to execute some command that somewhere at some point make use of the current workspace.
We have an alternative as well to introduce OnWorkspaceHiddenStarted or something like that. Lmk what you think.
Declarations
Check these if you believe they are true
- [ ] Is documented according to the standards
- [ ] The level of testing this PR includes is appropriate
- [ ] User facing strings, if any, are extracted into
*.resxfiles - [ ] Snapshot of UI changes, if any.
- [ ] Changes to the API follow Semantic Versioning and are documented in the API Changes document.
- [ ] This PR modifies some build requirements and the readme is updated
- [ ] This PR contains no files larger than 50 MB
- [ ] This PR introduces new feature code involve network connecting and is tested with no-network mode.
Reviewers
@DynamoDS/eidos
FYIs
@DynamoDS/synapse
@BogdanZavu @johnpierson Can you explain why this is needed? we do feel this as risky this close to release, but we can do a pre-qual before merge. We would like to better understand the need for this and what this will enable for you. fyi @aparajit-pratap
Can you explain why this is needed? we do feel this as risky this close to release, but we can do a pre-qual before merge. We would like to better understand the need for this and what this will enable for you. fyi @aparajit-pratap
@zeusongit So we need to perform certain actions/commands ( e.g DeleteNodeCommands for transient nodes ) when current workspace is hidden. The DeleteCommand and I assume others too somewhere during execution rely on the CurrentWorkspace - which was already changed to the new workspace and fails. More generically as an API developer I want to perform certain actions/commands when the current workspace is changed. When I receive OnWorkspaceHidden my expectation is that things are still in place (mostly) related to the workspace (the old one) where I want to execute those commands.
I believe @johnpierson found an alternative solution to delete the transient nodes. This change is still good I think but we can postpone it after 3.6.