Skip to content

Fix per-component build arguments in system tests - #907

Merged
MakisH merged 2 commits into
precice:developfrom
PranjalManhgaye:issue-873-per-component-build-args
Aug 25, 2026
Merged

MakisH merged 2 commits into
precice:developfrom
PranjalManhgaye:issue-873-per-component-build-args

Conversation

@PranjalManhgaye

Copy link
Copy Markdown
Collaborator

Summary

  • Resolve Docker build arguments per component from components.yaml instead of merging all parameters into one flat params_to_use dict
  • Each Compose service gets its own build_arguments and dockerfile_context (from that component's PLATFORM)
  • Global --build_args CLI overrides still apply to all components (backward compatible)
  • Add unit tests for different PLATFORM / PRECICE_REF per component

Fixes #873

Test plan

  • cd tests && python3 -m unittest test_per_component_build_args.py
  • Quickstart system test: Docker build + run pass locally

Each Docker service now gets its own build arguments from components.yaml
instead of sharing one merged dict that could overwrite PLATFORM and
PRECICE_REF across participants.

Fixes precice#873

@MakisH MakisH left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the bugifx! It seems to work as intended - I could start cases with different platform and PRECICE_REF per component: https://github.com/precice/tutorials/actions/runs/32732790538/attempts/1

I had the impression that this PR is not that polished yet, as it removes/changes a bit more than is needed to fix the issue. As for the test, I would not start with tests for the tests in this PR.

Comment thread changelog-entries/907.md Resolved
Comment thread tests/systemtests/Systemtest.py Resolved
Comment thread tests/systemtests/Systemtest.py Resolved
Comment thread tests/systemtests/Systemtest.py Resolved
Comment thread tests/systemtests/Systemtest.py Resolved
Comment thread tests/test_per_component_build_args.py Resolved
@PranjalManhgaye
PranjalManhgaye requested a review from MakisH August 25, 2026 05:50
@MakisH
MakisH merged commit d8e4ab9 into precice:develop Aug 25, 2026
1 check passed
@MakisH

MakisH commented Aug 26, 2026 •

Copy link
Copy Markdown
Member

After merging this one, it looks like a few components fail to set some _REF arguments:

Details:

  • For the rust-brindings, the ref now is main, but previously a full commit hash.
  • For the SU2 adapter, the ref is empty.
  • For the fluid-fake/solid-fake, the ref is empty.
  • For many other cases that use the Python bindings, the ref resolves correctly.

@MakisH

MakisH commented Aug 26, 2026

Copy link
Copy Markdown
Member

It looks like the git ref resolution step is not triggered anymore. Compare the new logs to the old logs.

New logs:

No argument provided for needed parameter PLATFORM on component rust-bindings. Substituting with ubuntu_2404.
No argument provided for needed parameter PRECICE_REF on component rust-bindings. Substituting with develop.
No argument provided for needed parameter PRECICE_PRESET on component rust-bindings. Substituting with production-audit.
No argument provided for needed parameter TUTORIALS_REF on component rust-bindings. Substituting with develop.
No argument provided for needed parameter RUST_BINDINGS_REF on component rust-bindings. Substituting with main.
No argument provided for needed parameter PLATFORM on component su2-adapter. Substituting with ubuntu_2404.
No argument provided for needed parameter PRECICE_REF on component su2-adapter. Substituting with develop.
No argument provided for needed parameter PRECICE_PRESET on component su2-adapter. Substituting with production-audit.
No argument provided for needed parameter TUTORIALS_REF on component su2-adapter. Substituting with develop.
No argument provided for needed parameter SU2_VERSION on component su2-adapter. Substituting with 7.5.1.
No argument provided for needed parameter SU2_ADAPTER_REF on component su2-adapter. Substituting with develop.
No argument provided for needed parameter PLATFORM on component openfoam-adapter. Substituting with ubuntu_2404.
No argument provided for needed parameter PRECICE_REF on component openfoam-adapter. Substituting with develop.
No argument provided for needed parameter PRECICE_PRESET on component openfoam-adapter. Substituting with production-audit.
No argument provided for needed parameter TUTORIALS_REF on component openfoam-adapter. Substituting with develop.
No argument provided for needed parameter OPENFOAM_EXECUTABLE on component openfoam-adapter. Substituting with openfoam2512.
No argument provided for needed parameter OPENFOAM_ADAPTER_REF on component openfoam-adapter. Substituting with develop.
No argument provided for needed parameter PLATFORM on component bare. Substituting with ubuntu_2404.
No argument provided for needed parameter PRECICE_REF on component bare. Substituting with develop.
No argument provided for needed parameter PRECICE_PRESET on component bare. Substituting with production-audit.
No argument provided for needed parameter TUTORIALS_REF on component bare. Substituting with develop.

Old logs:


No argument provided for needed parameter PRECICE_REF. Substituting with develop.
Resolved the git ref develop of the repository https://github.com/precice/precice to https://github.com/precice/precice/commits/4332db11c541cf490035ee4602faa266d80aa0e1 .
No argument provided for needed parameter TUTORIALS_REF. Substituting with develop.
Resolved the git ref develop of the repository https://github.com/precice/tutorials to https://github.com/precice/tutorials/commits/d4172d9379b57d82b4454179275fc7c2f2aa9724 .
No argument provided for needed parameter PLATFORM. Substituting with ubuntu_2404.
No argument provided for needed parameter PRECICE_PRESET. Substituting with production-audit.
No argument provided for needed parameter ASTE_REF. Substituting with develop.
Resolved the git ref develop of the repository https://github.com/precice/aste to https://github.com/precice/aste/commits/4e32a4f942e0b96f56095cea653d4af470dee1d4 .
No argument provided for needed parameter OPENFOAM_EXECUTABLE. Substituting with openfoam2512.
No argument provided for needed parameter CALCULIX_ADAPTER_REF. Substituting with develop.
Resolved the git ref develop of the repository https://github.com/precice/calculix-adapter to https://github.com/precice/calculix-adapter/commits/e3b7a6f17a2c53bf4b4263405f794544373f0d87 .
No argument provided for needed parameter OPENFOAM_ADAPTER_REF. Substituting with develop.
Resolved the git ref develop of the repository https://github.com/precice/openfoam-adapter to https://github.com/precice/openfoam-adapter/commits/c7e95a8a2cc868e5e5cc8fbab05e874dd56d6a0c .
No argument provided for needed parameter CALCULIX_VERSION. Substituting with 2.20.
No argument provided for needed parameter PYTHON_BINDINGS_REF. Substituting with develop.
Resolved the git ref develop of the repository https://github.com/precice/python-bindings to https://github.com/precice/python-bindings/commits/7b4e02a508cd97f92b3db6295ec9a64e0766c076 .
No argument provided for needed parameter FENICS_ADAPTER_REF. Substituting with develop.
Resolved the git ref develop of the repository https://github.com/precice/fenics-adapter to https://github.com/precice/fenics-adapter/commits/4615720762f402cac085c51a6444d81c36c65bb1 .
No argument provided for needed parameter RUST_BINDINGS_REF. Substituting with main.
Resolved the git ref main of the repository https://github.com/precice/rust-bindings to https://github.com/precice/rust-bindings/commits/8c6459aa3f5b314af4e05ae87cc6eeb35d75ba2e .
No argument provided for needed parameter FMI_RUNNER_REF. Substituting with main.
Resolved the git ref main of the repository https://github.com/precice/fmi-runner to https://github.com/precice/fmi-runner/commits/4003d4b4703599cf664f274912f5f81b2f2c5c64 .
No argument provided for needed parameter FENICSX_ADAPTER_REF. Substituting with develop.
Resolved the git ref develop of the repository https://github.com/precice/fenicsx-adapter to https://github.com/precice/fenicsx-adapter/commits/c1c338be270477ced082785fc8e2606688dde748 .
No argument provided for needed parameter SU2_VERSION. Substituting with 7.5.1.
No argument provided for needed parameter SU2_ADAPTER_REF. Substituting with develop.
Resolved the git ref develop of the repository https://github.com/precice/su2-adapter to https://github.com/precice/su2-adapter/commits/fde3106dab5941590f45aba135eec9fe0f450a47 .
No argument provided for needed parameter DUMUX_ADAPTER_REF. Substituting with develop.
Resolved the git ref develop of the repository https://github.com/precice/dumux-adapter to https://github.com/precice/dumux-adapter/commits/7bb2e8d0551283f47fd71d5a44e695154a328731 .
No argument provided for needed parameter DUNE_VERSION_DUMUX. Substituting with 2.9.
No argument provided for needed parameter DUMUX_VERSION. Substituting with 3.7.
No argument provided for needed parameter DEALII_ADAPTER_REF. Substituting with develop.
Resolved the git ref develop of the repository https://github.com/precice/dealii-adapter to https://github.com/precice/dealii-adapter/commits/67ae059ade0db805ba4d5cd562d7895b36acbe37 .
No argument provided for needed parameter DUNE_VERSION_DUNE. Substituting with 2.9.
No argument provided for needed parameter DUNE_ADAPTER_REF. Substituting with main.
Resolved the git ref main of the repository https://github.com/precice/dune-adapter to https://github.com/precice/dune-adapter/commits/0723530a3f4131ed720b4883daf4aa99aac5c485 .

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request updates the system test Docker Compose generation so build arguments (and dockerfile contexts derived from PLATFORM) are resolved per component instead of being flattened into a single shared dictionary, addressing cases where different components need different defaults from components.yaml.

Changes:

  • Introduce build_arguments_by_component and resolve defaults/CLI overrides per component, with a merged view retained for shared stages.
  • Render each Compose service with its own build_arguments and dockerfile_context based on that component’s PLATFORM, and validate all referenced dockerfile contexts exist.
  • Add a changelog entry documenting the fix.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tests/systemtests/Systemtest.py Resolve and apply per-component build arguments and per-service dockerfile contexts; keep merged args for shared stages.
changelog-entries/907.md Document the system test per-component build-args fix.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +311 to +315
# If a commit has already been resolved and added to the build
# arguments, it will be propagated to the next test in the test suite.
# To avoid resolving the same commit again, simply check if the key
# has the same length as the output of _resolve_branch_ref_to_commit.
# The whole process assumes that all components use the same refs.
Comment thread tests/systemtests/Systemtest.py Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

System tests components cannot use different build arguments

3 participants