Skip to content

Support deployment_config/working_dir value - #356

Open
TimoSteuerwaldETAS wants to merge 35 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 35 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: 8eac4f87-4672-4162-9df8-1369acac633a
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 (37 packages loaded, 10 targets configured)

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

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

INFO: Analyzed target //:license-check (175 packages loaded, 11535 targets configured).
[12 / 16] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 0s disk-cache, processwrapper-sandbox ... (2 actions running)
[14 / 16] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar; 0s disk-cache, processwrapper-sandbox
[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: 32.676s, Critical Path: 2.67s
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?

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 20 commits July 31, 2026 11:51
With new version 0.5.0 this is no longer needed.
Two test modifications:
- If no working_dir is defined, bin directory is used.
- A working dir defined on deployment config level can be overridden on component level
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>
@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?

"//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")
]

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