Skip to content

Adding a new ready condition FileState - #402

Open
MaciejKaszynski wants to merge 2 commits into
eclipse-score:mainfrom
etas-contrib:new-file-state-config
Open

Adding a new ready condition FileState#402
MaciejKaszynski wants to merge 2 commits into
eclipse-score:mainfrom
etas-contrib:new-file-state-config

Conversation

@MaciejKaszynski

Copy link
Copy Markdown
Contributor

Adding a new ready condition for file state.

E.g. a component like "setup network" can wait for some /dev/<network file> to make the component active. Then Later components can depend on this.

@github-actions

github-actions Bot commented Aug 3, 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: 6d081059-746f-456b-a2de-562a4c263dcb
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 (38 packages loaded, 10 targets configured)

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

Analyzing: target //:license-check (137 packages loaded, 596 targets configured)

Analyzing: target //:license-check (157 packages loaded, 4197 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).
[13 / 16] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 0s disk-cache, processwrapper-sandbox
[14 / 16] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar; 0s disk-cache, processwrapper-sandbox
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: 30.986s, Critical Path: 2.24s
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

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

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

@MaciejKaszynski MaciejKaszynski changed the title Adding new config field Adding a new ready condition FileState Aug 3, 2026
* **Description:** Specifies the required existence state of the file.
* **Allowed Values:**
* ``"Exists"``: The component is ready when the file at ``file_path`` exists.
* ``"Deleted"``: The component is ready when the file at ``file_path`` is deleted.

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.

Are there any files which cannot be watched via inotify and thus we need to poll for their existence with some to-be-configured interval?

* **Allowed Values:**
* ``"Running"``: The process has started and reached its running state.
* ``"Terminated"``: The process has started, reached its running state, and then terminated successfully.
* **file_state** (object, optional)

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.

Is it valid to configure both process_state and file_state at the same time?

{
ProcessState process_state{ProcessState::Running};
std::optional<ProcessState> process_state{ProcessState::Running};
std::optional<FileState> file_state;

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 wonder if here or even in the user config we shall introduce some 'type' attribute that defines which type of ready condition is configured/used, or is it intended to support any combinations of these?

"readyCondition" : {
   "type": "PROCESS_STATE",
   ....
}

For now with just 2 types its probably still manageable as is.
If we introduce more ready conditions, it might get out of hand.

// Absolute path to the file being watched.
file_path:string (required); // required
// Existence state of the file. Defaults to Exists if not specified.
state:FileExistenceState = Exists; // optional, defaults to Exists

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.

Currently, all the default values are in scripts/config_mapping/lifecycle_config.py

I think this mapping is not existing in the PR

"description": "Specifies a ready condition based on the existence state of a file at a given path.",
"properties": {
"file_path": {
"type": "string",

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.

Is it possible to specify a regex here to validate the basic format of the path?
For example that it is an absolute path that starts with "/".

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.

2 participants