Commit Graph

1063 Commits

Author SHA1 Message Date
Daniel Jurek
35950242fb
Remove Manual build reason at the archetype-sdk-client.yml level. The appropriate check is already in place in archetype-cpp-release.yml (#2095) 2021-04-12 08:53:03 -07:00
Azure SDK Bot
2a945c3053
Sync eng/common directory with azure-sdk-tools for PR 1515 (#2088)
* Add lease to runs.
2021-04-12 00:39:39 +00:00
JinmingHu
0fce2f7d68
Fix typo startsOn -> StartsOn (#2099) 2021-04-10 08:20:01 -07:00
Azure SDK Bot
14cc77a963
Sync eng/common directory with azure-sdk-tools for PR 1548 (#2098)
* Remove passing -Mode Complete to deployment

When passing Complete it will remove any resources
already in the resource group that weren't part
of the current deployment. That removal breaks a
lot of assumptions, like multiple deployments when
testing things like smoke-tests or if you are reusing
an existing resource group. We don't want that to happen.

* Remove ServiceDirectory as required parameter for remove/update

When this was made mandatory it broke some usages which didn't
pass the value. Those usages don't need to pass it because
the pass required information in other ways so removing the
requirement for the parameter to be passed.

Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com>
2021-04-09 18:10:44 -07:00
Azure SDK Bot
1ab49d17d0
Fix BaseName initialization (#2096)
Initializing the BaseName with a ServiceDirectory that contains
a "/", because it is a multiple level path, causes the BaseName
initialization code to fail because it doesn't support the
validation pattern.

In all the known cases we already pass the ResourceGroupName
explicitly so don't need to set the BaseName so we can
skip the initialization in those cases.

Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com>
2021-04-09 13:32:50 -07:00
Ahson Khan
5715f750e1
Disable warning C6326 (potential comparison of a constant) in recently added azure-core tests. (#2090) 2021-04-09 06:31:59 +00:00
Ahson Khan
0fd687129e
Make the casing of sections within the Changelogs consistent. (#2072) 2021-04-09 01:17:17 +00:00
Victor Vazquez
5de76e7a21
Fix for Azure Core with libcurl. clean up and global clean up (#1500)
make SDK to call global_init and global_cleanup
2021-04-08 22:55:26 +00:00
Azure SDK Bot
ff0d5a18cd
Increment version for keyvault releases (#2084)
* Increment package version after release of azure-security-keyvault-common

* Increment package version after release of azure-security-keyvault-keys

Co-authored-by: Ahson Khan <ahson_ahmedk@yahoo.com>
2021-04-08 01:19:03 +00:00
Azure SDK Bot
8f45d71c1c
Increment package version after release of azure-identity (#2082)
Co-authored-by: Ahson Khan <ahson_ahmedk@yahoo.com>
2021-04-08 00:57:44 +00:00
Azure SDK Bot
2bf0abd60e
Increment package version after release of azure-core (#2081)
Co-authored-by: Ahson Khan <ahson_ahmedk@yahoo.com>
2021-04-08 00:36:22 +00:00
Victor Vazquez
fae04fa9d2
Keyvault changelog (#2071)
* update chanlog for KeyVault release
2021-04-07 16:33:33 -07:00
Ahson Khan
46c84e3a3f
Update the Azure.Core changelog to be more consise and complete for the beta.8 (#2069)
* Update the Azure.Core changelog to be more consise and complete for the beta.8
release.

* Fix the new feature section since `GetDeadline` was added this release.

* Add note about types moving between header files.

* Make identity related fixes.

Co-authored-by: Victor Vazquez <victor.vazquez@microsoft.com>
2021-04-07 14:41:12 -07:00
Ahson Khan
4ef65aa00f
Add new header files to the simplified header and update tests. (#2070)
* Add new header files to the simplifie header and update tests.

* Add token credential options header to the simplified header

* Simplify the test.
2021-04-07 21:28:22 +00:00
Ahson Khan
fb000d55b5
Use consistent pascal casing and rename HKEYHolder to HkeyHolder. (#2067)
* Use pascal casing and rename HKEYHolder to HKeyHolder.

* Rename hkeyholder header to hkey_holder to be consistent with others,
and update callers.
2021-04-07 13:30:05 -07:00
JinmingHu
1408064c7a
Add changelog for #2060 (#2063)
Coauthor: Ahson Khan <ahson_ahmedk@yahoo.com>
2021-04-07 19:17:02 +00:00
Victor Vazquez
8b17de0f14
update changelog for release beta - Core and Identity Beta (#2005)
* update changelog for release beta
2021-04-07 18:50:26 +00:00
Victor Vazquez
17c17c9b69
Update ssl name (#2066)
* raname

* changelog
2021-04-07 18:25:13 +00:00
JinmingHu
a786595565
move HttpGetter and HttpGetterInfo to internal namespace (#2060)
* move HttpGetter and HttpGetterInfo to internal namespace

* move to _internal
2021-04-07 04:59:31 +00:00
JinmingHu
aa0a388e98
small fix: const Type& to be consistent (#2061) 2021-04-07 04:22:53 +00:00
Ahson Khan
4db9a563e7
Removed Azure::Core::Context::HasKey() and add TryGetValue() instead (#2037)
~@vhvb1989 This change is blocked until after the retry policy implementation has been updated. Let me know once you have that PR available.~

Fixes https://github.com/Azure/azure-sdk-for-cpp/issues/2036
2021-04-07 03:23:34 +00:00
Ahson Khan
bb87bd1f19
Removed Url::AppendQueryParameters() since it is no longer used within the SDK. (#2054)
* Remove  since it is no longer used.

* Update usage in test.

* Update usage of append qp in tests.

* Address PR feedback.
2021-04-07 03:02:22 +00:00
Ahson Khan
aba89c5a32
Remove Azure::Core::Http::Request::GetHeadersAsString(). (#2056)
* Remove Azure::Core::Http::Request::GetHeadersAsString().

* Address PR feedback.
2021-04-07 02:05:57 +00:00
Ahson Khan
304300c928
Removed GetUrlWithoutQuery() and GetUrlAuthorityWithScheme() from Azure::Core::Url and added GetScheme(). (#2055)
* Removed GetUrlWithoutQuery() and GetUrlAuthorityWithScheme() from
Azure::Core::Url and added GetScheme().

* Address PR feedback.
2021-04-07 01:48:33 +00:00
Daniel Jurek
5a99f38df1
Add nightly vcpkg publishing (#2025)
* Tool changes to support nightly test package release

* Initial wiring up and refactor vcpkg-publish.yml

* Use vcpkg-clone.yml

* Disable publishing for verification of nightly builds

* Complete the comment

* Dependency is enforced at the stage level, not the deployment/job level

* Remove environment, no approval needed

* Add ability to enable test release parameters

* deploy -> job

* deployment -> job

* Remove strategy

* Download pipeline artifacts

* task -> download

* Set appropriate working directory

* git status

* Set working directory

* Add pipeline for nightly vcpkg PR update

* Correct vcpkg-clone.yml path

* Add identity parameters to git merge commands

* Remove GitIdentityParameters, the merge command does not suppor tthem. Add instead in the pipeline

* Split lines

* Write-Host

* Template for nightly branch name, update comments, Check for scheduling or "PublishNightlyVcpkg"

* include archetype-cpp-release.yml changes

* Re-enable publishing stage

* Close the and

* Runtime condition for integration stage

* Move integration below package publishing stages

* try -- to disambiguate

* ^ -> ~

* Remove --

* Documentation and variable naming

* Move documentation comment

* Update eng/pipelines/templates/steps/generate-nightly-branch-name.yml

Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>

* Review feedback

* Add ability to skip all release steps

* Equal sign

* The right number of dashes

* Checkout before merge

* Checkout the default branch

* --no-ff

* git reset

* Skip publishing for artifacts which are not publishign to vcpkg

* Add git config --unset

* Apply suggestions from code review

Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>

* Review feedback

* Review feedback

* Remove extra reset

* TestRelease -> DailyRelease

Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
2021-04-06 14:48:32 -07:00
Ahson Khan
38d3535a1e
Changed the Azure::Core::Http::HttpMethod regular enum into an extensible enum class. (#2048)
* Changed the `Azure::Core::Http::HttpMethod` regular enum into an extensible enum class.

* Update CL to mention removal of HttpMethodToString.

* Delete the default http method ctor.
2021-04-06 03:53:05 +00:00
JinmingHu
a930b7a4f1
remove all usage of AppendQueryParameters (#2050) 2021-04-06 03:34:02 +00:00
JinmingHu
fcc6c2024f
server timeout support (#2010) 2021-04-06 03:19:04 +00:00
Ahson Khan
e3e4451920
Be explicit when using private for fields and methods in classes. (#2043) 2021-04-05 20:05:44 -07:00
Victor Vazquez
cb39ec302c
Update RetryPolicy logic to use only one context (#2047)
* progress

* missing

* fix comp errors

* remove comments

* Bad merge with my recent changes to master

* Format

Co-authored-by: Ahson Khan <ahson_ahmedk@yahoo.com>
Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
2021-04-05 19:50:17 -07:00
Anton Kolesnyk
3b36c9091a
Add policy tests (#2009)
Closes #271
Closes #1570
Closes #1596
2021-04-06 02:10:30 +00:00
Ahson Khan
93bc8c4218
Make the Context parameter optional in BodyStream public Read methods. (#2046)
* Make the Context parameter optional in BodyStream public Read methods.

* Add some basic unit tests.

* Fix end of line.
2021-04-06 01:40:14 +00:00
Ahson Khan
d638d1ff3d
Move package version to details, and rename VersionString() to ToString(). (#2042) 2021-04-06 00:50:25 +00:00
Ahson Khan
63b2d21bc6
Renamed Azure::Nullable<T>::GetValue() to Value(). (#2034)
* Renamed `Azure::Nullable<T>::GetValue()` to `Value()`.

* Update clang formatting.
2021-04-05 15:42:14 -07:00
Anton Kolesnyk
c5ddbbc430
Changes around context expiration naming and types (#2033)
This would unblock #2010.

Closes #2032.
Closes #1880.

I know this comes out of the blue, but it seems to me the right change to do. This is a proposal, let me know what you think.

First, I started with the fact that we need to make `CancelWhen()` public.
Then, I realized that I don't like the `CancelWhen()` naming. `CancelAt()` is better?
But `CancelAt()` sounds like an order to do something, not as getter.
So, it should be named `Get...`. `GetCancelWhen()`? `GetCancelAt()`? Sounds strage.

`GetDeadline()` - not bad, bit it is not that clear, what the deadline is.
And I looked at the `WithDeadline()` method. And in comment, the first line is `@brief Create a context with expiration.`.
"Expiration" sounds better explanation for the essense of the "deadline".

So, I went with `GetExpiration()`. I think "Expiration" is also a better name, because should we want to add the method called "bool IsExpired()", it comes naturally using the existing terminology, sounds better than "`IsPastDeadline()`".

Next thing - if we have "`GetExpiration()`", it is strange to have a method called `Get()`. So, we have `WithExpiration()` and `WithValue()`. So, it sounds like the getter should be called `GetValue()`. I did that rename as well.

Then, I looked at "`With...`" method naming. It is a factory method. If for getters we have `Get`, then for factory methods we should have `Create`. So, I renamed `WithExpiration()` and `WithValue()` to `CreateWithExpiration()` and `CreateWithValue()`.

Then I looked at `Context::time_point` typedef. First, in general, if we can avoid public typedefs, it is better, because we don't need to document them and worry if we broke client code when we change them.
Second, it is strange that we use `Azure::DateTime` everywhere, but not in context.

So, I replaced it with `Azure::DateTime`. It is good because it allows us to drop to/from epoch conversions (#1880), and really all that extra dance we do to cast to representation and back to datetime is the ways to stay within legal type casting limits of compiler type declaration, while in reality there isn't much that is happening in the code: `DateTime` is essentially an `int64`, and with all these conversions to epoch time, then to representation and back, compiler does not generate real code, it still operates with that only `int64`.

Why we cast to `DateTime::rep` and back at all? Context stores it as `atomic`, and I am not questioning that. You can't get `std::atomic<DateTime>` today explicitly, so we "extract" representation (`int64`) and store it as `std::atomic<DateTime::rep>`, which is the same thing as `std::atomic_int64`.

-- Update: --
1. "Expiration" => "Deadline" (Jeffrey's request)
2. Added `Context::HasExpiration()` (response to Jinming) // plus, we do have `HasValue()` so why not have `HasDeadline()`.
3. `WithDeadline()`, `WithValue` => Two overloads of `CreateChildContext()` (my own initiative).

-- Update 2: --
`CreateChildContext()` => `WithDeadline()`, `WithValue`

-- Update 3: --
Removed `HasDeadline()`
2021-04-05 21:24:40 +00:00
Victor Vazquez
dfdaf25223
[Core] Refactor RequestFailedException with Http information (#2026)
* KeyVault Exception
2021-04-05 12:11:31 -07:00
Anton Kolesnyk
a7fdea42e6
Introduce Context::Key with pointer comparison speeds (#1988) 2021-04-05 11:26:50 -07:00
Azure SDK Bot
642c311676
Use single quotes for matrix generator command line arguments (#2028)
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
2021-04-05 12:53:33 -04:00
Victor Vazquez
308e5363ad
remove the common namespace from keyvault (#2029) 2021-04-02 06:02:23 +00:00
Victor Vazquez
2348ad9d5a
update links for samples (#2021) 2021-04-02 05:03:28 +00:00
Anton Kolesnyk
36ed1e18fa
Add live tests for Identity (#2011) 2021-04-01 17:32:43 -07:00
Azure SDK Bot
0c1ec5c69e
Sync eng/common directory with azure-sdk-tools for PR 1525 (#2015)
* Use SubscriptionId throughout TestResources

Fixes #1454

* Resolve PR feedback

* Default DeleteAfterHours to 48 for SDK team

Also makes a few other adjustments for subscriptions, like restoring the previous one if available and another was specified.

* Resolve PR feedback

* Change deployment mode to Complete

Also fixes an issue where if the user opted not to deploy to the same resource group, the script would continue execution anyway.

* Use consistent aka links to satisfy link checker

Only need it for the new Update-TestResources.ps1 script, but I wanted them to look consistent.

Co-authored-by: Heath Stewart <heaths@microsoft.com>
2021-04-01 09:39:24 -07:00
Ahson Khan
80e61d8929
Add a forward slash at the end of the key vault URL to match what the portal returns. (#2017)
* Add a forward slash at the end of the key vault URL to match what the portal returns.

* Don't add the extra `/` in the expected token within tests.

* Fix another instance of extra `/`.

Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
2021-04-01 01:21:50 -07:00
Ahson Khan
0a68af6c1f
Add error checking around std::getenv for KeyVault tests (#2019)
* Add error checking around std::getenv for KeyVault tests

* Revert unrelated change.
2021-04-01 03:43:16 +00:00
Victor Vazquez
cd4ea9966d
remove verbose config from win ci (#2002) 2021-04-01 01:32:26 +00:00
Ahson Khan
8095d85e67
Simplify the public surface design of Response<T> for usability. (#1974)
* Simplify the design of Response<T> for usability.

* Revert changes to operation<T> to keep the changes single purpose.

* Update many of the response<T> call sites based on API changes.

* Update all remaining callsites and fix clang formatting.

* Update Response<T> documentation.

* Fix clang formatting.

* Remove status code from the Response<T> public surface area.

* Update the changelog.

* Fix up CL wording and remove commented-out change to operation<T>.

* Fixed test by actually calling a method.

* Fix up key vault test by not taking ownership of raw response.

* Fix call to get status code in test.

* Add new line at end of keyvualt live test file.

* Make a local copy within keyvault pipeline to avoid compilers re-ordering things.

* Make the fixes to the recent keyvault changes.

* Fix key vault pipeline to address ImportKey test failure
2021-04-01 00:50:04 +00:00
Victor Vazquez
41be347002
remove-http-response-apis (#1998)
* remove-http-response-apis
2021-03-31 23:53:38 +00:00
Victor Vazquez
bae16450c9
update 3rd party httpbin server for inhouse instance (#1935)
* update 3rd party httpbin server for inhouse instance
2021-03-31 16:35:03 -07:00
Anton Kolesnyk
ddd7a093f4
Move policies to internal (#1985) 2021-03-31 12:56:33 -07:00
Daniel Jurek
e396888726
Manually install gcc and g++ 8 if needed (#2012) 2021-03-31 18:36:44 +00:00