Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 15, 2025

Closes #<ISSUE_NUMBER>

The latest sqlite-web container changed from using SQLITE_DATABASE environment variable to requiring the database filename as a command-line argument via its ENTRYPOINT.

Changes

  • SqliteResourceBuilderExtensions.cs: Changed .WithEnvironment() to .WithArgs() to pass database filename as command-line argument
  • AddSqliteTests.cs: Updated test to verify CommandLineArgsCallbackAnnotation instead of environment variables

Example

var sqlite = builder.AddSqlite("Sqlite", null, "database.db")
    .WithSqliteWeb();

Now correctly runs the container as sqlite_web -H 0.0.0.0 -x database.db instead of relying on the removed SQLITE_DATABASE env var.

The workaround (.WithSqliteWeb(c => c.WithArgs("database.db"))) continues to work since configureContainer is invoked after default args are set.

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Other information

Upstream breaking change: coleifer/sqlite-web@49ccbea

Original prompt

This section details on the original issue you should resolve

<issue_title>Missing required path to database file during integration of latest sqlite-web</issue_title>
<issue_description>### Describe the bug

Latest Integration of sqlite-web produces error. Due to breaking changes in sqlite-web:
coleifer/sqlite-web@49ccbea

Error: missing required path to database file.

Regression

No response

Steps to reproduce

In the AppHost.cs of the AppHost, I have the following code:


var builder = DistributedApplication.CreateBuilder(args);
var sqlite = builder.AddSqlite("Sqlite", null, "database.db")
    .WithSqliteWeb();

builder.Build().Run();

Expected behavior

No error within Container

Screenshots

No response

IDE and version

Other

IDE version

VS 2026

Nuget packages

CommunityToolkit.Aspire.Hosting.Sqlite 13.0

Additional context

Workaround, pass the file to the container:

var builder = DistributedApplication.CreateBuilder(args);
var sqlite = builder.AddSqlite("Sqlite", null, "database.db")
    .WithSqliteWeb(c =>
    {
        c.WithArgs("database.db");
    });

builder.Build().Run();

Help us help you

No, just wanted to report this</issue_description>

<agent_instructions>Look at the attached commit from the sqlite-web repo. I think we just need to do something in our integration to ensure there are args passed properly</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@aaronpowell Ah, that's us getting burnt because we use the `latest` tag on the container image, as they aren't tagging the container with other tags to rely on.

We'll get that fixed for the next release.</comment_new>


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix missing required path to database file during sqlite-web integration Fix sqlite-web integration for breaking changes in latest container Dec 15, 2025
Copilot AI requested a review from aaronpowell December 15, 2025 05:31
@aaronpowell aaronpowell marked this pull request as ready for review December 15, 2025 23:30
Copilot AI review requested due to automatic review settings December 15, 2025 23:30
@aaronpowell
Copy link
Member

@geheb there's a NuGet package on our Azure DevOps feed (see the README for that link), do you want to test it and verify if this resolves the issue?

@github-actions
Copy link
Contributor

Code Coverage

Package Line Rate Branch Rate Complexity Health
CommunityToolkit.Aspire.GoFeatureFlag 100% 97% 74
CommunityToolkit.Aspire.Hosting.ActiveMQ 78% 40% 108
CommunityToolkit.Aspire.Hosting.ActiveMQ.MassTransit 1% 0% 14
CommunityToolkit.Aspire.Hosting.Adminer 74% 50% 20
CommunityToolkit.Aspire.Hosting.Azure.Dapr 29% 7% 124
CommunityToolkit.Aspire.Hosting.Azure.Dapr.Redis 61% 34% 76
CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder 100% 100% 22
CommunityToolkit.Aspire.Hosting.Bun 96% 83% 28
CommunityToolkit.Aspire.Hosting.Dapr 60% 37% 840
CommunityToolkit.Aspire.Hosting.DbGate 94% 50% 18
CommunityToolkit.Aspire.Hosting.Deno 98% 85% 44
CommunityToolkit.Aspire.Hosting.Flagd 79% 100% 32
CommunityToolkit.Aspire.Hosting.GoFeatureFlag 88% 73% 36
CommunityToolkit.Aspire.Hosting.Golang 51% 40% 88
CommunityToolkit.Aspire.Hosting.Java 70% 75% 130
CommunityToolkit.Aspire.Hosting.JavaScript.Extensions 97% 85% 200
CommunityToolkit.Aspire.Hosting.k6 58% 12% 20
CommunityToolkit.Aspire.Hosting.Keycloak.Extensions 100% 100% 22
CommunityToolkit.Aspire.Hosting.KurrentDB 71% 75% 34
CommunityToolkit.Aspire.Hosting.LavinMQ 74% 50% 26
CommunityToolkit.Aspire.Hosting.LavinMQ.MassTransit 1% 0% 14
CommunityToolkit.Aspire.Hosting.MailPit 85% 50% 22
CommunityToolkit.Aspire.Hosting.McpInspector 77% 44% 204
CommunityToolkit.Aspire.Hosting.Meilisearch 71% 57% 58
CommunityToolkit.Aspire.Hosting.Minio 88% 75% 56
CommunityToolkit.Aspire.Hosting.MongoDB.Extensions 96% 83% 36
CommunityToolkit.Aspire.Hosting.MySql.Extensions 100% 88% 78
CommunityToolkit.Aspire.Hosting.Ngrok 52% 35% 82
CommunityToolkit.Aspire.Hosting.Ollama 65% 69% 260
CommunityToolkit.Aspire.Hosting.OpenTelemetryCollector 78% 61% 77
CommunityToolkit.Aspire.Hosting.PapercutSmtp 81% 50% 18
CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions 99% 89% 84
CommunityToolkit.Aspire.Hosting.Python.Extensions 45% 29% 100
CommunityToolkit.Aspire.Hosting.RavenDB 62% 48% 148
CommunityToolkit.Aspire.Hosting.Redis.Extensions 100% 71% 48
CommunityToolkit.Aspire.Hosting.Rust 94% 83% 16
CommunityToolkit.Aspire.Hosting.Solr 72% 100% 22
CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects 51% 48% 192
CommunityToolkit.Aspire.Hosting.Sqlite 89% 89% 52
CommunityToolkit.Aspire.Hosting.SqlServer.Extensions 100% 87% 78
CommunityToolkit.Aspire.Hosting.Stripe 51% 30% 82
CommunityToolkit.Aspire.Hosting.SurrealDb 54% 38% 256
CommunityToolkit.Aspire.KurrentDB 94% 92% 54
CommunityToolkit.Aspire.MassTransit.RabbitMQ 100% 100% 30
CommunityToolkit.Aspire.Meilisearch 97% 92% 68
CommunityToolkit.Aspire.Microsoft.Data.Sqlite 89% 85% 52
CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite 61% 58% 114
CommunityToolkit.Aspire.Minio.Client 90% 85% 112
CommunityToolkit.Aspire.OllamaSharp 77% 71% 132
CommunityToolkit.Aspire.RavenDB.Client 60% 53% 237
CommunityToolkit.Aspire.SurrealDb 79% 63% 78
Summary 67% (7482 / 11104) 55% (2096 / 3794) 4816

Minimum allowed line rate is 60%

Copilot AI deployed to azure-artifacts December 15, 2025 23:33 Active
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the sqlite-web integration to work with breaking changes in the latest upstream container. The sqlite-web container now requires the database filename as a command-line argument instead of the SQLITE_DATABASE environment variable that was removed.

Key Changes:

  • Changed from .WithEnvironment() to .WithArgs() to pass the database filename as a command-line argument
  • Updated the test to verify CommandLineArgsCallbackAnnotation instead of environment variables

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/CommunityToolkit.Aspire.Hosting.Sqlite/SqliteResourceBuilderExtensions.cs Replaced environment variable with command-line argument to pass database filename
tests/CommunityToolkit.Aspire.Hosting.Sqlite.Tests/AddSqliteTests.cs Updated test to verify command-line args instead of environment variables

Review Summary: The implementation correctly addresses the breaking change in the sqlite-web container. The changes follow established repository patterns for using .WithArgs() (as seen in 20+ other integrations) and the test pattern matches conventions used in other test files (e.g., Java, Flagd, OpenTelemetryCollector tests). The configureContainer callback is invoked after default args are set (line 85), which preserves the documented workaround behavior. No documentation updates are needed since the README doesn't expose these internal implementation details.

@github-actions github-actions bot added the Stale label Dec 21, 2025
@github-actions github-actions bot closed this Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing required path to database file during integration of latest sqlite-web

2 participants