Skip to content

Support deployment_config/working_dir value - #356

Open
TimoSteuerwaldETAS wants to merge 37 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 37 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: c323edf0-8322-462e-8226-55c70943b362
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: 
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)

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

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

Analyzing: target //:license-check (149 packages loaded, 3026 targets configured)

Analyzing: target //:license-check (162 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 (170 packages loaded, 8185 targets configured)

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

Analyzing: target //:license-check (172 packages loaded, 11381 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)

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.525s, Critical Path: 2.51s
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

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.

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 14 commits July 31, 2026 11:51
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>
@TimoSteuerwaldETAS
TimoSteuerwaldETAS force-pushed the feature/honor-deployment-config-working-dir branch from 144bfd4 to d3e845a Compare July 31, 2026 09:59
Before, this warning appeared:
Test execution time ... outside of range for MODERATE tests. Consider setting timeout="short" or size="small".
@NicolasFussberger

Copy link
Copy Markdown
Contributor

New test fails when run in devcontainer
Error: sched_setscheduler() failed (errno 1) (Operation not permitted)

@TimoSteuerwaldETAS Can you modify the devcontainer json to make sure this works?

Comment thread tests/integration/sandbox_options/BUILD Outdated
"//tests/utils/test_helper",
"@googletest//:gtest_main",
],
)

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.

Suggestion:

Replace

cc_binary(
    name = "sandbox_options_process_a",
    srcs = [
        "sandbox_options_process.cpp",
        "verify_sandbox.hpp",
    ],
    deps = [
        "//score/launch_manager:control_cc",
        "//score/launch_manager:lifecycle_cc",
        "//tests/utils/test_helper",
        "@googletest//:gtest_main",
    ],
)

cc_binary(
    name = "sandbox_options_process_b",
    srcs = [
        "sandbox_options_process.cpp",
        "verify_sandbox.hpp",
    ],
    deps = [
        "//score/launch_manager:control_cc",
        "//score/launch_manager:lifecycle_cc",
        "//tests/utils/test_helper",
        "@googletest//:gtest_main",
    ],
)

cc_binary(
    name = "sandbox_options_process_c",
    srcs = [
        "sandbox_options_process.cpp",
        "verify_sandbox.hpp",
    ],
    deps = [
        "//score/launch_manager:control_cc",
        "//score/launch_manager:lifecycle_cc",
        "//tests/utils/test_helper",
        "@googletest//:gtest_main",
    ],
)

with

[
    cc_binary(
        name = "sandbox_options_process_{}".format(suffix),
        srcs = [
            "sandbox_options_process.cpp",
            "verify_sandbox.hpp",
        ],
        deps = [
            "//score/launch_manager:control_cc",
            "//score/launch_manager:lifecycle_cc",
            "//tests/utils/test_helper",
            "@googletest//:gtest_main",
        ],
    )
    for suffix in ("a", "b", "c")
]

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.

Good idea! 🚀 Thanks for pointing out!

@TimoSteuerwaldETAS

TimoSteuerwaldETAS commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

New test fails when run in devcontainer Error: sched_setscheduler() failed (errno 1) (Operation not permitted)

@TimoSteuerwaldETAS Can you modify the devcontainer json to make sure this works?

@NicolasFussberger I tried, for proxy reasons I am unable to use devcontainer. So I can not verify it. Please give it a try.

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