Repository navigation
Fix per-component build arguments in system tests - #907
Conversation
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
f8b587f to
af7a526
Compare
MakisH
left a comment
There was a problem hiding this comment.
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.
|
After merging this one, it looks like a few components fail to set some
Details:
|
|
It looks like the git ref resolution step is not triggered anymore. Compare the new logs to the old logs. New logs: Old logs: |
There was a problem hiding this comment.
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_componentand resolve defaults/CLI overrides per component, with a merged view retained for shared stages. - Render each Compose service with its own
build_argumentsanddockerfile_contextbased on that component’sPLATFORM, 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.
| # 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. |
Summary
components.yamlinstead of merging all parameters into one flatparams_to_usedictbuild_argumentsanddockerfile_context(from that component'sPLATFORM)--build_argsCLI overrides still apply to all components (backward compatible)PLATFORM/PRECICE_REFper componentFixes #873
Test plan
cd tests && python3 -m unittest test_per_component_build_args.py