Dev Box - Adding customization support#152
Conversation
This reverts commit 88e8dfa452a83a838096fb43ed3204c1ec835e73.
| // Remove " dependsOn: -'Git.Git | Install: Git'" from the configuration | ||
| // This is a workaround as the current implementation does not support dependsOn | ||
| configuration = configuration.Replace("dependsOn:", string.Empty); | ||
| configuration = configuration.Replace("- 'Git.Git | Install: Git'", string.Empty); |
There was a problem hiding this comment.
this is still pretty weird to me, as I'm sure they'll let other folks other than dev home submit winget files which can include the depends on value. But also as Dev Home starts to supports more things like "bring your own config file", we'd want users to pass their own config file to their Dev Boxes. At that point they can have the depends on flag anywhere in the file, depending on the Dsc resources they use.
There was a problem hiding this comment.
I agree that this is weird. Let me actually reach out to DevBox folks to understand which side this bug is on.
| "Failed" => ConfigurationUnitState.Unknown, | ||
| "TimedOut" => ConfigurationUnitState.Unknown, |
There was a problem hiding this comment.
Should Failed and TimedOut be seen as completed instead of unknown? @sshilov7
| "Failed" => ConfigurationSetState.Unknown, | ||
| "ValidationFailed" => ConfigurationSetState.Unknown, |
There was a problem hiding this comment.
Should Failed and ValidationFailed be seen as completed instead of unknown? @sshilov7 ? Technically we know its completed, we just don't have a specific type for them. But validationFailed, looks like it happens when opening the configuration set fails.
Summary of the pull request
Adds customization support for Dev Boxes from the Machine Configuration > Set up a target flow
Detailed description of the pull request / Additional comments
The WinGet DSC YAML formatted string received by the extension is parsed and broken into individual units. Each unit has the format as the original, but only a single task. This is also encoded to Base64 as this is the format required for the JSON request sent through Dev Box REST APIs. The incoming YAML is broken down as the current implementation of APIs don't support sub task progress monitoring.
An example of the JSON request:
Once the customization request has been sent, it is polled every 10 seconds for updates. The execution begins after ~30 seconds as shown by testing. The statuses of individual tasks are raised as an event for Dev Home to update its UI.
Validation steps performed
Manually ran customization on a test VM
PR checklist