Skip to content

Convert most AMQP types to read-only; Significant API surface cleanup.#4640

Merged
LarryOsterman merged 38 commits into
Azure:mainfrom
LarryOsterman:larryo/readonlyconnectionandsession
May 26, 2023
Merged

Convert most AMQP types to read-only; Significant API surface cleanup.#4640
LarryOsterman merged 38 commits into
Azure:mainfrom
LarryOsterman:larryo/readonlyconnectionandsession

Conversation

@LarryOsterman
Copy link
Copy Markdown
Member

Significant cleanup of AMQP internals.

Fixes #4504 #4505.

Pull Request Checklist

Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly:

See the detailed list in the contributing guide.

  • C++ Guidelines
  • Doxygen docs
  • Unit tests
  • No unwanted commits/changes
  • Descriptive title/description
    • PR is single purpose
    • Related issue listed
  • Comments in source
  • No typos
  • Update changelog
  • Not work-in-progress
  • External references or docs updated
  • Self review of PR done
  • Any breaking changes?

@LarryOsterman
Copy link
Copy Markdown
Member Author

Ping :).

… connections; sender and receiver don't use URLs in samples any more; all samples key off environment variables created by new-testresources.ps1
@LarryOsterman
Copy link
Copy Markdown
Member Author

Ping :).

@LarryOsterman
Copy link
Copy Markdown
Member Author

Ping 2 :)

Copy link
Copy Markdown
Member

@antkmsft antkmsft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial review, only 4 files so far.

Comment thread sdk/core/azure-core-amqp/README.md Outdated
Comment thread sdk/core/azure-core-amqp/README.md Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/connection.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/connection.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/connection.hpp
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/connection.hpp
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/connection_string_credential.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/connection_string_credential.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/connection_string_credential.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/connection_string_credential.hpp Outdated
LarryOsterman and others added 4 commits May 23, 2023 17:31
Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
Copy link
Copy Markdown
Member

@antkmsft antkmsft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10 more files reviewed

Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/endpoint.hpp
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/endpoint.hpp
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/link.hpp
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/link.hpp
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/message_receiver.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/models/message_source.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/models/message_source.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/models/message_target.hpp Outdated
Copy link
Copy Markdown
Member

@antkmsft antkmsft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7 more files, bringing the total to 21/70 files reviewed (30%).

Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/network/transport.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/network/transport.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/network/transport.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/session.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/session.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/session.hpp Outdated
Comment thread sdk/core/azure-core-amqp/samples/CMakeLists.txt Outdated
Copy link
Copy Markdown
Member

@antkmsft antkmsft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 14 more files, bringing the total to 35/70 files reviewed (50%).

Comment thread sdk/core/azure-core-amqp/samples/local_server_sample/local_server_sample.cpp Outdated
Comment thread sdk/core/azure-core-amqp/samples/local_server_sample/local_server_sample.cpp Outdated
Copy link
Copy Markdown
Member

@antkmsft antkmsft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 14 more files, bringing the total to 35/70 files reviewed (50%).

Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/endpoint.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/endpoint.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/management.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/management.hpp
Comment thread sdk/core/azure-core-amqp/samples/local_server_sample/local_server_sample.cpp Outdated
@antkmsft
Copy link
Copy Markdown
Member

@LarryOsterman, BTW, if samples do show the usage for the Azure SDK developers, then they can use Core::_internal::Environment, the same way they also do use Amqp::_internal, i.e. once you are user of _internal, the entire _internal surface is available to you. Other thing is if getenv() in samples plays purely a helper role and not the intended use case that we would like to emphasize. Then both are fine.

Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/connection.hpp Outdated
@LarryOsterman
Copy link
Copy Markdown
Member Author

@LarryOsterman, BTW, if samples do show the usage for the Azure SDK developers, then they can use Core::_internal::Environment, the same way they also do use Amqp::_internal, i.e. once you are user of _internal, the entire _internal surface is available to you. Other thing is if getenv() in samples plays purely a helper role and not the intended use case that we would like to emphasize. Then both are fine.

getenv() in these samples plays the exact same role as it does in all the other samples: It allows external configuration of the samples to work with the service.

Copy link
Copy Markdown
Member

@antkmsft antkmsft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

44/88 files reviewed (new 50%)

Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/management.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/message_receiver.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/message_receiver.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/message_sender.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/message_sender.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/message_receiver.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/message_receiver.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/models/message_target.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/models/messaging_values.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/session.hpp Outdated
Copy link
Copy Markdown
Member

@antkmsft antkmsft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! - And sorry it took so long.

Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/connection.hpp Outdated
Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/models/messaging_values.hpp Outdated
Comment thread sdk/core/azure-core-amqp/src/amqp/message_receiver.cpp Outdated
Comment thread sdk/core/azure-core-amqp/src/amqp/private/message_sender_impl.hpp
Comment thread sdk/core/azure-core-amqp/src/amqp/private/message_sender_impl.hpp
Comment thread sdk/core/azure-core-amqp/src/amqp/private/message_sender_impl.hpp Outdated
Comment thread sdk/core/azure-core-amqp/test/ut/connection_tests.cpp Outdated
@LarryOsterman LarryOsterman merged commit 99b1ef5 into Azure:main May 26, 2023
gearama added a commit that referenced this pull request May 30, 2023
* Remove -Login and -PushImages parameters from stress helper (#4615)

* Add Azure OpenAI (#4644)

Co-authored-by: Shawn Fang <45607042+mssfang@users.noreply.github.com>

* move the cleanup config to -SaveInputs parameter on the cli (#4646)

Co-authored-by: m-nash <prognash@gmail.com>

* Fixes for uploading proxy logs (#4652)

Co-authored-by: Bill Wert <billwert@microsoft.com>

* Handle docker hangs and subscription mismatch on acr login (#4653)

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>

* Sync eng/common directory with azure-sdk-tools for PR 6202 (#4651)

* Adding initial commit of TypeSpecE2E common script

* add TODO comment

* Updated per feedback

---------

Co-authored-by: raychen <raychen@microsoft.com>

* added a test helper to test each type for having the expected default operations. (#4627)

* add test helper

* constructible from Args

* restucture ClassTraits to ensure portability of static constexpr

* fix Etags tests and format

* clang format

* Add DefaultAzureCredential auth flow diagram (#4654)

* Add DefaultAzureCredential auth flow diagram

* Update cspell.json

---------

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

* Remove defunct template (#4659)

Co-authored-by: James Suplizio <jasupliz@microsoft.com>

* Convert most AMQP types to read-only; Significant API surface cleanup. (#4640)

* Prep for readonly connection

* Added options for Connection and Session to enable read-only configuration

* Read-only connection and session objects; use message source and target for message sender and receiver

* Enabled read-only session; added tests for incorrect AMQPS port

* Added token reader sample; flushed out eventhubs properties sample, added some timeouts to send async test

* Moved AMQP samples to internal

* Moved samples to use GetEnvHelper

---------

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

* Define a standardized header ordering for Azure SDK for C++ (#4632)

* Standardized header ordering for C++ repo

* Reordered categories to move private headers above public headers; added space between categories to enable future flexibility

* fix flaky storage testcase (#4660)

---------

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Co-authored-by: Shawn Fang <45607042+mssfang@users.noreply.github.com>
Co-authored-by: m-nash <prognash@gmail.com>
Co-authored-by: Bill Wert <billwert@microsoft.com>
Co-authored-by: raychen <raychen@microsoft.com>
Co-authored-by: Jennifer Chukwu <jnyfaah@gmail.com>
Co-authored-by: Scott Addie <10702007+scottaddie@users.noreply.github.com>
Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
Co-authored-by: James Suplizio <jasupliz@microsoft.com>
Co-authored-by: Larry Osterman <LarryOsterman@users.noreply.github.com>
Co-authored-by: JinmingHu <jinmhu@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Removed SetXxx APIs in favor of Options structures for Connection, Session, MessageSender, and MessageReceiver

2 participants