Skip to content

Support deployment_config/working_dir value - #356

Open
TimoSteuerwaldETAS wants to merge 47 commits into
eclipse-score:mainfrom
etas-contrib:feature/honor-deployment-config-working-dir
Open

Support deployment_config/working_dir value#356
TimoSteuerwaldETAS wants to merge 47 commits into
eclipse-score:mainfrom
etas-contrib:feature/honor-deployment-config-working-dir

Conversation

@TimoSteuerwaldETAS

@TimoSteuerwaldETAS TimoSteuerwaldETAS commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

This fixes #343 .
Furthermore the config mapping tests have been fixed and are executed on the pipeline.
A feature integration test has been also added which is testing various options, not only working dir.

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.6.0) and connecting to it...
INFO: Invocation ID: 58b31573-34e4-443f-a7b1-b234e255ea1d
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)

Analyzing: target //:license-check (31 packages loaded, 10 targets configured)

Analyzing: target //:license-check (86 packages loaded, 10 targets configured)

Analyzing: target //:license-check (90 packages loaded, 10 targets configured)

Analyzing: target //:license-check (144 packages loaded, 2479 targets configured)

Analyzing: target //:license-check (161 packages loaded, 6249 targets configured)

Analyzing: target //:license-check (167 packages loaded, 6298 targets configured)

Analyzing: target //:license-check (167 packages loaded, 6298 targets configured)

Analyzing: target //:license-check (170 packages loaded, 8185 targets configured)

Analyzing: target //:license-check (170 packages loaded, 8185 targets configured)

Analyzing: target //:license-check (170 packages loaded, 8185 targets configured)

Analyzing: target //:license-check (173 packages loaded, 11401 targets configured)

Analyzing: target //:license-check (174 packages loaded, 11409 targets configured)

Analyzing: target //:license-check (174 packages loaded, 11409 targets configured)

Analyzing: target //:license-check (174 packages loaded, 11409 targets configured)

Analyzing: target //:license-check (174 packages loaded, 11409 targets configured)

Analyzing: target //:license-check (174 packages loaded, 11409 targets configured)

INFO: Analyzed target //:license-check (175 packages loaded, 11535 targets configured).
[14 / 16] [Prepa] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar
[15 / 16] Building license.check.license_check.jar (); 0s disk-cache, multiplex-worker
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 35.015s, Critical Path: 2.48s
INFO: 16 processes: 12 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 16 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@github-actions

Copy link
Copy Markdown

The created documentation from the pull request is available at: docu-html

Comment thread patches/score_itf_docker_cap_add.patch Outdated
Comment thread scripts/config_mapping/lifecycle_config.py
Comment thread scripts/config_mapping/lifecycle_config.py Outdated
Comment thread scripts/config_mapping/tests/basic_test/expected_output/lm_demo.json Outdated
@@ -35,6 +36,8 @@ def run_until_file_deployed(
:param file_path: path of the file to wait for on the target.
:param timeout_s: maximum seconds to wait for the file (default: 30).
:param poll_interval_s: seconds between file-existence checks (default: 0.5).

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.

Maybe update the documentation that poll_interval_s is also used to poll process state

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

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.

I think now after your latest rebase its no longer used for checking process state.
So now the documentation update is no longer correct

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Comment thread tests/utils/testing_utils/run_until_file_deployed.py Outdated
Comment thread tests/integration/sandbox_options/BUILD Outdated
Comment thread tests/integration/sandbox_options/sandbox_options_process.cpp Outdated
Comment thread tests/integration/sandbox_options/sandbox_options_process.cpp Outdated
Comment thread tests/integration/sandbox_options/sandbox_options_process.cpp Outdated
Comment thread tests/integration/sandbox_options/sandbox_options_process.cpp Outdated
TEST_STEP("Activate RunTarget Startup")
{
score::cpp::stop_token stop_token;
auto result = client.ActivateRunTarget("Startup").Get(stop_token);

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.

Launch Manager goes to Startup by default. I think this is redundant.
Looks like we can remove the whole control_daemon_mock from this test

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As this test now uses two processes, I would rather stick to control_daemon_mock, because the control_daemon_mock is writing the test_end file. If we drop that process it is unclear when this test is finished, as now the two processes under test need to write the file instead.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Most probably this was related to the missing "is_self_terminating": true option in the application_profile.

It is also passing now in the pipeline: https://github.com/eclipse-score/lifecycle/actions/runs/30453507338/job/90581144811#step:4:4319

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.

Why is the separate Running and Off RunTarget needed for the test?
Can we not just put these processes into Startup and remove the control_daemon_mock altogether?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Moving the processes to Startup state would remove the explicit EXPECT for the run target transition ( ActivateRunTarget("Running") ) from the test, which I don't like. If something is wrong with the run target under test, I do not want to dig in the production code, instead a simple assertion should fail.

Furthermore who writes then the test_end file on which run_until_file_deployed is waiting?
Of course run_until_file_deployed(..) could also wait on the list of files which are used in assert_test_results(..), but then you are no longer verifying that all children processes have finished immediately after switching to "Off".

For both reasons I would like to keep it as it is.

What I could do later on (on the other branch): Get rid of the test specific control_daemon_mock.cpp (for most tests) and create a common version in test_helper subfolder to reduce the duplication.

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.

We can merge it for now, but I think we need to keep these tests minimal for what they testing. E.g. the control client API will be heavily changed and we need to update this test, even though the test scope has nothing to do with ControlClient or RunTarget transitions.

explicit EXPECT for the run target transition

You will still only see an assertion failure for a transition to Running. You will anyway need to dig through the config and then the logs to see why transition has failed. I do not see a huge benefit here.

who writes then the test_end file

I would just create a touch command as a component that depends on the sandbox processes. Then the file is only written if the sandbox processes were launched successfully.
The Off state is also not needed in the config or the explicit transition to Off state.
When launch_manager receives a SIGTERM it will terminate the processes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Comment thread tests/integration/sandbox_options/sandbox_options.json
@TimoSteuerwaldETAS
TimoSteuerwaldETAS force-pushed the feature/honor-deployment-config-working-dir branch from dad60c7 to 71264de Compare July 24, 2026 09:45
TimoSteuerwaldETAS and others added 30 commits August 3, 2026 19:23
if process does not react on SIGTERM
- add another process
- parameterize sandbox_options_process.cpp
Instead of hardcoded path in python.
sandbox_options_process_b was stuck in rare cases, as it never got cpu time and ran into timeout. This was caused by the minimal priority.
So priority has been added here. Furthermore process_c added to check default options.
process_c configures neither a component-level working_dir nor one in the
defaults section, so the launch manager falls back to bin_dir. Pass the
expected default via --working-dir so the test verifies the default
working directory path, mirroring how process_a verifies an explicit one.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Before, this warning appeared:
Test execution time ... outside of range for MODERATE tests. Consider setting timeout="short" or size="small".
Resp. remove outdated file names
Proxy was missing during sudo apt commands. Now config file for apt is written, which uses the content of the environment variable $http_proxy
Instead provide a way to keep environment variables needed on run time private.
To be used also to signal test_end.
Currently not passing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

[launch_manager] Honor deployment_config.working_dir as the spawned process cwd

3 participants