Closes#1595. Leaving one instance of `allow(clippy::uninit_vec)` in `pipe_handle.rs` as it is more difficult to remove. (Maybe there's another crate we could use for pipes?)
To satisfy clippy, instead of creating the vec and then resizing it straight away (exposing uninitialized data), write into the `spare_capacity_mut()` (which is `&mut [MaybeUninit<_>]`) and then resize it afterwards.
- Add logging
- Catch terminal exceptions and log as errors before re-throwing
- Nest some exceptions
- Warn when falling back to non-zero cost delegate for legacy compat
* Fix execution of timerProxy
- fixed behavior of Container.SaveBlob (file was not being overwritten)
- added support for default value in the entity converter
- fix scaleset size data type
- added initialization of Subnet
- renamed TestHook Info to _Info to prevent clashing of name function mame
- added target framework to ApiServiceProject to help local debugging
* fix unit tests
* fix unit tests
* remove unused property
* fix typo
* removing partial class TimerProxy
* checkpoint
* some more progress
* more progress
* More progress
* Now it's time to test it
* It works locally 🎉
* Attempting clean build
* fmt
* temporarily stub out macos
* missed a few
* please be the last one
* .
* .
* .
* noop change to unstuck actions
* .
* .
* Fix setup script
* Some fixes
* It works except for a race condition -- use a directory watcher to fix it
* It works end to end!
* Execute the commands using tokio's structs and timeout mechanism
* It works.... for real this time
* Undo timer changes
* Cleanup
* 🧹
* Fix import
* .
* PR comments
* Fix clippy
* Clippy whyyy
* Only check dotnet path once
* fmt
* Fix a couple more comments
* Add azcopy copy support and switch to the default max_concurrency
* Modify upload_file_data to use upload_file for consistency
* Fix lint issues
* Apply black formatting rules
* Apply isort formatting rules
Co-authored-by: Stas <stishkin@live.com>
Move integration tests into their own project. This makes it easier to run unit tests if you don't want to (or don't have) `azurite` running, since you can `dotnet test` just that directory.
Also add a check into the `AzuriteStorage` class that will abort the entire test run if `azurite` is not running, which is simpler than reading lots of socket exceptions.
I noticed that there was a note to update `appinsights` to a released version once one was available, and now one is.
The `close` function was changed to be `async` in the latest version, so `try_flush_and_close` must also become async. Luckily, the three places we use this already have an async context available.
1. Ports the `node` function from Python to C#.
2. Adds a missing authentication check.
3. Add validated string type `PoolName` for consistency with Python version.
Adds implementation of the `info` function.
Added support for blobs in the function integration test stuff.
Simplified usage of integration test classes by removing the account name parameter.
### Function implementation
Added implementation of `agent_events` function and some basic tests.
Fixed several issues encountered in `TestOperations`.
### Additional JsonConverter
The existing Python code for `agent_events` figures out which class to use only based upon the shape of the input, without a discriminator. I have added an additional `JsonConverter` named `SubclassConverter<T>` which will pick a subclass of `T` to deserialize into based upon what properties exist in the JSON.
### Enum helpers
Converted some enum helpers to extension methods to make them a bit more readable.
Add support for function tests and the ability to run them against either real Azure Storage or the Azurite emulator.
See follow-up PR #2032 for actual usage.
* Add context to every futur in the supervisor task
* adding more context info for the sync operations
* adding more logging in the monitoring of the process pipe
Mostly a maintenance update (dependabot was trying to do this and failing), but it does have a small improvement in that the `debug node_event state_update` help:
```console
$ target/debug/onefuzz-agent debug node_event state_update --help
onefuzz-agent-debug-node_event-state_update 0.1.0
USAGE:
onefuzz-agent debug node_event state_update <state>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
ARGS:
<state>
```
Now displays the applicable enum values:
```console
$ target/debug/onefuzz-agent debug node_event state_update --help
onefuzz-agent-debug-node_event-state_update
USAGE:
onefuzz-agent debug node_event state_update <STATE>
ARGS:
<STATE> [possible values: init, free, setting-up, rebooting, ready, busy, done]
OPTIONS:
-h, --help Print help information
```
`structopt` dependency removed as it was integrated into `clap`.
Updating the other projects that use `clap` is more involved as they use the lower-level interface.
* flushing the logs when the task is done
* removed teh flush logevent
flushig is now done by sending a message to the task_logger directly
moved the initialization of the logger to cmd.rs
* build fix
* include a duration in the flush message
* exit with a done state instead of panicing
Attempt to speed up CI builds:
1. Disable incremental builds when using `sccache` (incremental can't be cached)
2. Set `--locked` on all invocations of cargo
3. Add `restore-keys` for Github cache action