Skip to content

Docker restore-warm COPY layer lists a stale core csproj set #544

Description

@JabbaKadabra

What

The cache-warming restore layer in the three backend Dockerfiles copies only core/Nordstein.Core.Common and core/Nordstein.Core.Domain csprojs, although the product now also consumes Nordstein.Core.Storage, Nordstein.Core.Licensing, and Nordstein.Core.AI. The images still build (the later COPY . . + publish-time restore supplies the full tree), so the early dotnet restore layer is not doing what its comment claims — "restore needs them before the project files".

Where

  • deploy/allinone/Dockerfile:55-57 (restore layer + comment)
  • Proxytrace.Api/Dockerfile:36-38
  • Proxytrace.Proxy.Api/Dockerfile:32-34

Why it matters

  • The comment misleads: it asserts the layer selects source mode and feeds restore, but the copied set has drifted from the real dependency graph across three extraction tranches without breaking anything — so either the layer is dead weight or it silently restores less than intended, wasting the cache-warm benefit.
  • Every future core package will silently repeat the drift.

Suggested fix

Either copy all core/*/*.csproj (a glob COPY keeps it drift-proof), or drop the early-restore layer entirely if measurement shows it no longer improves cache hit rates — and fix the comment to match reality.

Evidence

Noticed while retiring Proxytrace.Serialization (PR #543): its COPY line was the only one that broke the build — the missing core csprojs never had.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions