Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add asyncapi_url broker arg #903

Merged
merged 9 commits into from
Nov 1, 2023
Merged

feat: add asyncapi_url broker arg #903

merged 9 commits into from
Nov 1, 2023

Conversation

Lancetnik
Copy link
Collaborator

@Lancetnik Lancetnik commented Nov 1, 2023

Description

Now user can overrides the original broker url in AsyncAPI schema only with asyncapi_url broker argument

It can be extremelly hepful to hide connection credentials in a public documentation

broker = RabbitBroker(
    "amqp://guest:guest@localhost:5672/",
    asyncapi_url="amqp://****:****@localhost:5672/",
)

Also, in the RMQ case, keyword arguments are overrides the original url, so

broker = RabbitBroker(
    "amqp://guest:guest@localhost:5672/",
    host="192.168.1.1",
)

# amqp://guest:guest@192.168.1.1:5672/ - the final url

Also, RMQ AsyncAPI protocol now defines automatically from "amqp"/"amqps"

Also, RMQ supports BaseSecurity and SASLPlaintext as a security option for now

Also, mv faststream.broker.security to faststream.security with deprecation notice

Fixes #895, Close #578

Type of change

Please delete options that are not relevant.

  • Documentation (typos, code examples, or any documentation updates)
  • Bug fix (a non-breaking change that resolves an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a fix or feature that would disrupt existing functionality)
  • This change requires a documentation update

Checklist

  • My code adheres to the style guidelines of this project (scripts/lint.sh shows no errors)
  • I have conducted a self-review of my own code
  • I have made the necessary changes to the documentation
  • My changes do not generate any new warnings
  • I have added tests to validate the effectiveness of my fix or the functionality of my new feature
  • Both new and existing unit tests pass successfully on my local environment by running scripts/test-cov.sh
  • I have ensured that static analysis tests are passing by running scripts/static-anaylysis.sh
  • I have included code examples to illustrate the modifications

@Lancetnik Lancetnik added the enhancement New feature or request label Nov 1, 2023
@Lancetnik
Copy link
Collaborator Author

@kumaranvpl can you please use the Issue description for detail release notes?
Also, we need to add asyncapi_url to AsyncAPI custom docs in the #811 scope

@Lancetnik Lancetnik marked this pull request as draft November 1, 2023 11:26
@Lancetnik Lancetnik marked this pull request as ready for review November 1, 2023 11:52
@Lancetnik Lancetnik marked this pull request as draft November 1, 2023 14:55
@Lancetnik Lancetnik marked this pull request as ready for review November 1, 2023 15:19
@davorrunje davorrunje added this pull request to the merge queue Nov 1, 2023
Merged via the queue into main with commit f4fc2bf Nov 1, 2023
23 checks passed
@davorrunje davorrunje deleted the asyncapi_url branch November 1, 2023 19:37
@Lancetnik
Copy link
Collaborator Author

@kumaranvpl can you please use the PR description to update release note by some details? Peoples should know about changes explicitly, not only by PRs list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
2 participants