Skip to content

Add minimal cardinality for service dependencies#840

Merged
pnoltes merged 13 commits intoapache:masterfrom
Deedss:feature/minimal_cardinality
Apr 16, 2026
Merged

Add minimal cardinality for service dependencies#840
pnoltes merged 13 commits intoapache:masterfrom
Deedss:feature/minimal_cardinality

Conversation

@Deedss
Copy link
Copy Markdown
Contributor

@Deedss Deedss commented Apr 1, 2026

Introduce a minimal cardinality for service dependencies to determine when a service dependency is considered to be available. This gives the ability to wait for a component to start until a certain number of a service dependency are available.

Mentioned in https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.component.html#service.component-minimum.cardinality.property.

Update:

  • Removed usage of setRequired and use minimalCardinality to determine whether a serviceDependency is required or not.

@PengZheng PengZheng requested review from PengZheng and pnoltes April 2, 2026 00:42
- Add service count to printinfo
Copy link
Copy Markdown
Contributor

@pnoltes pnoltes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, just got a remark about the functional test coverage

Comment thread libs/framework/gtest/src/DependencyManagerTestSuite.cc
Copy link
Copy Markdown
Contributor

@pnoltes pnoltes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread libs/framework/gtest/src/DependencyManagerTestSuite.cc
@Deedss Deedss requested a review from pnoltes April 8, 2026 19:12
Copy link
Copy Markdown
Contributor

@PengZheng PengZheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement, thanks!

Overall LGTM. I just left some minor remarks.

Comment thread libs/framework/include/celix_dm_info.h
Comment thread libs/framework/benchmark/src/DependencyManagerBenchmark.cc Outdated
Comment thread examples/celix-examples/dm_example/phase2a/src/phase2a_activator.c
Comment thread libs/framework/src/dm_service_dependency.c Outdated
…ve memory layout of celix_dm_service_dependency_info_struct.
@Deedss Deedss requested a review from PengZheng April 14, 2026 14:29
Comment thread documents/components.md Outdated
Comment thread documents/components.md Outdated
Co-authored-by: PengZheng <howtofly@gmail.com>
Copy link
Copy Markdown
Contributor

@PengZheng PengZheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@pnoltes pnoltes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but one small nitpick: Please update the CHANGES.md for the backward incompatible update (removal setRequired).

@Deedss Deedss requested a review from pnoltes April 15, 2026 15:34
@pnoltes pnoltes merged commit d4b2ec3 into apache:master Apr 16, 2026
17 checks passed
@Deedss Deedss deleted the feature/minimal_cardinality branch April 16, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants