The DatabaseMigrations sample is working great for me in local development. However, by default, it's included when I azd up. The MigrationService seems to get deployed as an Azure Container App 'App' type rather than 'Job' type (docs), so Container Apps continually reboots it even if the migration completes successfully.
I discovered this when I looked at my Azure SQL Database free offer quota. Stopping the MigrationService container in Azure Portal caused the inflection in this chart of a db for an app still under development (no usage expected other than when I'm working on it).
Does Aspire have tooling to provision a 'Job' type yet?
If not, maybe we update this sample to prevent surprises? Something like the below here?
if (builder.ExecutionContext.IsRunMode) {
builder.AddProject<Projects.DatabaseMigrations_MigrationService>("migration")
.WithReference(db1);
}
The
DatabaseMigrations
sample is working great for me in local development. However, by default, it's included when Iazd up
. TheMigrationService
seems to get deployed as an Azure Container App 'App' type rather than 'Job' type (docs), so Container Apps continually reboots it even if the migration completes successfully.I discovered this when I looked at my Azure SQL Database free offer quota. Stopping the
MigrationService
container in Azure Portal caused the inflection in this chart of a db for an app still under development (no usage expected other than when I'm working on it).Does Aspire have tooling to provision a 'Job' type yet?
If not, maybe we update this sample to prevent surprises? Something like the below here?