Skip to content

Set isFragmentApp property for when invoking shared application creation#601

Merged
ShanChathusanda93 merged 1 commit intowso2-extensions:mainfrom
ShanChathusanda93:shared-app-property-branch
Feb 26, 2026
Merged

Set isFragmentApp property for when invoking shared application creation#601
ShanChathusanda93 merged 1 commit intowso2-extensions:mainfrom
ShanChathusanda93:shared-app-property-branch

Conversation

@ShanChathusanda93
Copy link
Contributor

@ShanChathusanda93 ShanChathusanda93 commented Feb 17, 2026

Purpose

$subject
Related to wso2/product-is#26758

Summary by CodeRabbit

  • New Features

    • OAuth applications created via the UI/API are now marked as fragment applications, enabling finer-grained application composition.
  • Chores

    • Bumped OAuth inbound component version to 7.4.14.
    • Added test-scoped OAuth dependency to support updated test coverage.

Copy link

@wso2-engineering wso2-engineering bot left a comment

Choose a reason for hiding this comment

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

AI Agent Log Improvement Checklist

⚠️ Warning: AI-Generated Review Comments

  • The log-related comments and suggestions in this review were generated by an AI tool to assist with identifying potential improvements. Purpose of reviewing the code for log improvements is to improve the troubleshooting capabilities of our products.
  • Please make sure to manually review and validate all suggestions before applying any changes. Not every code suggestion would make sense or add value to our purpose. Therefore, you have the freedom to decide which of the suggestions are helpful.

✅ Before merging this pull request:

  • Review all AI-generated comments for accuracy and relevance.
  • Complete and verify the table below. We need your feedback to measure the accuracy of these suggestions and the value they add. If you are rejecting a certain code suggestion, please mention the reason briefly in the suggestion for us to capture it.
Comment Accepted (Y/N) Reason
#### Log Improvement Suggestion No: 1
#### Log Improvement Suggestion No: 2

@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

📝 Walkthrough

Walkthrough

Marks newly created OAuth consumer applications as fragment apps by setting a fragment flag and updates test-scoped OAuth dependency versions in two pom.xml files (property bump and added test dependency).

Changes

Cohort / File(s) Summary
OAuth Application Configuration
components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/OrgApplicationManagerImpl.java
Sets consumerApp.setIsFragmentApp(true) when creating OAuth consumer applications (behavior change only).
Root POM — Dependency/version bump
pom.xml
Added test-scoped dependency org.wso2.carbon.identity.inbound.auth.oauth2:org.wso2.carbon.identity.oauth.rar and updated property identity.inbound.auth.oauth.version from 7.0.155 to 7.4.14.
Module POM — Test dependency
components/org.wso2.carbon.identity.organization.management.claim.provider/pom.xml
Added test-scoped dependency org.wso2.carbon.identity.inbound.auth.oauth2:org.wso2.carbon.identity.oauth.rar.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • HasiniSama
  • wso2-engineering

Poem

🐰 I hopped through the code with a tiny zap,
Flagged an OAuth app as a fragmenty chap,
Tweaked a version and added a test friend,
A hop, a patch — then off I wend! 🎩✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The PR description is severely incomplete, missing most required sections of the template including Goals, Approach, User stories, Developer Checklist, Release note, Documentation, Training, Certification, Marketing, Automation tests, Security checks, Samples, Related PRs, Migrations, Test environment, and Learning. Complete the PR description by filling in all required template sections. At minimum, provide Goals describing how the isFragmentApp flag addresses issue #26758, Approach explaining the implementation, Release note, Documentation impact assessment, Security checks confirmation, and Test environment details.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: setting the isFragmentApp property during shared application creation.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/OrgApplicationManagerImpl.java`:
- Line 2299: The call consumerApp.setFragmentApp(true) uses a non-existent
method on OAuthConsumerAppDTO and causes a compile error; replace it by either
calling the correct DTO setter if available (e.g.,
consumerApp.setIsFragmentApp(true) after verifying OAuthConsumerAppDTO's API)
or, if the DTO has no such setter, remove the call and instead mark the app as a
fragment by adding/updating the ServiceProviderProperty named IS_FRAGMENT_APP on
the ServiceProvider (follow the same pattern used elsewhere in the codebase for
setting ServiceProviderProperty to "true"); update references around
OrgApplicationManagerImpl where consumerApp is prepared to use the chosen
approach so compilation and fragment-app semantics remain consistent.

@ShanChathusanda93 ShanChathusanda93 force-pushed the shared-app-property-branch branch from 5cbe221 to 7d6b7fe Compare February 25, 2026 06:36
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pom.xml`:
- Line 606: The pom references a non-existent version for
org.wso2.carbon.identity.oauth: update the property
identity.inbound.auth.oauth.version (currently set to 7.4.14) to a published
version (e.g., 7.4.11) or ensure the artifact
org.wso2.carbon.identity.inbound.auth.oauth2:org.wso2.carbon.identity.oauth at
7.4.14 is available in a configured repository with credentials; change the
version in the pom property or add the repository/credentials so Maven can
resolve the dependency.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5cbe221 and 7d6b7fe.

📒 Files selected for processing (2)
  • components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/OrgApplicationManagerImpl.java
  • pom.xml

@ShanChathusanda93 ShanChathusanda93 force-pushed the shared-app-property-branch branch from 7d6b7fe to 0b23c81 Compare February 25, 2026 09:00
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
pom.xml (1)

612-612: ⚠️ Potential issue | 🔴 Critical

API breaking change: setIsFragmentApp() does not exist in version 7.4.14.

The code at line 2299 calls consumerApp.setIsFragmentApp(true), which follows the 7.0.x DTO API. Between 7.0.x and 7.4.x, the setter was renamed from setIsFragmentApp(boolean) to the standard JavaBean form setFragmentApp(boolean). This code will fail to compile against version 7.4.14.

Either update the code to use setFragmentApp(true) or revert to a 7.0.x version of the dependency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pom.xml` at line 612, The code uses the old setter
consumerApp.setIsFragmentApp(true) which no longer exists in dependency version
7.4.14; update the call to the JavaBean-named setter
consumerApp.setFragmentApp(true) (or revert the dependency to a 7.0.x
identity.inbound.auth.oauth.version) so the code compiles against 7.4.14.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@pom.xml`:
- Line 612: The code uses the old setter consumerApp.setIsFragmentApp(true)
which no longer exists in dependency version 7.4.14; update the call to the
JavaBean-named setter consumerApp.setFragmentApp(true) (or revert the dependency
to a 7.0.x identity.inbound.auth.oauth.version) so the code compiles against
7.4.14.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7d6b7fe and 0b23c81.

📒 Files selected for processing (3)
  • components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/OrgApplicationManagerImpl.java
  • components/org.wso2.carbon.identity.organization.management.claim.provider/pom.xml
  • pom.xml
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/OrgApplicationManagerImpl.java

@ShanChathusanda93
Copy link
Contributor Author

@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/22390265765

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/22390265765
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

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

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/22390265765

@ShanChathusanda93 ShanChathusanda93 merged commit ec25f16 into wso2-extensions:main Feb 26, 2026
3 checks passed
@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.13%. Comparing base (463d6d5) to head (0b23c81).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #601      +/-   ##
============================================
- Coverage     51.11%   49.13%   -1.98%     
+ Complexity     2226     2132      -94     
============================================
  Files           215      215              
  Lines         14447    14448       +1     
  Branches       2385     2385              
============================================
- Hits           7384     7099     -285     
- Misses         6370     6674     +304     
+ Partials        693      675      -18     
Flag Coverage Δ
unit 34.32% <100.00%> (-4.17%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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