Граф коммитов

1959 Коммитов

Автор SHA1 Сообщение Дата
Patrick Hallisey 2fba9d599f
Sync eng/common from azure-sdk-tools (#1783)
* In sync as of da75627391
* Adjust for changes in eng/common
2024-08-29 15:36:09 -07:00
Heath Stewart 2593adb170
Fix some all-features build issues (#1782) 2024-08-29 20:48:19 +00:00
Patrick Hallisey 3c2055050e
Fix breaks in build (#1776) 2024-08-28 16:41:07 -07:00
Patrick Hallisey c1065e80b0
Fix packageInfoPath parameter (#1774) 2024-08-28 16:03:13 -07:00
Patrick Hallisey 4ff0cd28d1
Add ADO pipeline scaffolding (#1762) 2024-08-28 21:58:33 +00:00
Bryan A. Pendleton b16e8790a1
Allow setting custom properties in service_bus send_message() (#1758)
* Allow setting custom properties in service_bus send_message()

* Format corrections.
2024-08-28 14:19:06 -07:00
Ashley Stanton-Nurse bddff2b6c5
Take 2: Refactoring Response<T> to collapse json/xml methods (#1724)
* use Response's type parameter as a marker type for the body, but don't actually deserialize

* make pipeline send generic to improve type inference and reduce need for map_body

* fix doctest

* change read_body/map_body into deserialize_body/deserialize_body_into

* fix issues after rebasing

* refmt and fix compile issue

* rename FromResponseBody to Model

* fix toml spacing

* address pr feedback

* set_ -> with_

* fix formatting again :(
2024-08-26 14:34:07 -07:00
Patrick Hallisey fe3cbf037c
Sync eng common to 969d7f19c7 (#1769) 2024-08-26 12:34:21 -07:00
Heath Stewart 3eac99ed00
Add back missing public exports (#1764)
* Add back missing public exports

* Correct a few more types
2024-08-22 18:58:04 +00:00
Ashley Stanton-Nurse 4bd71b04c2
make scripts more portable across linux distros (#1761) 2024-08-20 15:15:23 -07:00
vincenttran-msft 3919d43ef9
Add `BearerTokenCredentialPolicy` to `azure_core` (#1726) 2024-08-16 15:01:51 -07:00
Heath Stewart c73169f3a0
Refactors most of azure_core to typespec (#1751)
* Refactors most of azure_core to typespec

Little was modified when moving types and functions. Of what little was modified, most types were either separated from unrelated topics - like streams from HTTP - or better consolidated into fewer submodules to avoid complicating the module hierarchy.

`TelemetryOptions` was temporarily removed. Because `ClientOptions` was moved to `typespec_client_core` but telemetry considered Azure-specific by most other Azure SDK languages, we need to figure out how to pass this in an unbranded way. Since it basically just sets the `User-Agent` HTTP header, perhaps we can make it more generic and optional.

* Fix resolution errors on Noop client

* Fix build breaks from dependencies

* Add unconditional checks of Azure retry headers

This restores the checks for Azure-specific headers.
2024-08-16 11:09:57 -07:00
Patrick Hallisey 78057cb816
Sync eng/common (#1745) 2024-08-14 14:06:17 -07:00
Brian Caswell 4d5a7a0bda
move is_expired to be a method on AccessToken (#1752) 2024-08-14 16:35:17 -04:00
Larry Osterman 4e3d3d4444
Added some AMQP types that were missed in the initial conversion, but… (#1748)
* Added some AMQP types that were missed in the initial conversion, but are needed for C++ interoperability
2024-08-13 12:17:31 -07:00
Heath Stewart aca7b8c426
Fix clippy lints (#1749)
Also re-exports time::OffsetDateTime.
2024-08-13 18:28:37 +00:00
Heath Stewart be36fd8d26
Refactor date functions into client core (#1747) 2024-08-13 10:06:51 -07:00
Baptiste Le Morlec 6409e8206d
Adding BrokerProperties when sending message to queue or topic (#1693)
* Adding BrokerProperties when sending message to queue or topic

* PR feedback: BrokerProperties to SendMessageOptions
2024-08-12 22:05:13 +00:00
Heath Stewart 3370430a7b
Add components to rust-toolchain.toml (#1741)
Makes sure these components are always installed when running
`rustup show` or other tools. Adding `rust-analyzer` is questionable,
but enough dev UX uses it's probaby fine and not too slow to acquire on
CI build machines.
2024-08-12 09:30:35 -07:00
Larry Osterman 9b317e1b35
Moved consumer readme to consumer directory (#1742)
* Moved consumer readme to consumer directory

* Moved consumer readme include_str to consumer mod.rs file
2024-08-08 13:37:42 -07:00
Larry Osterman 504d88806c
Added content to the readme for Rust Event Hubs (#1740)
* Added content to the readme for Rust Eventhubs - lost more to come

* Fixed readme.md inclusion

* Added content to the readme for Rust Eventhubs; added documentation for the Consumer module

* Added eventhubs to global cspell

* Cleaned up use of EventHubs service name (it's Event Hubs); moved StartPosition to consumer since it's a consumer construct, not a model construct; Cleaned up doccomments around the tree.
2024-08-06 16:53:49 -07:00
Larry Osterman 7fbd2b8783
First cut at a Rust Eventhubs client. (#1715)
* Initial prototype for eventhubs client

* AMQP Message Serialization tests

* More message serialization tests

* Pr feedback - renamed AMQP implementation feature

* Pr feedback - undid core change

* Updated copyright notices; Simplify error implementation
2024-08-06 14:09:14 -07:00
Heath Stewart a51893ccd6
Add traits with getters for ClientOptions, ClientMethodOptions (#1738)
Resolves #1734, at least temporarily.
2024-08-05 15:24:26 -07:00
Heath Stewart 055e07cb8d
Refactor json and xml mods into typespec crate (#1736)
* Refactor json and xml mods into typespec crate

* Move json, xml mods back up to typespec_client_core

* Fix docs build
2024-08-05 14:23:36 -07:00
Heath Stewart a523ab295a
Refactor general implementation into TypeSpec crates (#1710)
* Refactor general implementation into TypeSpec crates

This is part of the unbranding work across languages. For now we have decided to brand around the "TypeSpec runtime" as some other Azure SDK languages have considered.

* Fix build

* Resolve CodeStyle check issue

* Export http_response_from_body from azure_core

* Fix lint, docs errors
2024-08-02 00:32:40 +00:00
Heath Stewart 9968664b53
Configure and fix spelling issues (#1730) 2024-08-01 17:11:48 -07:00
Andras Pinter 2f22149d38
Update azure-autorust to append path and parameters via URL lib (#1663)
* Update azure-autorust to append path and parameters via URL lib

When returning a URL from Client::endpoint the URL contains a tailing slash
in any case. This is handled by the URL lib which will append the tailing
slash to the end upon calling Display::fmt. Therefore formatting the returned
URL from Client::endpoint will result in a duplicated slash, which could cause
some (not all) Azure endpoints to have some trouble.

For example:
Base URL: https://some-app-conf.azconfig.io/
AppConfigUrl: https://some-app-conf.azconfig.io//keys?api-version=2023-10-01
This resulted in a 404 response.

Removing the tailing slash from the URL manually does not solve the problem,
due to the reason mentioned above.

This patch applies a fix to append (set) the formatted path via rust URL lib,
which will handle the duplicated slash (or any other problem).

* Fix Code Style issue

* Fix Code Style issues for doc-comments

---------

Co-authored-by: Heath Stewart <heaths@microsoft.com>
2024-07-31 00:29:48 +00:00
vincenttran-msft 0b646f1657
[Rust] [Storage] Initial Storage Scaffolding (azure_storage_blob) (#1721) 2024-07-30 17:24:24 -07:00
Rick Winter f013d0cb16
Update CODEOWNERS (#1722)
* Update CODEOWNERS

Adding Ronnie to the catch all. Also adding a specific for .github

* Update .github/CODEOWNERS

Co-authored-by: Heath Stewart <heaths@microsoft.com>

---------

Co-authored-by: Heath Stewart <heaths@microsoft.com>
2024-07-30 23:13:24 +00:00
Heath Stewart 33ebc4c43f
Add @ronniegeraghty to CODEOWNERS (#1725) 2024-07-30 15:22:32 -07:00
Heath Stewart 890667e96a
Fix year in changelog (#1719)
Co-authored-by: Robert Collins <robert.collins@cognite.com>
2024-07-30 15:02:55 -07:00
Heath Stewart 9f8bdda664
Fix new clippy lints (#1723) 2024-07-30 18:29:27 +00:00
Robert Collins 2f7879f706
Fix year in changelog (#1673) 2024-07-29 20:33:30 +00:00
Gürkan İndibay 8344bbf194
Adds Cold as AccessTier option (#1697) 2024-07-29 20:07:58 +00:00
Larry Osterman a7f72044f4
Fixed DefaultAzureCredential CI pipeline error (#1717) 2024-07-26 16:55:04 -07:00
Joel Hendrix 7d89e4eb3f
Add lifetime annotation to ClientMethodOptionsBuilder trait (#1714)
* Add lifetime annotation to ClientMethodOptionsBuilder trait

This allows implementors of the trait to ensure that the lifetime of
context lives at least as long as the trait's implementor.

* remove unused generic type param
2024-07-25 15:59:13 -07:00
Heath Stewart 0a4ef71ca7
Implement client options, method options builders (#1708)
* Implement client options, method options builders

* Fix doc references
2024-07-23 12:53:13 -07:00
Arpad Müller 7a0e20c1e0
Redact the authorization header (#1699) 2024-07-18 18:49:48 +00:00
Heath Stewart a96b6b6243
Fix broken code behind client_certificate feature (#1706)
* Fix ErrorKind::http_response_from_body() was deleted and this code was never built. This uses the new method

* Fix: unwrap authority_host() as we are trying to store a `Url`

* Fix: `log` was not inclueded in the package dependencies. Use tracing to be consistent with the rest of the SDK

* Add check / tests to build all features in CI to prevent dead code

* Fix warnings hidden behind features

* Formatting

---------

Co-authored-by: Alex Kinnane <17098249+akinnane@users.noreply.github.co>
2024-07-17 20:57:23 -07:00
Heath Stewart 6c06ee8472
Move crates into subdirs under service dirs (#1705)
* Move crates into subdirs under service dirs

The exception in this commit is `typespec`, which will likely be a root
project for RFC 3243 (packages-as-namespaces) with packages thereunder.

* Fix e2e_tests.sh
2024-07-17 16:04:08 -07:00
Patrick Hallisey 56f9014314
Add eng/common folder (#1698)
Copied from azure-sdk-tools @ commit [2660560d](2660560dc4/eng/common)
2024-07-11 11:12:44 -07:00
Heath Stewart a296e9a73f
Add "root" crate for TypeSpec (#1695)
* Add "root" crate for TypeSpec

Serves as a package-as-a-namespace for RFC 3243:
https://rust-lang.github.io/rfcs/3243-packages-as-optional-namespaces.html.

We may put common types between possible client- and service-side code
generators in here as well.

* Resolve code style lint

* Use non-Microsoft link

Co-authored-by: Timothee Guerin <timothee.guerin@outlook.com>

* Use typespec link in README

---------

Co-authored-by: Timothee Guerin <timothee.guerin@outlook.com>
2024-07-02 16:00:05 -07:00
Heath Stewart dfceab0055
Implement RequestContent<T> (#1692)
Used in method parameters that take a body.
2024-07-02 20:12:41 +00:00
Heath Stewart 81527ab85e
Standardize directory structure (#1691)
According to guidelines: https://azure.github.io/azure-sdk/policies_repostructure.html
2024-06-28 16:28:52 -07:00
Heath Stewart acbe066e10
Return `Response<T>` from client methods (#1688)
* Define `Response<T>`

This doesn't actually work because object-safe traits can't have methods with type parameters, so refactoring is needed.

* Define separate `RawResponse`, `Response<T>`

* Fix code style check

* Fix wasm32-only code
2024-06-26 10:00:37 -07:00
Heath Stewart a80e97473d
Support hierarchical Context (#1684)
* Support hierarchical Context

Conceptually similar to Go, which was also similarly copied for C++. Instead of being hierarchical, however, which introduces complexity into `len`, `is_empty`, etc. - though we might only want those for testing by GA - this uses a `Cow` to copy the `HashMap` only when necessary.

Closes #1655

* Remove `remove`, keep `len` for tests only
2024-06-25 09:37:43 -07:00
Heath Stewart a133bc7469
Normalize dotfiles (#1682) 2024-06-21 10:41:16 -07:00
David Justice 8c4caa251c
fix the invalid scope by adding .default (#1678)
* fix the invalid scope by adding .default

Signed-off-by: David Justice <david@devigned.com>

* fix nightly warning causing build error

Signed-off-by: David Justice <david@devigned.com>

---------

Signed-off-by: David Justice <david@devigned.com>
2024-06-17 13:11:08 -07:00
Heath Stewart ebb219b29f
Fixes scheduled pipeline (#1671)
* Fixes scheduled pipeline

Fixes #1670

* Always set no_clippy
2024-05-28 16:02:47 -07:00
Heath Stewart 37eb3a3480
No nightly clippy except weekly (#1670)
Also removes dependabot.yml since defaults should be sufficient. This was causing problems with the Azure/azure-sdk-for-rust-pr repo.
2024-05-28 14:56:47 -07:00