Commit Graph

957 Commits

Author SHA1 Message Date
Ahson Khan
c3265d3e5b
Fix input validation check for TimeFractionFormat in the DateTime ToString method (#5927)
* Fix input validation check for TimeFractionFormat in the DateTime ToString() method.

* Add changelog entry.

* Use switch-case instead of static casting the enum values.

* Address CL PR feedback.

* Fix the features added CL to put ResourceIdentifier in the right release.

* Address PR feedback - use type traits
2024-09-10 14:35:07 -07:00
Ahson Khan
ea3f1442b2
Move the ResourceIdentifier type from Azure::Identity to Azure::Core. (#5864)
* Move the ResourceIdentifier type from Identity to Azure::Core.

* Fix the namespace in the source cpp file.

* Fix managed identity credential tests.

* Fix clang format.
2024-09-05 15:22:18 -04:00
Anton Kolesnyk
6ae78faec8
Update Uuid parameter name, and improve tests (#5943)
* Update Uuid parameter name, and improve tests

* Update sdk/core/azure-core/inc/azure/core/uuid.hpp

Co-authored-by: Rick Winter <rick.winter@microsoft.com>

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
Co-authored-by: Rick Winter <rick.winter@microsoft.com>
2024-08-27 18:40:54 -07:00
Anton Kolesnyk
91608bb5dc
Uuid::operator==(): self-comparison optimization, and more tests (#5939)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-08-27 14:22:21 -07:00
Anton Kolesnyk
ee0c7565df
Uuid: add default ctor and Parse() (#5935)
* Uuid: add default ctor and Parse()

* Fix merge, integrate better

* nano-optimization for IsNil()

* Changelog

* Pedantism

* GCC fix

* GCC fix (include <stdexcept>)

* PR feedback

* Update sdk/core/azure-core/test/ut/uuid_test.cpp

Co-authored-by: Rick Winter <rick.winter@microsoft.com>

* Comments for bad tests

* Add doxygen comments

* One more constexpr, and clang-format

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
Co-authored-by: Rick Winter <rick.winter@microsoft.com>
2024-08-23 23:15:24 -07:00
Ahson Khan
d8b555a670
Optimize Uuid.ToString() by avoiding using sprintf to do the basic string transformation (#5925)
* Optimize Uuid.ToString() to use a cached value on multiple calls.

* Add tests which call ToString() multiple times.

* Optimize Uuid::ToString by avoiding using sprintf.

* Assert all byte values will fit into a hex character.

* Update comment in test.
2024-08-22 17:34:17 -07:00
Larry Osterman
ef538101f2
V2 of integrating uAMQP vixes into vendored copy (#5931) 2024-08-21 12:19:31 -07:00
Larry Osterman
d74b08f8b3
AMQP static analysis fixes (#5918)
* AMQP static analysis fixes?
2024-08-16 20:49:06 -07:00
Ahson Khan
54a7bc363b
Add support for providing an object ID to ManagedIdentityCredential. (#5910)
* Add support for providing an object ID to ManagedIdentityCredential.

* Update cspell checks.

* Add support for creating a Uuid from a string, and use that as the
MICred overload for objectId.

* Add a remark comment to make it clear that object and client ids are not interchangeable.

* Remove the non-const ToString() as that isn't required.

* Update tests to use valid hex Uuid values.

* Use a discriminated union design approach with a ManagedIdentityType
object and ManagedIdentityIdType enum.

* Fix typo and remove Uuid CreateFromString.

* Address PR feedback.

* Update doc comment.

* Update comments and exception message to consistently use hyphens
between user/system and assigned.
2024-08-16 20:47:05 -07:00
Larry Osterman
863e2b2b91
Ported uAMQP changes to vendored copy of uAMQP (#5917) 2024-08-15 22:28:08 -07:00
George Arama
70dc0ebecb
Log policy extra headers (#5868)
* log policy extra headers

* failing test

* adding back WWW-Authenticate

* changelog update

* Update sdk/core/azure-core/CHANGELOG.md

Co-authored-by: Ahson Khan <ahkha@microsoft.com>

---------

Co-authored-by: Ahson Khan <ahkha@microsoft.com>
2024-08-07 17:40:37 +00:00
Azure SDK Bot
cd385362f9
Increment package version after release of azure-core (#5870)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-08-01 22:38:35 +00:00
Anton Kolesnyk
8fdb1fcd57
Azure Core August Beta Release (#5858)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-08-01 14:11:08 -07:00
George Arama
34c2441523
Enable UseFederatedAuth by default (#5852)
* enable use federated

* 401 unauthorized

* 401

* cleanup readmes

* DISABLE RUN

* Remove UseFederatedAuth overrides from ci.yml

* DISABLE RUN for admin samples,
2024-07-31 17:10:39 -07:00
Anton Kolesnyk
2c0a35dad4
Undo unnecessary Core vcpkg dependency version bump (#5860)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-07-31 22:23:29 +00:00
Anton Kolesnyk
d32aab96eb
Acknowledge community contributions in changelogs (#5850)
* Acknowledge cusomer contributions

* Update cspell

* Add more contributors

* More cspell

* Update contributions

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-07-31 13:44:28 -07:00
Robert Schulze
401b97e0ac
Remove unneeded <regex> includes (#5851)
* Remove unneeded <regex> includes

* Fix build (hopefully)
2024-07-31 13:07:47 -07:00
Anton Kolesnyk
0f62b3aa63
Add consumption-time value of __cplusplus to User-Agent (#5662)
* Add consumption-time value of __cplusplus to User-Agent

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-07-29 18:31:51 -07:00
Larry Osterman
90089ad326
Cleaned up Azure::Core::Context API surface (#5676)
* Deprecated Azure::Core::ApplicationContext because its use is confusing and inconsistent with the original design. 

---------

Co-authored-by: Rick Winter <rick.winter@microsoft.com>
Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
Co-authored-by: Ahson Khan <ahkha@microsoft.com>
2024-07-17 12:38:30 -07:00
Larry Osterman
2b987eeed8
Improve code coverage numbers by excluding some options (#5805)
* Potentially improve code coverage numbers by excluding some options

* Removed dead lines; replicated switches to both gcovr executions

* added link to gcovr branch coverage faq
2024-07-17 18:36:10 +00:00
Anton Kolesnyk
e47e3168fe
Acknowledge community contribution in the changelog (#5797)
* Mention community contribution in the changelog

* cspell

* Remove double spaces

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-07-15 18:45:06 +00:00
Azure SDK Bot
fb6c039f5e
Increment package version after release of azure-core (#5794) 2024-07-12 21:34:14 +00:00
Anton Kolesnyk
6b9e1cc691
Revert commits related to the new RetryPolicy method (#5793)
* Revert "Update the RetryPolicy for the GA release, keeping ShouldRetry extension point hidden. (#5771)"

This reverts commit 9ccd206ff8.

* Revert "Update the RetryPolicy and ShouldRetry customization logic to allow loosening the retry condition. (#5656)"

This reverts commit f1d95520d1.

* Do not remove changelog entry from a previous beta release

* Revert "Add a virtual ShouldRetry method to the RetryPolicy for customization. (#5584)"

This reverts commit ab90ef68b0.

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-07-12 12:03:43 -07:00
Anton Kolesnyk
e8c7c559d9
Azure Core July GA Release (#5792)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-07-12 10:24:12 -07:00
Ahson Khan
9ccd206ff8
Update the RetryPolicy for the GA release, keeping ShouldRetry extension point hidden. (#5771)
* Update the RetryPolicy for the GA release, keeping ShouldRetry extension
point hidden.

* Mark test helper virtual functions private, so they aren't
accessible/callable by callers.

* Update the changelog.

* Update CL.
2024-07-11 17:39:37 -07:00
George Arama
313fb0e58f
Move tests to use azure pipeline credentials (#5754)
* test1

* hgdfchg

* remove the remnants of azure client secret

* test KV with federated auth

* UseFederatedAuth

* fdsa

* kv template with managed

* try try again

* retry permissions

* add net acls

* blunt force replace the resource json

* put back stuff

* trey again with new method

* attempt

* missed something

* flip if else

* Temporarily use empty sub config file path for preview cloud

* remove client secret

* try to fix the identity tests

* live skip failing tests and return in samples

* samples for identity fix

* disable failing samples in identity

* fix winhttp failing test

* comment out code

* remove managed identity

* restore version from main

* revert readme changes

* PR comments

* test 2

* clang

* attempt default creds with pipeline chanined

* clangs

* identity test and clangs

* oops

* live

* cleanup

* reter

* test

* revert the DAC change

* missed one

* taking the samples to a farm upstate

* PR comments

* Fix bad merge

---------

Co-authored-by: Daniel Jurek <djurek@microsoft.com>
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
2024-07-11 17:38:19 -07:00
Anton Kolesnyk
22f5135d4c
Update vcpkg SHA (#5772) 2024-07-11 22:57:06 +00:00
Robert Schulze
8f26ebb8a8
Add missing include (#5766) 2024-07-08 09:17:46 -07:00
George Arama
0b5b5ac951
Json library update and Xcode15 (#5681)
* Move up macos and xcode version

* first pass

* to trigger builds, some other issue

* rewrwe

* Remove MSVC compiler warning suppressions in KeyVault

The code within the `mocked_transport_adapter_test.hpp` file, specifically within the `Azure::Security::KeyVault::Keys` namespace, has been updated. The `#if defined(_MSC_VER)` preprocessor directive along with its associated `#pragma warning(push)` and `#pragma warning(disable : 4996)` directives have been removed. The corresponding `#pragma warning(pop)` directive has also been removed. The lines of code that were between these preprocessor directives remain unchanged. These changes remove specific compiler warning suppressions for MSVC compilers, but do not alter the functional behavior of the code.

* dassa

* Add UseDotNet@2 where test proxy might run on a macos agent

* test CI

* fsd

* dasdas

* gregre

* gerregr

* ffdsfsd

* fwefew

* fewfwew

* reter

* fewfew

* fwefwe

* rewrw

* rwe

* temp move build step to exec faster

* gdfgd

* fsdfd

* fdsfs

* dgdf

* Roll forward instead of installing .NET 6

* remove manual install

* rewrew

* gfdffg

* rewrwe

* gfdgd

* fdsfs

* gfdgdf

* tertre

* dasda

* try http for test proxy

* revert readmes

* rew

* rew

* fdsfsd

* ewrew

* revert storages

* KV

* opentelemetry

* remove warnbing

* anton comments

* unit tests

* clangs

* clang

* comment out some asserts

* restore originals

* updated tests

* clangs

* restore cmake

* test

* Remove manual workaround (eng/common change fixes this)

* test2

* the fix doesn't work, need to put back

* Remove DOTNET_ROLL_FORWARD

* annotate macro , put back DOTNET_ROLL_FORWARD

* remove leftover files

* reww

* update changelog

* remove left over file

* remove some doxygen comments

---------

Co-authored-by: Daniel Jurek <djurek@microsoft.com>
2024-06-18 08:26:28 -07:00
Anton Kolesnyk
ef9d2a5e18
Remove 'include windows.h' from inc/* (#5691)
* Remove 'include windows.h' from inc/*

* Clang format

* Qualify namespace

* Clean up includes a bit further

* Fix errors

* Clang format

* move out _detail definitions

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-06-07 03:07:10 -07:00
Azure SDK Bot
c5d0549cb5
Increment version for core releases (#5700)
* Increment package version after release of azure-core

* Increment package version after release of azure-core-amqp
2024-06-07 00:07:00 +00:00
Anton Kolesnyk
b43174a05b
Core June Beta Release (#5696)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-06-06 14:42:09 -07:00
Larry Osterman
803ad17e9a
Prepare for June AMQP release (#5697)
* Prepare for June AMQP release

* Update sdk/core/azure-core-amqp/CHANGELOG.md

Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>

---------

Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
2024-06-06 14:41:42 -07:00
Ahson Khan
f1d95520d1
Update the RetryPolicy and ShouldRetry customization logic to allow loosening the retry condition. (#5656)
* Update the RetryPolicy and ShouldRetry customization logic to allow
loosen the retry condition.

* Add CL entry and update doc comment.

* Move WasLastAttempt check out, and add more tests.

* Address PR feedback, remove use of void and unused params.
2024-05-30 11:08:56 +08:00
Larry Osterman
a9526d9375
Minor tweaks to HTTP tests found during Rust HTTP testing (#5658)
* Minor tweaks to HTTP tests found during Rust HTTP testing

* PR feedback
2024-05-23 04:15:05 +00:00
Larry Osterman
4de01d6ed7
Updated AMQP changelog (#5655)
* Updated AMQP changelog

---------

Co-authored-by: Ahson Khan <ahkha@microsoft.com>
2024-05-22 21:27:09 +00:00
Larry Osterman
4fcf09d4ec
Fixed #5536, fixed a test deadlock discovered while testing the fix for 5536, added some diagnostics for uAMQP to help track the problem. (#5651)
* Fixed 5536, cleaned up a bunch of test bugs found during testing of 5536 fix
2024-05-22 11:39:03 -07:00
Ahson Khan
7db4f3ac1c
Remove redundant calls to gtest_discover_tests with default args in AMQP tests (#5644)
* Disable AMQP LinkAttachDetachMultipleOneSession test until it has been investigated.

* Line Coverage is now at 87.8049%.

* Remove redundant calls to gtest_discover_tests with default args in AMQP
tests.

* Revert "Line Coverage is now at 87.8049%."

This reverts commit deb07e74cde7f3e915bbf0de1310d964d60d3154.

* Revert "Disable AMQP LinkAttachDetachMultipleOneSession test until it has been investigated."

This reverts commit 89c8096c906691826d35f6bd0f58d10bdffb6939.
2024-05-21 18:43:41 +00:00
Anton Kolesnyk
fdb8657f41
Add HTTP request version logging, and scope the variables (#5643)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-05-20 14:06:55 -07:00
Anton Kolesnyk
597d12fd6a
Update CHANGELOG acknowledgements with customer contribution (#5640)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-05-20 11:04:35 -07:00
Ahson Khan
f517aabb98
Clean-up the HTTP versions check in response parsing, and don't reuse connections on any response other than HTTP/1.1 (#5608)
* Harden the HTTP versions check in response parsing, validating specifically for 1.1 or 1.0, and throwing otherwise.

* Address feedback - comment was confusing.

* Update sdk/core/azure-core/src/http/curl/curl.cpp

Co-authored-by: Rick Winter <rick.winter@microsoft.com>

* Clarify the http version check and set keep-alive as false instead of throwing for non-http1.x.

* Address PR feedback - add comment snippet, and update log message.

---------

Co-authored-by: Rick Winter <rick.winter@microsoft.com>
2024-05-20 00:23:48 -07:00
Larry Osterman
260ae116cc
Switched blob checkpoint store to use both connection string and token credentials. (#5632)
* Switched blob checkpoint store to use both connection string and token credentials; re-recorded tests using token credentials

* Added environment variable to ci.yml

* Try a slightly different storage url
2024-05-17 19:51:27 +00:00
Ahson Khan
741a71ceee
Update core changelog with attribution for a curl endless loop bug fix. (#5626)
* Update core changelog with attribution for a curl endless loop bug fix.

* Update cspell for contributor github alias.

* Fix typo in json, add a comma.
2024-05-16 12:02:50 -07:00
Anton Popov
5d3f95535a
fix possible endless loop while polling curl socket (#5589) 2024-05-16 12:02:01 -07:00
Ahson Khan
b7ae7b8987
Add retries to DisableCrlValidation test to improve reliability (#5537)
* Add retries to DisableCrlValidation test to improve reliability

* Add some test logging to CurlConnection ctor.

* Fix log level

* Revert changes to curl.cpp

* Reduce attempts to 3 and validate at least one passes.

* Remove unnecessary commented out code to reset CI.

* Remove unnecessary assert that won't fail.

* Remove unused variable.
2024-05-16 18:31:59 +00:00
Ahson Khan
d895f82ef8
Add basic tests for GetMajor/Minor HTTP versions in the response. (#5613)
* Add basic tests for GetMajor/Minor HTTP versions in the response.

* Make the tests parameterized.

* Address PR feedback - add more test cases.
2024-05-16 10:51:50 -07:00
Ahson Khan
6b5a8d1e36
Update CURLCode error to the non-obsoleted value. (#5545) 2024-05-16 17:49:09 +00:00
Ahson Khan
ab90ef68b0
Add a virtual ShouldRetry method to the RetryPolicy for customization. (#5584)
* Add a virtual ShouldTry method to the RetryPolicy for customization.

* Make test hooks virtual again.

* Add unit test for ShouldRetry.

* Fix typo.

* Address PR feedback.

* Revert making the mock'd functions private for non-test builds.

* Add new line.
2024-05-14 01:09:02 +00:00
Azure SDK Bot
3b9574c610
Increment package version after release of azure-core (#5614) 2024-05-13 15:42:57 -07:00
Azure SDK Bot
52737ee6ae
Increment package version after release of azure-core-amqp (#5602) 2024-05-13 17:23:46 +00:00