b56f2ad074
* Adding internal/manifest package from Cross-Platform AppHealth Feature Branch * Running go mod tidy and go mod vendor * - Add manifest.xml to Extension folder - Chaged Github workflow go version to Go 1.18 - Small refactor in setup function for bats tests. * Update Go version to 1.18 in Dockerfile * Add logging package with NopLogger implementation * Add telemetry package for logging events * - Add telemetry event Logging to main.go * - Add new String() methods to vmWatchSignalFilters and vmWatchSettings structs - Add telemetry event Logging to handlersettings.go * - Add telemetry event Logging to reportstatus.go * Add telemetry event Logging to health.go * Refactor install handler in main/cmds.go to use telemetry event logging * Refactor uninstall handler in main/cmds.go to use telemetry event logging * Refactor enable handler function in main/cmds.go to use telemetry event logging * Refactor vmWatch.go to use telemetry event logging * Fix requestPath in extension-settings.json and updated 2 integration tests, one in 2_handler-commands.bats and another in 7_vmwatch.bats * ran go mod tidy && go mod vendor * Update ExtensionManifest version to 2.0.9 on UT * Refactor telemetry event sender to use EventLevel constants in main/telemetry.go * Refactor telemetry event sender to use EventTasks constants that match with existing Windows Telemetry * Update logging messages in 7_vmwatch.bats * Moved telemetry.go to its package in internal/telemetry * Update Go version to 1.22 in Dockerfile, go.yml, go.mod, and go.sum * Update ExtensionManifest version to 2.0.9 on UT * Add NopLogger documentation to pkg/logging/logging.go * Added Documentation to Telemetry Pkg * -Added a Wrapper to HandlerEnviroment to add Additional functionality like the String() func - Added String() func to handlersettings struct, publicSettings struct, vmWatchSettings struct and vmWatchSignalFilters struct - Added Telemetry Event for HandlerSettings, and for HandlerEnviroment * - Updated HandlerEnviroment String to use MarshallIndent Function. - Updated HandlerSettings struct String() func to use MarshallIndent - Fixed Failing UTs due to nil pointer in Embedded Struct inside HandlerEnviroment. * - Updated vmWatchSetting String Func to use MarshallIdent * Update ExtensionManifest version to 2.0.10 on Failing UT * removed duplicated UT * Removed String() func from VMWatchSignalFilters, publicSettings and protectedSettings |
||
---|---|---|
.. | ||
Dockerfile | ||
README.md | ||
devcontainer.env | ||
devcontainer.json | ||
extension-settings.json |
README.md
Dev Container Info
This directory contains files to support running the code in a dev container. This allows you build and debug the code locally, either on a PC, Mac or linux machine.
This works using VSCode's dev container support.
Requirements
-
Docker – needed for building the docker image and for devcontainer workflow. Microsoft has an enterprise agreement with docker, details here
-
Dev Containers VSCode extension
- installation info is here
Running In DevContainer
This works either on windows/mac machine or via a remote SSH session on a linux machine (this is the only way that the integration tests can reliably run, debugging works in all modes)
- Go to the root of the repo in a command window
- Open vscode using
code .
- Click the Blue
><
thing in thr bottom left of the screen and selectreopen in container
(the first time this runs it will take some time as it will build the docker container for the dev environment based on the dockerfile in the .devcontainer directory) - Once it has opened, open a bash terminal in vscode
- run
make devcontainer
- you are now ready to run and debug the extension
Debugging
- configure the appropriate settings in the file
.devcontainer/extension-settings.json
(the default one enables thesimple
andprocess
tests for vmwatch but you can change it) - click the debug icon on the left and select
devcontainer run - enable
target- you can add more in
launch.json
as needed
- you can add more in
- set breakpoints as required
- hit f5 to launch the extension code