Skip to content

Add Async Operation Status Tracking OSGi Component #6641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 56 commits into from
May 14, 2025

Conversation

roshanemoraes
Copy link
Contributor

@roshanemoraes roshanemoraes commented Mar 21, 2025

Current Limitation

WSO2 Identity Server (IS) performs various asynchronous operations, such as sharing applications and users across organizations, bulk user imports, and outbound provisioning. While error logs exist, they are not convenient for administrators to filter and analyze, making it difficult to identify failures and take corrective actions efficiently. Without such notifications, administrators may be unaware of failures or issues, leading to inconsistencies and delays in corrective actions.

Purpose

This pull request introduces a new OSGi component designed to enhance the WSO2 Carbon Identity framework's ability to manage and track the status of asynchronous operations. This component provides a comprehensive solution for monitoring the progress and outcomes of long-running tasks.

This component takes care of providing an overview of the most recent sharing status related with an asynchronous operation at the feature level.

Key Features and Changes:

Asynchronous Operation Status Tracking: Implements a robust and persistent mechanism for recording and monitoring the status of asynchronous operations within the WSO2 Carbon Identity framework.

Database Persistence:
Introduces two new database tables to persist operation statuses, ensuring data durability across system restarts:
IDN_ASYNC_OPERATION_STATUS and IDN_ASYNC_OPERATION_STATUS_UNIT.

OSGi Service Component:
Develops an OSGi service component, comprising the AsyncStatusMgtService interface and its implementation class AsyncStatusMgtServiceImpl, to manage the lifecycle and data access for asynchronous operation statuses.

The AsyncStatusMgtService interface defines the core methods for registering, updating, retrieving, and querying operation statuses.
The AsyncStatusMgtServiceImpl class provides the concrete implementation, handling database interactions and business logic.

Related Issues

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

Copy link

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@SujanSanjula96
Copy link
Contributor

Test failures are known intermittent failures.

 [INFO] Results:
 [INFO] 
 [ERROR] Failures: 
 [ERROR] org.wso2.identity.integration.test.auth.SecondaryStoreUserLoginTestCase.testUserLogin(org.wso2.identity.integration.test.auth.SecondaryStoreUserLoginTestCase)
 [INFO] Run 1: PASS
 [ERROR] Run 2: SecondaryStoreUserLoginTestCase.testUserLogin:148 SessionDataKeyConsent key value is null expected object to not be null
 [INFO] Run 3: PASS
 [ERROR] Run 4: SecondaryStoreUserLoginTestCase.testUserLogin:148 SessionDataKeyConsent key value is null expected object to not be null
 [INFO] 
 [ERROR] OAuth2TokenExchangeGrantTypeTestCase.testTokenExchangeForLocalUser:241->exchangeToken:284 NullPointer
 [ERROR] org.wso2.identity.integration.test.recovery.UsernameRecoveryTestCase.testUsernameRecoveryForEmailOnly(org.wso2.identity.integration.test.recovery.UsernameRecoveryTestCase)
 [ERROR] Run 1: UsernameRecoveryTestCase.testUsernameRecoveryForEmailOnly:198->getUsernameFromEmail:513 expected:<true> but was:<false>
 [ERROR] Run 2: UsernameRecoveryTestCase.testUsernameRecoveryForEmailOnly:198->getUsernameFromEmail:513 expected:<true> but was:<false>
 [INFO] 
 [ERROR] org.wso2.identity.integration.test.recovery.UsernameRecoveryTestCase.testUsernameRecoveryForSmsOnly(org.wso2.identity.integration.test.recovery.UsernameRecoveryTestCase)
 [ERROR] Run 1: UsernameRecoveryTestCase.testUsernameRecoveryForSmsOnly:214->OIDCAbstractIntegrationTest.createUser:95 User creation failed expected:<201> but was:<409>
 [ERROR] Run 2: UsernameRecoveryTestCase.testUsernameRecoveryForSmsOnly:214->OIDCAbstractIntegrationTest.createUser:95 User creation failed expected:<201> but was:<409>
 [INFO] 
 [ERROR] org.wso2.identity.integration.test.recovery.UsernameRecoveryTestCase.testUsernameRecoveryWithBothChannels(org.wso2.identity.integration.test.recovery.UsernameRecoveryTestCase)
 [ERROR] Run 1: UsernameRecoveryTestCase.testUsernameRecoveryWithBothChannels:235->OIDCAbstractIntegrationTest.createUser:95 User creation failed expected:<201> but was:<409>
 [ERROR] Run 2: UsernameRecoveryTestCase.testUsernameRecoveryWithBothChannels:235->OIDCAbstractIntegrationTest.createUser:95 User creation failed expected:<201> but was:<409>
 [ERROR] Run 3: UsernameRecoveryTestCase.testUsernameRecoveryWithBothChannels:235->OIDCAbstractIntegrationTest.createUser:95 User creation failed expected:<201> but was:<409>
 [ERROR] Run 4: UsernameRecoveryTestCase.testUsernameRecoveryWithBothChannels:235->OIDCAbstractIntegrationTest.createUser:95 User creation failed expected:<201> but was:<409>
 [INFO] 
 [ERROR] UsernameRecoveryTestCase.testUsernameRecoveryWithMultipleUsersSupport:282->validateUsernameForMultipleUserInMail:523 expected:<true> but was:<false>
 [ERROR] org.wso2.identity.integration.test.rest.api.server.user.store.v1.UserStoreFailureTest.testUpdateUserStoreByIdNegativeCase(org.wso2.identity.integration.test.rest.api.server.user.store.v1.UserStoreFailureTest)
 [ERROR] Run 1: UserStoreFailureTest.testUpdateUserStoreByIdNegativeCase:119->RESTTestBase.validateErrorResponse:915->RESTTestBase.validateHttpStatusCode:957 1 expectation failed.
 Expected status code <404> but was <200>.
 
 [INFO] Run 2: PASS
 [INFO] 
 [ERROR] org.wso2.identity.integration.test.rest.api.server.user.store.v1.UserStoreSuccessTest.testAddSecondaryUserStore(org.wso2.identity.integration.test.rest.api.server.user.store.v1.UserStoreSuccessTest)
 [INFO] Run 1: PASS
 [ERROR] Run 2: UserStoreSuccessTest.testAddSecondaryUserStore:114 » AxisFault Transport error...
 [INFO] 
 [ERROR] UserSessionMeSuccessTest.testConclude:77 NullPointer
 [ERROR] UserSessionMeSuccessTest>UserSessionTest.testInitData:134->UserSessionTest.createServiceProvider:231 » Remote
 [ERROR] org.wso2.identity.integration.test.scim2.SCIM2MultiAttributeUserFilterTestCase.testMultiAttributeFilterUser(org.wso2.identity.integration.test.scim2.SCIM2MultiAttributeUserFilterTestCase)
 [ERROR] Run 1: SCIM2MultiAttributeUserFilterTestCase.testMultiAttributeFil

@SujanSanjula96 SujanSanjula96 merged commit 8a00a44 into wso2:master May 14, 2025
3 checks passed
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.

7 participants