Skip to content

fix(docker): install .NET 8 for openms-thermo-bridge so container build/deploy works - #9441

Merged
timosachsenberg merged 2 commits into
developfrom
fix-docker-dotnet-thermo
Jun 3, 2026
Merged

timosachsenberg merged 2 commits into
developfrom
fix-docker-dotnet-thermo

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

PR #9389 enabled WITH_THERMO_RAW=ON by default (amd64), which FetchContent-builds
openms-thermo-bridge. The bridge's CMake hard-requires the .NET SDK at configure
time (find_package(DotNetHost) needs nethost from the SDK host pack, plus
dotnet publish of the managed Thermo wrapper). The Docker base image had no .NET,
so cmake configure failed and the nightly container deploy (Docker + Singularity)
has been broken since 2026-05-24.

  • base (build) stage: install the official .NET 8 SDK via Microsoft's
    dotnet-install.sh into /usr/share/dotnet (the layout FindDotNetHost.cmake
    expects; Ubuntu's dotnet-sdk-8.0 uses /usr/lib/dotnet and lacks the host pack).
  • library (runtime) stage: install the .NET 8 runtime so the bridge can host the
    managed RawFileReader at runtime; managed assemblies are already shipped under
    ${INSTALL_DIR}/lib/openms_thermo_bridge/managed.
  • add libicu74 (required by .NET) and set DOTNET_ROOT in both stages.
  • guarded to amd64: WITH_THERMO_RAW defaults OFF on linux/aarch64, so the arm64
    image is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) [email protected]

Summary by CodeRabbit

  • Bug Fixes

    • Improved .raw file type detection to work consistently across all system configurations, with better error handling for unsupported formats.
  • New Features

    • Enhanced platform support with updated runtime dependencies and internationalization library integration.

timosachsenberg and others added 2 commits June 3, 2026 18:35
…ld/deploy works

PR #9389 enabled WITH_THERMO_RAW=ON by default (amd64), which FetchContent-builds
openms-thermo-bridge. The bridge's CMake hard-requires the .NET SDK at configure
time (find_package(DotNetHost) needs nethost from the SDK host pack, plus
`dotnet publish` of the managed Thermo wrapper). The Docker base image had no .NET,
so cmake configure failed and the nightly container deploy (Docker + Singularity)
has been broken since 2026-05-24.

- base (build) stage: install the official .NET 8 SDK via Microsoft's
  dotnet-install.sh into /usr/share/dotnet (the layout FindDotNetHost.cmake
  expects; Ubuntu's dotnet-sdk-8.0 uses /usr/lib/dotnet and lacks the host pack).
- library (runtime) stage: install the .NET 8 runtime so the bridge can host the
  managed RawFileReader at runtime; managed assemblies are already shipped under
  ${INSTALL_DIR}/lib/openms_thermo_bridge/managed.
- add libicu74 (required by .NET) and set DOTNET_ROOT in both stages.
- guarded to amd64: WITH_THERMO_RAW defaults OFF on linux/aarch64, so the arm64
  image is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…r path works

PR #9389 added an early-return in FileHandler::getType() that mapped .raw to
FileTypes::UNKNOWN whenever WITH_THERMO_RAW was OFF (the default on Linux
aarch64). This was meant to disable only the in-process ThermoRawFile reader,
but it also broke file-type recognition that the *external* ThermoRawFileParser
(mono) conversion path in FileConverter depends on. As a result the nightly
arm64 container deploy failed:

  TOPP_THERMORAWFILEPARSER_1 / _1_out
  Warning: Could not determine format of input file '...ginkgotoxin-ms-switching.raw'!
  Error: Could not determine input file type!

FileConverter only enters its RAW branch when in_type == FileTypes::RAW, and the
external path (mono + ThermoRawFileParser, src/topp/FileConverter.cpp) is
available on all platforms regardless of WITH_THERMO_RAW. Forcing the type to
UNKNOWN made that branch unreachable.

Remove the guard so .raw is always recognized (restoring pre-#9389 behavior).
The in-process reader stays correctly #ifdef WITH_THERMO_RAW guarded in both
getType's loadExperiment switch and FileConverter; callers that try to load a
.raw in-process without WITH_THERMO_RAW still get a clear "type is not supported
for loading experiments" ParseError from loadExperiment's default case.

Co-Authored-By: Claude <[email protected]>

https://claude.ai/code/session_01CF34vdU7vbT8rHJ74XnN5z
@timosachsenberg
timosachsenberg merged commit 5e19731 into develop Jun 3, 2026
12 checks passed
@timosachsenberg
timosachsenberg deleted the fix-docker-dotnet-thermo branch June 3, 2026 20:03
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

@timosachsenberg The following names might be missing from the AUTHORS file:

  • Claude

Please consider applying the following patch:

--- AUTHORS	2026-06-03 20:03:40.636466574 +0000
+++ AUTHORS.new	2026-06-03 20:03:45.770725081 +0000
@@ -22,8 +22,9 @@
  - Chirag Dave
  - Chris Bauer
  - Chris Bielow
- - Christie Mathews
  - Christian Ehrlich
+ - Christie Mathews
+ - Claude
  - Clemens Groepl
  - Cornelia Friedle
  - Daniel Jameson

@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f9f0a128-ee21-4d88-9a67-dfe883db42b5

📥 Commits

Reviewing files that changed from the base of the PR and between bf13918 and e8be2c8.

📒 Files selected for processing (2)
  • dockerfiles/Dockerfile
  • src/openms/source/FORMAT/FileHandler.cpp

📝 Walkthrough

Walkthrough

This pull request adds Docker build infrastructure to support a .NET Thermo bridge on amd64 architectures by installing ICU dependencies and conditionally configuring the .NET 8 SDK and runtime. It also updates file type detection to always recognize .raw files as RAW format, shifting error handling to the load stage.

Changes

OpenMS Thermo Bridge and File Type Handling

Layer / File(s) Summary
Docker base and library stages: ICU and .NET 8 tooling
dockerfiles/Dockerfile
Base image installs libicu74, sets DOTNET_ROOT/PATH, and conditionally installs .NET 8 SDK for amd64 via dotnet-install.sh. Library stage adds ARG TARGETARCH, installs ICU and .NET 8 runtime conditionally for amd64, and configures DOTNET_ROOT/PATH so the bridge can discover .NET runtime libraries across derived stages.
FileHandler .raw file type always recognized
src/openms/source/FORMAT/FileHandler.cpp
.raw file extension is now recognized as FileTypes::RAW unconditionally in getType(); compile-time gating is removed. Unsupported .raw file loading when WITH_THERMO_RAW is not enabled is deferred to loadExperiment()'s default error path.

A Dockerfile build that's bright,
With ICU and .NET in sight,
.raw files now dance,
No compile-time prance,
The bridge stands ready to ignite! 🐰✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-docker-dotnet-thermo

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

2 participants