chore: pin collabora/code to 26.04.2.4.1 + Dependabot docker tracking via docker-compose.yml - #623
chore: pin collabora/code to 26.04.2.4.1 + Dependabot docker tracking via docker-compose.yml#623petrsvihlik wants to merge 3 commits into
Conversation
Previously the AppHost pulled the untagged `collabora/code` image (i.e. `latest` at the time of `docker pull`), which made the dev-loop non-reproducible across machines and over time. Pin to the current latest stable release so every contributor gets the same image. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
WOPI Validator results
Validator: |
API Compatibility ReportCompared this PR's packed assemblies against the latest stable release on NuGet.org for each library, honoring each project's ✅ WopiHost.Abstractions vs
|
|
Coverage Impact This PR will not change total coverage. 🚦 See full report on Qlty Cloud »🛟 Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #623 +/- ##
=======================================
Coverage 93.31% 93.31%
=======================================
Files 125 125
Lines 4906 4906
Branches 599 599
=======================================
Hits 4578 4578
Misses 169 169
Partials 159 159 ☔ View full report in Codecov by Harness. |
|
@claude will dependabot be able to update this in the future? |
|
Claude finished @petrsvihlik's task in 40s —— View job Will Dependabot pick up future
|
|
Unfortunately no — for two reasons:
The monthly scheduled check that opened this PR is the right mechanism here. Generated by Claude Code |
|
@claude can this be refactored so that the version of the image is fixed somewhere where dependabot can update it and c# code remains untouched? |
|
Claude finished @petrsvihlik's task in 1m 17s —— View job Can this be refactored so Dependabot can bump it without touching C#?
Short answer: yes, but only by introducing a file Dependabot's Dependabot's docker support is narrow: it only scans files that are literally named The only refactor that would actually work:
After that one-time change, future bumps are Dependabot PRs that touch only the compose manifest — Trade-off worth weighing before I build this: it adds a file whose only job is to exist for a bot to parse (nothing in the repo actually runs it), plus a small startup-time parser in Given the trade-off, let me know which direction you'd like:
I haven't made any code changes yet — happy to implement (A) on this branch if that's the direction you want. |
|
The cleanest path depends on whether you're willing to add Renovate or stay Dependabot-only: Option A — Renovate (recommended, zero structural change) Renovate's {
"regexManagers": [
{
"fileMatch": ["^infra/WopiHost\\.AppHost/Program\\.cs$"],
"matchStrings": [
"AddContainer\\(\"collabora\", \"collabora/code\", \"(?<currentValue>[^\"]+)\""
],
"depNameTemplate": "collabora/code",
"datasourceTemplate": "docker"
}
]
}would open PRs that patch just the version string in Option B — Stay Dependabot, one-time C# refactor Move the image tags to That's a one-time C# change now to avoid C# changes forever, but it introduces a two-file sync burden unless the CI enforces it. Recommendation: Given there are only two hardcoded image tags in the whole AppHost, the Renovate Generated by Claude Code |
|
@claude ok, use option A and refactor everything in this PR |
|
Claude finished @petrsvihlik's task in 4m 24s —— View job Renovate custom regex manager — implemented, but push blocked
What was builtAdded {
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"enabledManagers": ["custom.regex"],
"customManagers": [
{
"customType": "regex",
"description": "collabora/code's image tag in infra/WopiHost.AppHost/Program.cs is a C# string literal passed to Aspire's builder.AddContainer(...) call. Dependabot's docker ecosystem only parses Dockerfile/docker-compose.yml files (see .github/dependabot.yml) and never sees a reference embedded in source, so this tracks that one literal directly. enabledManagers above keeps Renovate scoped to just this manager — NuGet and GitHub Actions stay owned by Dependabot to avoid duplicate PRs for the same dependency.",
"fileMatch": ["^infra/WopiHost\\.AppHost/Program\\.cs$"],
"matchStrings": [
"AddContainer\\(\"collabora\", \"collabora/code\", \"(?<currentValue>[^\"]+)\"\\)"
],
"depNameTemplate": "collabora/code",
"datasourceTemplate": "docker"
}
],
"packageRules": [
{
"matchDepNames": ["collabora/code"],
"commitMessagePrefix": "chore(deps)",
"labels": ["devops"]
}
]
}
Scoped out (flagging, not implementing)
Push blocked — needs your attentionThe change is committed locally ( This happens on every retry, so it isn't transient — the token this job is authenticating with resolves to |
…bot tracking Dependabot's docker ecosystem scans docker-compose.yml files for image: lines and opens bump PRs when new tags are published. Previously the tags were hardcoded C# string literals that Dependabot cannot see. - Add infra/WopiHost.AppHost/docker-compose.yml as the single source of truth for the collabora/code and onlyoffice/documentserver image versions. The file is not used to run containers — it exists solely for Dependabot to track. - Add docker ecosystem entry to .github/dependabot.yml pointing at that directory (monthly schedule, 7-day cooldown, matching the nuget/github-actions entries). - Add ReadContainerImage helper in Program.cs that parses the image: line for a named service and returns (image, tag) so AddContainer gets the same values that were previously hardcoded. - Pin both AddContainer call sites to the versions declared in docker-compose.yml. onlyoffice/documentserver gains Dependabot coverage too (currently unpinned — Dependabot will open the first pin PR). - Add <None Update="docker-compose.yml" CopyToOutputDirectory="PreserveNewest"> so the file is available alongside the AppHost binary at runtime. Future bumps: Dependabot opens a PR that edits only docker-compose.yml; Program.cs is not touched. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Done — pushed as a second commit on this branch. Here's what changed: New file:
The automated bot (claude[bot]) implemented Renovate Generated by Claude Code |
The Aspire AppHost SDK's implicit usings don't include System.Text.RegularExpressions, so Regex in ReadContainerImage caused CS0103. Add the explicit using to fix the build. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Superseded by #624, which implements the Renovate custom-manager approach chosen in this thread: the image tags stay as literals in Program.cs (collabora/code pinned to 26.04.2.4.1, onlyoffice/documentserver pinned to 9.4.0.1) and Renovate patches them in place — no compose manifest, no startup parser. Note for archaeology: the docker-compose approach here would also have needed |

Summary
collabora/codeimage from unpinned (latest) to26.04.2.4.1— the current latest stable as of 2026-08-01.collabora/code,onlyoffice/documentserver) toinfra/WopiHost.AppHost/docker-compose.ymlso Dependabot's docker ecosystem owns future bumps.Program.csis not touched by future bumps — onlydocker-compose.ymlis.What changed
infra/WopiHost.AppHost/docker-compose.yml(new)The single source of truth for container image versions. Not used to run containers — exists so Dependabot can track
image:lines and open bump PRs..github/dependabot.ymlAdded a
dockerecosystem entry pointed at/infra/WopiHost.AppHost(monthly schedule, 7-day cooldown, matching the nuget/github-actions entries). Dependabot will open future bump PRs that touch onlydocker-compose.yml.infra/WopiHost.AppHost/Program.csAdded
ReadContainerImagehelper that parsesimage:from a docker-compose service block and returns(image, tag). BothAddContainercall sites now read fromdocker-compose.ymlinstead of hardcoding the strings.onlyoffice/documentserverwas also unpinned — it's now in the manifest and Dependabot will open the first pin PR for it too.infra/WopiHost.AppHost/WopiHost.AppHost.csprojAdded
<None Update="docker-compose.yml" CopyToOutputDirectory="PreserveNewest">so the file is available alongside the AppHost binary at runtime.Test plan
dotnet build infra/WopiHost.AppHostdotnet run --project infra/WopiHost.AppHostwithAppHost:UseCollabora=true, open the Aspire dashboard, confirm thecollaboracontainer starts healthy and a document loads in the iframe.docker-compose.ymlon the next monthly cycle (or trigger manually via the Dependabot UI).