Skip to content

Rename IComponent result types - #797

Open
danth wants to merge 1 commit into
eclipse-score:mainfrom
etas-contrib:pin-rename-result
Open

danth wants to merge 1 commit into
eclipse-score:mainfrom
etas-contrib:pin-rename-result

Conversation

@danth

@danth danth commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

I struggled to understand the original code because some values had multiple meanings, and different things were valid depending on the context.

Split into two results, one for de/activate and one for termination. The interesting changes are in icomponent.hpp.

Part of addressing #705 (comment)

@WilliamRoebuck WilliamRoebuck left a comment

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 like removing the error before/after ready distinction, that part was always quite confusing to me. Unfortunately though, a lot of the new changes have just become out of date yesterday since #738.

In summary, the whole async issue is no longer present, kWaiting can probably be removed. As far as I know:

  • tryReportCompletion is no longer needed. Existing calls should be replaced or removed
  • tryHandleTermination - should now only flag an error to the caller or return some sort of void/ignore result (no error yet). Should never return kSuccess. Terminations during startup are resolved at the end using the stored termination result member.
  • activate & deactivate - always runs synchronously and returns success or failure

This all probably allows process monitor to be simplified as well

There are also some leftover unit tests (several of the parameterized ones) that test various async termination scenarios, most of which can be removed.

@danth

danth commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

In summary, the whole async issue is no longer present

This is good to hear. I think most of the dead code will be replaced anyway as part of #705, so in this pull request I'll only make the minimal edits needed to change the error types.

@danth

danth commented Oct 16, 2026

Copy link
Copy Markdown
Member Author

@WilliamRoebuck I've removed the async values from the enums. I'd appreciate if you could take another look :))

@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-797: https://eclipse-score.github.io/lifecycle/pr-797/

Comment thread score/launch_manager/src/daemon/src/process_group_manager/details/icomponent.hpp Outdated
Comment thread score/launch_manager/src/daemon/src/process_group_manager/details/icomponent.hpp Outdated

@WilliamRoebuck WilliamRoebuck left a comment

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.

Looks great now, I only have two small suggestions

IdentifierHash node_identifier;
/// @brief Description of the error.
IComponent::ComponentError reason;
/// @brief Why the activation failed, either kFailure or kTimeout.

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 RequestResult should still be an expected (expected_blank I think) with an error code. Something that can be kSuccess being an error code seems wrong to me.

@NicolasFussberger
NicolasFussberger deployed to workflow-approval October 22, 2026 12:45 — with GitHub Actions Active
@NicolasFussberger
NicolasFussberger deployed to workflow-approval October 22, 2026 12:45 — with GitHub Actions Active
@NicolasFussberger
NicolasFussberger deployed to workflow-approval October 22, 2026 12:45 — with GitHub Actions Active
@NicolasFussberger
NicolasFussberger deployed to workflow-approval October 22, 2026 12:45 — with GitHub Actions Active
@NicolasFussberger

Copy link
Copy Markdown
Contributor

Changes look good to me, though unit test compilation is currently failing on this branch

The old result was difficult to understand because some values had
multiple meanings, and different things were valid depending on the
context.

Split into two results, one for de/activate and one for termination.
The interesting changes are in `icomponent.hpp`.
@danth
danth force-pushed the pin-rename-result branch from 492c494 to bc35e30 Compare October 23, 2026 10:30
@danth
danth requested a deployment to workflow-approval October 23, 2026 10:30 — with GitHub Actions Waiting
@danth
danth requested a deployment to workflow-approval October 23, 2026 10:30 — with GitHub Actions Waiting
@danth
danth requested a deployment to workflow-approval October 23, 2026 10:30 — with GitHub Actions Waiting
@danth
danth requested a deployment to workflow-approval October 23, 2026 10:30 — with GitHub Actions Waiting

This branch is waiting to be deployed

1 waiting deployment
workflow-approval — bc35e30e Waiting Oct 23, 2026 by danth via Build and test unit-tests-x86_64-qnx / approval #1718
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.

4 participants