Commit Graph

1038 Commits

Author SHA1 Message Date
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
Azure SDK Bot
fcbaf7301c
Sync eng/common directory with azure-sdk-tools repository (#2014) 2021-03-31 11:19:45 -07:00
JinmingHu
0cd405d064
changelog (#2008) 2021-03-31 14:49:42 +08:00
Victor Vazquez
a4ae81708b
[Keyvault] APIs (#1967)
Adding the next APIs:

UpdateKeyProperties, fixes: #1541
GetPropertiesOfKeys , fixes: #1542
GetPropertiesOfKeyVersions, fixes: #1543
GetDeletedKeys, fixes: #1546
PurgeDeletedKey, fixes: #1547
StartRecoveryDeletedKey, fixes: #1548
BackupKey, fixes: #1549
RestoreKeyBackup, fixes: #1550
ImportKey, fixes: #1551
Add samples, fixes: #1987
2021-03-30 20:12:48 +00:00
Victor Vazquez
7490709db4
test for Context heap integrity (#1999) 2021-03-30 18:52:47 +00:00
Azure SDK Bot
0990a8599e
Add DependsOn parameter to matrix job generation template (#2001)
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
2021-03-30 11:25:11 -07:00
Anton Kolesnyk
0665efe0fe
unique_ptr Get() => Extract() || Send() || ExtractOrCreate() (#1984) 2021-03-30 10:17:24 -07:00
JinmingHu
b9c5c978ee
refine impl of rename file/directory (#1991)
* fix bug: / was left out in rename source

* refine impl of rename file/directory
2021-03-30 11:58:33 +08:00
JinmingHu
88499ab1b6
fix user-agent (#1990) 2021-03-30 01:35:50 +00:00
Anton Kolesnyk
b606ff60dc
Add ADFS support for ClientSecretCredential (#1947) 2021-03-29 17:26:42 -07:00
Azure SDK Bot
b4110380f0
Sync eng/common directory with azure-sdk-tools for PR 1477 (#1981)
* Checked in the changes directly.

* Address feedback and remove the check of set-default-branch

* Fixed base repo branch

* Update git-branch-push.ps1

* Fixed the docs-metadata-release

* Change the typo

* Update eng/common/scripts/git-branch-push.ps1

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

* Keep origin format

* Update git-branch-push.ps1

* Keep fixing the typo

Co-authored-by: Sima Zhu <sizhu@microsoft.com>
Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
2021-03-26 17:30:54 -07:00
Azure SDK Bot
24f44838a8
Sync eng/common directory with azure-sdk-tools for PR 1521 (#1982)
* Fix issue where 2d index arrays with length 1 get flattened by powershell

* Pass NonSparseParameters to imported matrix generation

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
2021-03-26 12:52:31 -07:00
Azure SDK Bot
8d435df2d3
Support default branch for the workflow. Part 1 (#1979)
Co-authored-by: Sima Zhu <sizhu@microsoft.com>
2021-03-26 10:28:32 -07:00
Azure SDK Bot
f1688491d9
Sync eng/common directory with azure-sdk-tools for PR 1508 (#1956)
* Skip API create step when running from feature branch with non GA version
2021-03-26 01:40:47 -07:00
Azure SDK Bot
ea57783e05
Sync eng/common directory with azure-sdk-tools for PR 1478 (#1978)
* actually pass the _content_ of the reviewers or teamreviewers variable within create-pull-request.yml, update logic in Set-GitHubParameter
2021-03-26 01:25:26 +00:00
Azure SDK Bot
c0769b8e33
Sync eng/common directory with azure-sdk-tools for PR 1517 (#1977)
* Add chagelogpath to Update-ChangeLog.ps1

* Make PackageName and ServiceDirectory not mandatory, test ChangelogPath

Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>
2021-03-25 15:52:00 -07:00
Chidozie Ononiwu
e25807adc2
Cleanup language settings file (#1968)
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
2021-03-24 14:51:44 -07:00
Chidozie Ononiwu
7d9032fcc8
Add flag for closing the pull request immediately after opening it (#1965) 2021-03-24 09:52:36 -07:00
Azure SDK Bot
d28d52b058
Increment version for storage releases (#1969)
* Increment package version after release of azure-storage-common

* Increment package version after release of azure-storage-blobs

* Increment package version after release of azure-storage-files-datalake

* Increment package version after release of azure-storage-files-shares

* Revert the ordering change for beta.6.

Co-authored-by: Ahson Khan <ahkha@microsoft.com>
Co-authored-by: Ahson Khan <ahson_ahmedk@yahoo.com>
2021-03-24 02:06:06 +00:00
Ahson Khan
4b59728e72
Update sdk/storage codeowners list to use the up-to-date GitHub alias (#1971) 2021-03-24 01:56:56 +00:00
Ahson Khan
82dd53f3b1
Fix the date in the changelog for storage beta.6 packages using the correct year to avoid auto version bump PR re-ordering it (#1970)
* Fix the date in the changelog for storage beta.6 packages using the correct year to avoid auto version bump PR re-ordering it

* Fix the year for common beta.6

* Fix the CL year for shares beta.6

* Fix the CL year for datalake beta.6
2021-03-24 01:48:00 +00:00
Victor Vazquez
d6cd0af3cc
remove value policy from core (#1917) 2021-03-23 22:31:54 +00:00
Azure SDK Bot
b6c354f435
Sync eng/common directory with azure-sdk-tools for PR 1514 (#1960)
* Handle null values when generating display names

* Fix issue processing matrices where the base matrix is only an import

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
2021-03-23 12:51:00 -07:00
Chidozie Ononiwu
3d1a58e3f8
Fixup CHANGELOG.md, add SetPackageVersion, add calls to set-test-pipe… (#1936)
* Fixup CHANGELOG.md, add SetPackageVersion, add calls to set-test-pipeline-version.yml

* Run set-test-pipeline-version.yml per artifact, open testpipeline as draft

* git diff to view changes in file

* Move set-test-pipeline-version.yml after Validate Clang Format

* remove second artifact loop in archetype-cpp-release.yml
2021-03-23 11:34:30 -07:00
Azure SDK Bot
eb1177ea3a
Add ReleaseTrackingOnly option to Prepare-Release (#1958) 2021-03-22 20:21:13 -07:00
JinmingHu
417dde4144
mint storage beta 9 (#1957) 2021-03-23 10:15:45 +08:00