* Reuse the same session handle for all requests rather than creating a new one each time.
* Move the session handle creation to the transport adapter ctor.
* Update changelog entry.
* Address PR feedback.
* Change CreateSessionHandle to return a local session handle
* Script that automates updating vcpkg betas
* Wire up to pipeline
* Spelling, commentary
* Clone into repo name
* Remove-Item requires the path to exist, even if -Force is specified
* Bootstrap vcpkg
* Arguments to Test-ShouldReleaseToVcpkg.ps1
* More commit
* Escape quotes
* Quote git commit
* Set strict mode
* Use tags
* Actually tag
* Run git commands
* Invoke-Expression
* Onboard releasing package to vcpkg before attempting to isntall from overaly
* temporarily disable matrix generation (30s tasks sometimes runs for 20+ minutes)
* Test-ShouldReleaseToVcpkg.ps1
* Test-Path
* Test vcpkg build, also ensure we push
* Just the tags... low probability of success given that '--' if frequently treated as a separator
* Add ability to skip link verification for tighter inner loop
* Push tag separately
* Unnecessary condition and conjunction
* Base repo owner: Azure
* Specify remote name
* Tighten inner loop
* git remote -v
* workingDirectory
* Go back to two tags and a regular push
* Saving some progress
* Use original push method
* BaseRepoOwner
* Cleanup, put changes in the default branch (vcpkg does not look at refs outside of the default branch)
* Use default branch
* binary cache and manifest
* update packages
* udpate
* add cache to private pipeline
* next try
* aver
* other
* again
* aver quick
* more
* this way
* again
* one more
* print
* test
* use depend
* more deps
* dep
* Apply suggestions from code review
Co-authored-by: Daniel Jurek <djurek@microsoft.com>
* updated to use group variable
* update identity
* end line
* Update vcpkg.json
* Apply suggestions from code review
* cspell
* remove comment
* updates
* make cache mode depend on SAS env var
* map env var only for internal pipelines
* other approach
* what about this
* and this
* try
* amd
* another
* extra step
* typo
* override for internal
* use default succeded
* azure core update manifest
* a
* run cmake-generate nightly as well
* check for SAS
* check cache
* no secret
* fix is secret
* pass explicit
* use secret all the time
* char
* One more
* export
* echos
* last
* array
* remove question
* ok
* weird
* use account key
* substring
* VCPKG_BINARY_SOURCES
* Add module installation
* task:
* Correct pathing for module
* update source gen
* format
* update spelling
* IsWindoows
* Use pwsh
* Cannot clobber with PSModule-Helpers. Attempt plain install
* Attempt plain install
* Revert unnecessary change to Update-DocsMsToc.ps1
* template ready
* curl is required on Windows as well for some CI gates
* attestation
* fix format
Co-authored-by: Daniel Jurek <djurek@microsoft.com>
* Moved samples around to meet new recommendations; added a couple of additional tests.
* Reworked attestation to include RetrieveAttestationValidationCollateral
* Attestation sample readme updates
* TPM doesn't need to retrieve response validation collateral
* Added cautionary warning about the dangers of overriding the TearDown method from inside a test case
* Added attestation team members to codeowners for attestation SDK
* Remove CODEOWNERS from cspell checks
* Don't hold a lock across retrieving the signers over the network
* Updated snippets in readme; clang-format
* Added GetPolicyManagementCertificates
* Added Add and Remove policy certificate
* Added support for Tpm attestation
* Moved TPM to attestation service specific section
* Added support for validation callback
* Updated RequestFailedException documentation
* cp
* cp
* cp
* Enable test proxy for perf tests
* unwanted
* format
* fix docs
* cspell
* parallel support and multi proxy
* update arg name
* more logs
* fix request redirection
* Apply suggestions from code review
Co-authored-by: Ahson Khan <ahkha@microsoft.com>
* run once before record, then after recording on
Co-authored-by: Ahson Khan <ahkha@microsoft.com>
* RequestFailedException includes error information
* Fixed test collateral
* Added changelog entry for new core version; Added tests to verify response message contains all expected fields
* Created extendableenumeration class
* Convert attestation to use extendable enumeration; added test for extendable enumerations
Co-authored-by: Casey Carter <cartec69@gmail.com>
* Set WinHTTP_OPTION_CLIENT_CERT_CONTEXT to enable connections to attestation service
* Set serviceDirectory from environment variables
Co-authored-by: Victor Vazquez <victor.vazquez@microsoft.com>
* Removing the two param RFE ctor, there should be no callers
* Remove the two param RFE ctor from the source file.
* Fix-up unit test and add a changelog entry.
* Remove test that uses the removed ctor.
* Delegate to RFE string ctor and move impl from header to src.
* Removing the two param RFE ctor, there should be no callers
* Remove the two param RFE ctor from the source file.
* Fix-up unit test and add a changelog entry.
* Remove test that uses the removed ctor.
It all started with UWP. The [docs](https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps?view=msvc-170) say: "`Environment variables are not available to UWP apps.`". And it truly won't work, I tried: linker error, the function is simply not present.
So, for a year or so, we were `ifdef`ing everything enivoronment-related: console logger, environment credential, managed identity credential.
And then just recently we wanted to enable our CI for UWP, including tests and samples. And it required to do more ifdefs (in vcpkg, we don't build samples or tests, so that problem did not exist).
It just became more messy. Especially in samples - you can see how we would disable warning with `#pragma warning(disable : 4996)` or defining `_CRT_SECURE_NO_WARNINGS` already, but now came UWP, so we would have to add comment that `getenv()` is not available and make the sample compilation to either fail with clear message, or throw an exception. Plus we would have to detect that we are being compiled on UWP, which also adds visual clutter for reader. You can see how such an irrelevant (for a sample) thing as `getenv` was consuming more and more lines of sample code and reader's attention.
But then! I read docs on more APIs for UWP. And I noticed that on .NET you can read environment variables. So I went and checked Win32 API docs for [GetEnvironmentVariable()](https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getenvironmentvariable) - it says: "`Minimum supported client: ... UWP apps`".
**GetEnvironmentVariable() works on UWP!**
And so does `SetEnvironmentVariable()` (our tests use it, which means we can make all of them work and execute for UWP).
That's good news, but now it would probably be more code: it usually takes more lines to invoke WinAPI, it is no more an one-liner to call `getenv()/setenv()`. So, I encapsulated that into `Azure::Core::_internal::Environment::GetVariable()` and `SetVariable()`. You can see how much less ifdefs is in our code now. Not to mention it works on UWP!
Per team request, that API is SDK-internal. Samples use their own mini-helper project, `get-env-helper` that makes is so that `getenv()` works naturally on Linux and macOS, compiles without warnings and works on Win32, and compiles and works on UWP (using `GetEnvironmentStringsA()`)
If it was for me, I would just make `Azure::Core::Environment::GetVariable()` public and simplify even further, I think it would be beneficial for sample readers (you can see that extra `get-env-helper` stuff adds just a little more visual clutter, compared to nothing). But I can see reasons against that, why team did not want to do it.
* Generate map files in build
* Add .map file artifact publishing
* Add Xlinker to spelling exceptions
* Remove PublishMapFiles from clang builds
* Generate the map file artifact name
* CXX_COMPILER_ID and some logging for Clang which might be linking using the GNU linker by default
* More logging
* Move logging out of conditional
* Logging up high, use OS to determine which link flags to set
* Use linker options specific to AppleClang's context, publish map files for all platforms