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

Add Service Bus emulator support #6737

Open
wants to merge 48 commits into
base: main
Choose a base branch
from
Open

Conversation

sebastienros
Copy link
Member

@sebastienros sebastienros commented Nov 20, 2024

Description

Add support for the Service Bus emulator https://techcommunity.microsoft.com/blog/messagingonazureblog/introducing-local-emulator-for-azure-service-bus/4304457

This PR introduces a custom model to configure the emulator and the cloud service. There is another branch that was based on the CDK directly (and use it for the emulator JSON too) but some discussions led to create a custom, simplified one (not really simplified here for the sake of understanding limits), that is then converted to JSON for the emulator, and to CDK resources for provisioning. If the model is not sufficient (can be on purpose to limit it to what users use in most cases) then the emulator configuration can be defined in JSON directly via WithConfigJson(path), customized with RunAsEmulator(c => c.ConfigJson(JsonNode)), and the CDK resources can be enhanced with the existing ConfigureInfrastructure().

Fixes #6605

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?
Microsoft Reviewers: Open in CodeFlow

@sebastienros sebastienros changed the title Sebros/sbemunewmodel Add Service Bus emulator support Nov 20, 2024
sebastienros and others added 2 commits November 20, 2024 09:04
@davidfowl
Copy link
Member

How close is this to merging

@sebastienros
Copy link
Member Author

I pushed the wrong branch :/ I wanted to update the EventHubs one and not lose my nice green build ... reverting

@sebastienros
Copy link
Member Author

How close is this to merging

If you ask me it's perfect. But I haven't had an approval yet so I must be wrong

@davidfowl
Copy link
Member

I want to play with it 🙂. I think this is a good enough strawman to decide on follow ups. Should we mark some of these APIs experimental to get some leeway to change them?

@sebastienros
Copy link
Member Author

I want to play with it

Check the playground app I created. And also the provisioning part, it should provision queues/topics... There is a callback to customize the CDK objects, adding properties that don't matter locally, or are not available in the "common" model between the emulator and cdk.

Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

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

This LGTM! Nice work here. This is going to be a very useful feature that our customers will enjoy. Let's get it merged.

@davidfowl
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@davidfowl
Copy link
Member

The functions test is failing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Service Bus emulator
8 participants