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

Azure Storage ports changing despite using ContainerLifetime.Persistent #7058

Open
1 task done
MarcinJuraszek opened this issue Jan 9, 2025 · 1 comment
Open
1 task done
Assignees
Labels
area-integrations Issues pertaining to Aspire Integrations packages azure-storage Issues related to azure storage integration
Milestone

Comments

@MarcinJuraszek
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

We're using Azure Storage with Emulator and configure it to stay alive between runs using c.WithLifetime(ContainerLifetime.Persistent). Despite that, every time we re-run the AppHost the ports the Emulator is exposing for the app change. This is unexpected and makes things harder than they should be. E.g. we're also using Durable Functions in our project, and use Durable Functions Monitor in VS Code to inspect the inner workings of Durable Task Framework. However, because the ports for the Storage change on every run, the Monitor breaks and we have to re-add a new connection, after getting the new set of ports from Aspire Dashboard.

Expected Behavior

I would expect the Azure Storage connection string exposed by the emulator to stay stable between re-runs of App Host if configured with WithLifetime(ContainerLifetime.Persistent)

Steps To Reproduce

  1. Create an App Host with an Azure Storage resource, configure it to use an emulator and set to be persistent between runs:
var storage = builder.AddAzureStorage("storage")
    .RunAsEmulator(c =>
    {
        c.WithDataVolume();
        c.WithLifetime(ContainerLifetime.Persistent);
    });
  1. Run the App Host, take note of the Endpoint URLs displayed in the dashboard
  2. Stop and re-start the App Host, compare the new Endpoint URLs to the one from previous run

Exceptions (if any)

No response

.NET Version info

No response

Anything else?

No response

@davidfowl davidfowl added area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication area-orchestrator area-integrations Issues pertaining to Aspire Integrations packages azure-storage Issues related to azure storage integration labels Jan 10, 2025
@joperezr joperezr added the untriaged New issue has not been triaged label Jan 13, 2025
@dbreshears dbreshears added this to the 9.1 milestone Jan 13, 2025
@dbreshears
Copy link
Contributor

Let's update to use proxyless for persistent containers.

@dbreshears dbreshears removed the untriaged New issue has not been triaged label Jan 13, 2025
@joperezr joperezr removed area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication area-orchestrator labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-integrations Issues pertaining to Aspire Integrations packages azure-storage Issues related to azure storage integration
Projects
None yet
Development

No branches or pull requests

5 participants