OneWay Git Sync: Add a safe UI authoring and export mode
1 vote
When OneWay Git Sync is enabled, it would be useful if more of the PowerShell Universal UI remained available for configuration and exploration without allowing those changes to be applied directly to the running configuration.
The idea would be to provide a safe authoring or staging mode where users could:
Explore configuration options throughout the PSU UI.
Use normal Create and configuration screens.
Build and validate a proposed configuration using the UI.
Prevent those changes from being saved directly to the active OneWay-synced configuration.
Copy, export, or download the resulting PSU configuration/code so it can be reviewed and committed through the normal Git workflow.
Potentially provide a way to send or hand off that generated configuration to an external source-control or deployment workflow.
This would preserve the security and configuration-control benefits of OneWay Git Sync, while still allowing the PSU UI to function as a useful configuration authoring and discovery tool.
For example, an administrator could use the UI to build an environment, script, AI Tool, API, role, or other PSU object, see all of the available options, and then select something like Copy Configuration or Export to PowerShell rather than Save.
The generated configuration could then be reviewed, committed to Git, and deployed back into PSU through the existing OneWay sync process.
The goal is to maintain a clear separation:
PSU UI = explore, design, and generate configuration
Git = review, approve, and make configuration authoritative
This could provide a more secure development model without giving up the usability and discoverability of the PSU UI.
@wwong1 I'm not sure that I would change how One-Way git sync worked in this regard because it's typically used for production servers. I wouldn't want to encourage or allow users to make changes to production configurations, even if it didn't persist it back to the git repository.
I could see some sort of setup where we introduce a different git mechanism, like Pull Only. We currently have push only but pull only would only ever pull and wouldn't allow committing back to the server manually. The admin console would still allow editing. We would need to figure out what to do when the config drifts from the remote. Do we stop the sync until the changes are complete? Do we improve our merge conflict handling?
The other idea is that we could put the local edits in a different location that the git config. This would avoid merge conflicts but might get really complicated when it came to conflicting changes between the git repo and the local changes.
I do see the benefit of a configuration like this, and I would think the simplest way would be to have a pull only mode that always functions in manual edit mode. The git sync pauses (or can be forced) when editing and experimenting. There is no push available, but we could have an export\download feature to get the changes locally.
Adam Driscoll
PowerShell Expert and Software Architect at Devolutions