Two fixes to scheduling code:
- `GetPool` was not correct for the VM case (this code is possibly legacy and not used any more)
- `BuildWorkUnit` could fetch the same pool multiple times and then fail due to `BucketConfig` mismatch (on `TimeStamp`)
- add a cache to the loop so that we only fetch each pool once
In the Python code there were more validated string types that haven't been properly ported for use in the C# code (such as Region). Add that type back in and improve some others:
- Use `Region` type to represent regions (implicitly convertible to/from the `AzureLocation` SDK type)
- Improve validation of `Container` type to match Azure specs and use it in more places
- Restore/fix validation of `PoolName` type which was previously removed (#2080) due to being too strict: now allows 1-64 ASCII alphanumeric/hyphen/dash
- We want to restrict pool names so that we can use them as disambiguating prefixes for scaleset names (see #2189). Note that underscore is not actually permitted in scaleset names so we will probably end up mapping it to hyphen.
Note that once C#7 lands we will be able to simplify the usage of `ValidatedString` a lot (using static abstract methods).
----
Open questions:
For deserializing from "known-good" places such as table storage or from Azure SDK APIs, should we have an `T.UnsafeAssumeValid(string input)` method which does no validation, to protect us from breakage?
* fix a memory leak
* fix another memory leak
* remove extra queries
* formatting
* do not throw when scale set cannot be updated
Co-authored-by: stas <statis@microsoft.com>
* more tests
* revert compute, since "released" version has bug when creating scaleset extensions
* format
* found bug, i think...
* now should be fixed
Co-authored-by: stas <statis@microsoft.com>
Closes#2314 via two fixes, one for additional properties and one for missing properties:
- Make all request types inherit from `BaseRequest` which has an `ExtensionData` property, and ensure that it is empty in `ParseRequest`.
- Add `[Required]` attribute to non-nullable properties that do not have defaults, and add a test that ensures we have this attribute where necessary.
* more functional tests
* more tests
* bug fixes
* OneFuzz results do not map one to one with datastructures. So add support for multiple datastructures to be returned per API
* more tests
* format fixes
Co-authored-by: stas <statis@microsoft.com>
* porting the proxy state machine
* use async version
* is used
* rename base state to state
* fix auth
fix extension path
* ignore log info in check logs
* Convert exception to warning
* don't save job before creating the log container
* same as the python code
* test fix
* format
* format
* don't schedule the task if the log container is missing
* Port TimerWorkers to C#
* test logs
* ..
* Some VMSS extensions have settings as null
* fix for
Cannot set DoNotRunExtensionsOnOverprovisionedVMs to true on Virtual Machine Scale Set which does not have overprovision enabled.
Co-authored-by: stas <statis@microsoft.com>