Skip to content

Ensure SQLite Web always pulls latest image#1467

Open
oondriss wants to merge 1 commit into
CommunityToolkit:mainfrom
oondriss:codex/fix-sqlite-web-entrypoint
Open

Ensure SQLite Web always pulls latest image#1467
oondriss wants to merge 1 commit into
CommunityToolkit:mainfrom
oondriss:codex/fix-sqlite-web-entrypoint

Conversation

@oondriss

Copy link
Copy Markdown

Summary

  • always pull the SQLite Web container image before starting the resource
  • verify the pull policy in the SQLite resource model tests
  • verify the SQLite Web resource becomes healthy and serves its UI

Root cause

The SQLite integration has to use ghcr.io/coleifer/sqlite-web:latest because the image does not publish versioned tags. The resource currently uses the container runtime's default pull policy, which can indefinitely reuse a cached latest image.

Older cached images can have a different startup contract from the current image. In particular, an image without an entrypoint receives the database filename from Aspire as its command and fails with exec: "db.sqlite": executable file not found in $PATH.

Using ImagePullPolicy.Always keeps the mutable image tag and its startup contract in sync for every WithSqliteWeb() consumer.

Validation

dotnet test tests/CommunityToolkit.Aspire.Hosting.Sqlite.Tests/CommunityToolkit.Aspire.Hosting.Sqlite.Tests.csproj --no-restore -- --filter-not-class CommunityToolkit.Aspire.Hosting.Sqlite.Tests.TypeScriptAppHostTests --output Normal

Passed: 17
Failed: 0

The TypeScript AppHost test was excluded locally because the installed Aspire CLI does not provide the repository's expected aspire restore command. It remains covered by CI.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1467

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1467"

@oondriss

Copy link
Copy Markdown
Author

@dotnet-policy-service agree

@oondriss
oondriss marked this pull request as ready for review July 12, 2026 13:48
@Odonno

Odonno commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Why not use the last released tag that is 0.7.2?

@oondriss

Copy link
Copy Markdown
Author

Why not use the last released tag that is 0.7.2?

i was following comment on the code here:

public const string SqliteWebTag = "latest"; // we have to use `latest` as the image doesn't publish any other image tags.

and the integration was already using latest, so I don't want to lock it in current release

@Odonno

Odonno commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

It looks like a mistake, we should always pin to a release tag. cc. @aaronpowell

@aaronpowell

Copy link
Copy Markdown
Member

Context: When I created the integration (and added the web container support) the project wasn't providing tagged released, it was only providing the latest tag - hence the comment in the code.

Looking at history, that was done on the 15th Jan 2025 and then looking at the sqlite-web project, it would appear that, as of the 16th Jan 2025 they started publishing tagged releases 🤣.

Given that, we should be updating so that the container image tags for SqliteWeb is pinned to the latest, which is 0.7.2, and not have the "always pull latest" logic in there.

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.

3 participants