Skip to content

Allow publishing of Ollama and SQLite hosting integrations #710

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

Merged
merged 3 commits into from
Jun 4, 2025

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 3, 2025

This PR removes the automatic ExcludeFromManifest() calls from the Ollama and SQLite hosting integrations, allowing developers to choose whether to include these resources in their publishing manifest.

Problem

Previously, these integrations automatically excluded themselves from the manifest:

  • Ollama container resource
  • OpenWebUI resource (part of Ollama integration)
  • SQLite resource
  • SQLite Web resource

While this was done with good intentions (these resources might not be recommended for production deployment), it caused friction by:

  • Making the exclusion behavior non-obvious to developers
  • Blocking valid scenarios where developers might want to include these resources in their manifest

Solution

Removed the automatic .ExcludeFromManifest() calls from all four resources, allowing them to participate in manifest generation by default. Developers who don't want these resources in their manifest can now explicitly call .ExcludeFromManifest() when configuring the resources.

Changes Made

Source Code:

  • Removed .ExcludeFromManifest() from OllamaResourceBuilderExtensions.cs (Ollama container)
  • Removed .ExcludeFromManifest() from OllamaResourceBuilderExtensions.OpenWebUI.cs (OpenWebUI)
  • Removed .ExcludeFromManifest() from SqliteResourceBuilderExtensions.cs (SQLite and SQLite Web)
  • Updated XML documentation to remove mention of automatic exclusion

Tests:

  • Updated existing test ResourceExcludedFromManifestByDefaultResourceIncludedInManifestByDefault
  • Added new tests to verify all resources (Ollama, OpenWebUI, SQLite, SQLite Web) are included in manifests by default

Breaking Change

This is a minimal breaking change - resources that were previously excluded from manifests will now be included by default. Developers who relied on the automatic exclusion can restore the previous behavior by explicitly calling .ExcludeFromManifest():

// Before (automatic exclusion)
var ollama = builder.AddOllama("ollama");

// After (explicit exclusion if desired)
var ollama = builder.AddOllama("ollama").ExcludeFromManifest();

Fixes #709.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dnceng.pkgs.visualstudio.com
    • Triggering command: dotnet build src/CommunityToolkit.Aspire.Hosting.Ollama/CommunityToolkit.Aspire.Hosting.Ollama.csproj (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…egrations

Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Allow publishing of Ollama and SQLite hosting integrations Allow publishing of Ollama and SQLite hosting integrations Jun 3, 2025
@Copilot Copilot AI requested a review from aaronpowell June 3, 2025 04:54
Copilot finished work on behalf of aaronpowell June 3, 2025 04:54
@@ -51,8 +51,7 @@ public static IResourceBuilder<T> WithOpenWebUI<T>(this IResourceBuilder<T> buil
.WithHttpEndpoint(targetPort: 8080, name: "http")
.WithEnvironment(context => ConfigureOpenWebUIContainer(context, openWebUI))
.WaitFor(builder)
.WithHttpHealthCheck("/health")
Copy link
Member

Choose a reason for hiding this comment

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

Let's leave this one in

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! I've restored the .ExcludeFromManifest() call for the OpenWebUI resource and updated the corresponding test. The change is in commit f29d95f.

Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jun 3, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dnceng.pkgs.visualstudio.com
    • Triggering command: dotnet build src/CommunityToolkit.Aspire.Hosting.Ollama/CommunityToolkit.Aspire.Hosting.Ollama.csproj (dns block)
    • Triggering command: dotnet test tests/CommunityToolkit.Aspire.Hosting.Ollama.Tests/CommunityToolkit.Aspire.Hosting.Ollama.Tests.csproj --filter OpenWebUIResourceExcludedFromManifestByDefault (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot finished work on behalf of aaronpowell June 3, 2025 05:03
Copy link
Contributor

github-actions bot commented Jun 3, 2025

Code Coverage

Package Line Rate Branch Rate Complexity Health
CommunityToolkit.Aspire.EventStore 100% 100% 46
CommunityToolkit.Aspire.GoFeatureFlag 100% 97% 74
CommunityToolkit.Aspire.Hosting.ActiveMQ 80% 40% 100
CommunityToolkit.Aspire.Hosting.ActiveMQ.MassTransit 1% 0% 14
CommunityToolkit.Aspire.Hosting.Adminer 73% 50% 20
CommunityToolkit.Aspire.Hosting.Azure.Dapr 67% 50% 828
CommunityToolkit.Aspire.Hosting.Azure.Dapr.Redis 97% 88% 36
CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder 100% 100% 22
CommunityToolkit.Aspire.Hosting.Azure.StaticWebApps 84% 50% 28
CommunityToolkit.Aspire.Hosting.Bun 82% 71% 54
CommunityToolkit.Aspire.Hosting.Dapr 63% 51% 724
CommunityToolkit.Aspire.Hosting.DbGate 94% 50% 18
CommunityToolkit.Aspire.Hosting.Deno 84% 75% 72
CommunityToolkit.Aspire.Hosting.EventStore 94% 100% 18
CommunityToolkit.Aspire.Hosting.GoFeatureFlag 93% 50% 18
CommunityToolkit.Aspire.Hosting.Golang 94% 50% 16
CommunityToolkit.Aspire.Hosting.Java 69% 72% 120
CommunityToolkit.Aspire.Hosting.k6 58% 12% 20
CommunityToolkit.Aspire.Hosting.LavinMQ 78% 50% 18
CommunityToolkit.Aspire.Hosting.LavinMQ.MassTransit 1% 0% 14
CommunityToolkit.Aspire.Hosting.MailPit 91% 50% 14
CommunityToolkit.Aspire.Hosting.Meilisearch 73% 57% 50
CommunityToolkit.Aspire.Hosting.MongoDB.Extensions 96% 83% 36
CommunityToolkit.Aspire.Hosting.MySql.Extensions 100% 88% 76
CommunityToolkit.Aspire.Hosting.Ngrok 52% 35% 82
CommunityToolkit.Aspire.Hosting.NodeJS.Extensions 90% 69% 96
CommunityToolkit.Aspire.Hosting.Ollama 67% 70% 174
CommunityToolkit.Aspire.Hosting.PapercutSmtp 92% 50% 10
CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions 98% 88% 92
CommunityToolkit.Aspire.Hosting.Python.Extensions 68% 55% 90
CommunityToolkit.Aspire.Hosting.RavenDB 63% 49% 136
CommunityToolkit.Aspire.Hosting.Redis.Extensions 100% 80% 40
CommunityToolkit.Aspire.Hosting.Rust 94% 83% 16
CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects 75% 62% 130
CommunityToolkit.Aspire.Hosting.Sqlite 96% 91% 54
CommunityToolkit.Aspire.Hosting.SqlServer.Extensions 100% 85% 76
CommunityToolkit.Aspire.MassTransit.RabbitMQ 100% 100% 30
CommunityToolkit.Aspire.Meilisearch 97% 92% 68
CommunityToolkit.Aspire.Microsoft.Data.Sqlite 37% 27% 194
CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite 51% 50% 92
CommunityToolkit.Aspire.OllamaSharp 71% 64% 98
CommunityToolkit.Aspire.RavenDB.Client 60% 53% 237
Summary 71% (6534 / 9161) 58% (2033 / 3506) 4151

Minimum allowed line rate is 60%

@Copilot Copilot AI temporarily deployed to azure-artifacts June 3, 2025 05:14 Inactive
@aaronpowell aaronpowell marked this pull request as ready for review June 3, 2025 05:26
@aaronpowell
Copy link
Member

@Alirexaa - I've enabled Copilot as a pair programmer (mostly for an experiment).

This is the kind of outcome from it.

@Alirexaa
Copy link
Member

Alirexaa commented Jun 3, 2025

@Alirexaa - I've enabled Copilot as a pair programmer (mostly for an experiment).

This is the kind of outcome from it.

This is cool, but I'm unable to assign the issues to Copilot. I have GitHub Copilot Pro not GitHub Copilot Pro+.

@aaronpowell
Copy link
Member

I'll check permissions, you should be able to as it's org level that I set it up as.

@aaronpowell
Copy link
Member

@Alirexaa - I've enabled Copilot as a pair programmer (mostly for an experiment).
This is the kind of outcome from it.

This is cool, but I'm unable to assign the issues to Copilot. I have GitHub Copilot Pro not GitHub Copilot Pro+.

I thought that because it was at the org level it should still allow you but looks like not (although I'm somewhat confused on how the pricing/licensing works, maybe I should ask copilot...)

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.

Allow publishing of Ollama and SQLite hosting integrations
3 participants