-
Notifications
You must be signed in to change notification settings - Fork 33
Removing Config Adapter #455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
MaciejKaszynski
wants to merge
16
commits into
eclipse-score:main
Choose a base branch
from
etas-contrib:new-config
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
8118405
Inital changes
MaciejKaszynski 69ede3d
Rest is working
MaciejKaszynski aa2482c
Fixing rebase
MaciejKaszynski 1b738e3
Graph converted
MaciejKaszynski 8420e6b
Fixing namespace
MaciejKaszynski f2ea525
lm building
MaciejKaszynski 50ec974
Fixing some tests
MaciejKaszynski 84721b9
Fix rebase
MaciejKaszynski 7fff290
Fixing dep graph
MaciejKaszynski f961f8a
Some fixes
MaciejKaszynski 4bbbfed
Adding bad fix
MaciejKaszynski ee01564
Fixing last test
MaciejKaszynski d87d3db
Moving watchdog
MaciejKaszynski 7a58b19
Fixing UTs
MaciejKaszynski 98b3963
Merge branch 'main' into new-config
MaciejKaszynski 7920df4
Addressing some review comments
MaciejKaszynski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
score/launch_manager/src/daemon/src/configuration/component_config.hpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| /******************************************************************************** | ||
| * Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| * | ||
| * See the NOTICE file(s) distributed with this work for additional | ||
| * information regarding copyright ownership. | ||
| * | ||
| * This program and the accompanying materials are made available under the | ||
| * terms of the Apache License Version 2.0 which is available at | ||
| * https://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| ********************************************************************************/ | ||
| #ifndef COMPONENT_CONFIG_HPP | ||
| #define COMPONENT_CONFIG_HPP | ||
|
|
||
| #include <sys/types.h> | ||
| #include <cstdint> | ||
| #include <optional> | ||
| #include <string> | ||
| #include <vector> | ||
|
|
||
| #include "score/mw/launch_manager/configuration/environment_config.hpp" | ||
| #include "score/mw/launch_manager/configuration/recovery_action_config.hpp" | ||
|
|
||
| namespace score::mw::lifecycle::internal::configuration | ||
| { | ||
|
|
||
| struct ComponentAliveSupervision | ||
| { | ||
| std::uint32_t reporting_cycle_ms{}; | ||
| std::uint32_t failed_cycles_tolerance{}; | ||
| std::optional<std::uint32_t> min_indications; | ||
| std::optional<std::uint32_t> max_indications; | ||
| }; | ||
|
|
||
| enum class ApplicationType : std::uint8_t | ||
| { | ||
| Native = 0, | ||
| Reporting = 1, | ||
| ReportingAndSupervised = 2, | ||
| StateManager = 3 | ||
| }; | ||
|
|
||
| struct ApplicationProfile | ||
| { | ||
| ApplicationType application_type{ApplicationType::Native}; | ||
| bool is_self_terminating{}; | ||
| std::optional<ComponentAliveSupervision> alive_supervision; | ||
| }; | ||
|
|
||
| enum class ProcessState : uint8_t | ||
| { | ||
| Running = 0, | ||
| Terminated = 1 | ||
| }; | ||
|
|
||
| struct ReadyCondition | ||
| { | ||
| ProcessState process_state{ProcessState::Running}; | ||
| }; | ||
|
|
||
| struct ComponentProperties | ||
| { | ||
| std::string binary_name; | ||
| ApplicationProfile application_profile; | ||
| std::vector<std::string> depends_on; | ||
| std::vector<std::string> process_arguments; | ||
| std::optional<ReadyCondition> ready_condition; | ||
| }; | ||
| struct Sandbox | ||
| { | ||
| uid_t uid{}; | ||
| gid_t gid{}; | ||
| std::vector<gid_t> supplementary_group_ids; | ||
| std::optional<std::string> security_policy; | ||
| std::int32_t scheduling_policy; | ||
| std::int32_t scheduling_priority{}; | ||
| std::optional<std::uint64_t> max_memory_usage; | ||
| std::optional<std::uint32_t> max_cpu_usage; | ||
| }; | ||
|
|
||
| struct DeploymentConfig | ||
| { | ||
| uint32_t ready_timeout_ms{}; | ||
| uint32_t shutdown_timeout_ms{}; | ||
| Environment environmental_variables; | ||
| std::string bin_dir; | ||
| std::string working_dir; | ||
| std::optional<RestartAction> ready_recovery_action; | ||
| // Currently only SwitchRunTargetAction is supported here, RestartAction to be added in the future | ||
| std::optional<SwitchRunTargetAction> recovery_action; | ||
| Sandbox sandbox; | ||
| }; | ||
|
|
||
| struct ComponentConfig | ||
| { | ||
| std::string name; | ||
| std::string description; | ||
| ComponentProperties component_properties; | ||
| DeploymentConfig deployment_config; | ||
| }; | ||
|
|
||
| } // namespace score::mw::lifecycle::internal::configuration | ||
|
|
||
| #endif // COMPONENT_CONFIG_HPP |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove