Adding a new ready condition FileState - #402
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
FileState
6d1b659 to
90ddedb
Compare
053c31b to
9f99911
Compare
3e74eea to
a4dacda
Compare
a4dacda to
4116757
Compare
4116757 to
7377dba
Compare
| table ReadyCondition { | ||
| process_state:ProcessState = null; // required | ||
| // Required state of the component's POSIX process. | ||
| process_state:ProcessState = null; // optional |
There was a problem hiding this comment.
| process_state:ProcessState = null; // optional | |
| process_state:ProcessState; // optional |
optional non-scalar values are currently all defined without "= null" in this schema because flatbuffer will just return nullptr if not configured which can be used for checking.
Its a bit counter intuitive, but the "= null" is used here for required scalar values so that it can be verified in the code that they have been configured (if they are just marked as required, then flatbuffer will return a default value and its not detectable if they have actually been configured or not).
There was a problem hiding this comment.
So I think the behavior we want is to be able to either configure process_state or file_state (might want more than one in the future but for now just one).
I think since ProcessState is an enum so a scalar value and I do not get a ptr so can't do it this way from what I see.
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.