Skip to content
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

Fix incorrect attribute name removal in SCIM URIs #601

Merged

Conversation

PasinduYeshan
Copy link
Contributor

This PR fixes an issue where :attributeName was being removed from all occurrences within the SCIM attribute URIs instead of only the last occurrence. The fix ensures that only the last occurrence of the suffix.

Related Issue

Copy link

codecov bot commented Feb 3, 2025

Codecov Report

Attention: Patch coverage is 55.55556% with 4 lines in your changes missing coverage. Please review.

Project coverage is 47.34%. Comparing base (59ea797) to head (b034005).
Report is 13 commits behind head on master.

Files with missing lines Patch % Lines
...n/identity/scim2/common/utils/AttributeMapper.java 55.55% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #601      +/-   ##
============================================
- Coverage     47.34%   47.34%   -0.01%     
+ Complexity     1130     1046      -84     
============================================
  Files            41       41              
  Lines          9139     9146       +7     
  Branches       2431     2431              
============================================
+ Hits           4327     4330       +3     
- Misses         3883     3885       +2     
- Partials        929      931       +2     
Flag Coverage Δ
unit 33.30% <55.55%> (+0.39%) ⬆️

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.

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@PasinduYeshan
Copy link
Contributor Author

PasinduYeshan commented Feb 3, 2025

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

[ERROR] Tests run: 3219, Failures: 5, Errors: 0, Skipped: 18, Time elapsed: 5,947.764 s <<< FAILURE! - in TestSuite
2025-02-03T11:51:40.6348203Z [ERROR] testUserListingPagination(org.wso2.identity.integration.test.scim2.SCIM2PaginationTestCase)  Time elapsed: 0.055 s  <<< FAILURE!
2025-02-03T11:51:40.6362776Z org.apache.axis2.AxisFault: Transport error: 401 Error: 
2025-02-03T11:51:40.6363852Z 	at org.wso2.identity.integration.test.scim2.SCIM2PaginationTestCase.getCurrentUsersCount(SCIM2PaginationTestCase.java:282)
2025-02-03T11:51:40.6365550Z 	at org.wso2.identity.integration.test.scim2.SCIM2PaginationTestCase.testUserListingPagination(SCIM2PaginationTestCase.java:125)
2025-02-03T11:51:40.6366420Z 
2025-02-03T11:51:40.6367138Z [ERROR] testUserListingPagination(org.wso2.identity.integration.test.scim2.SCIM2PaginationTestCase)  Time elapsed: 0.013 s  <<< FAILURE!
2025-02-03T11:51:40.6368207Z org.apache.axis2.AxisFault: Transport error: 401 Error: 
2025-02-03T11:51:40.6369240Z 	at org.wso2.identity.integration.test.scim2.SCIM2PaginationTestCase.getCurrentUsersCount(SCIM2PaginationTestCase.java:282)
2025-02-03T11:51:40.6370791Z 	at org.wso2.identity.integration.test.scim2.SCIM2PaginationTestCase.testUserListingPagination(SCIM2PaginationTestCase.java:125)
2025-02-03T11:51:40.6371694Z 
2025-02-03T11:51:40.6372551Z [ERROR] testUserListingPaginationWithoutParams(org.wso2.identity.integration.test.scim2.SCIM2PaginationTestCase)  Time elapsed: 0.007 s  <<< FAILURE!
2025-02-03T11:51:40.6373746Z org.apache.axis2.AxisFault: Transport error: 401 Error: 
2025-02-03T11:51:40.6395601Z 	at org.wso2.identity.integration.test.scim2.SCIM2PaginationTestCase.getCurrentUsersCount(SCIM2PaginationTestCase.java:282)
2025-02-03T11:51:40.6397267Z 	at org.wso2.identity.integration.test.scim2.SCIM2PaginationTestCase.testUserListingPaginationWithoutParams(SCIM2PaginationTestCase.java:157)
2025-02-03T11:51:40.6398209Z 
2025-02-03T11:51:40.6398973Z [ERROR] testUserListingPaginationWithoutParams(org.wso2.identity.integration.test.scim2.SCIM2PaginationTestCase)  Time elapsed: 0.008 s  <<< FAILURE!
2025-02-03T11:51:40.6400111Z org.apache.axis2.AxisFault: Transport error: 401 Error: 
2025-02-03T11:51:40.6401102Z 	at org.wso2.identity.integration.test.scim2.SCIM2PaginationTestCase.getCurrentUsersCount(SCIM2PaginationTestCase.java:282)
2025-02-03T11:51:40.6403010Z 	at org.wso2.identity.integration.test.scim2.SCIM2PaginationTestCase.testUserListingPaginationWithoutParams(SCIM2PaginationTestCase.java:157)
2025-02-03T11:51:40.6404055Z 
2025-02-03T11:51:40.6405031Z [ERROR] testInit(org.wso2.identity.integration.test.user.mgt.JDBCBasedUserMgtTestCase)  Time elapsed: 88.858 s  <<< FAILURE!
2025-02-03T11:51:40.6406250Z org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException: UserAdminUserAdminException
2025-02-03T11:51:40.6407440Z 	at org.wso2.identity.integration.test.user.mgt.JDBCBasedUserMgtTestCase.testInit(JDBCBasedUserMgtTestCase.java:39)
2025-02-03T11:51:40.6408223Z 
2025-02-03T11:51:41.0465616Z [INFO] 
2025-02-03T11:51:41.0467147Z [INFO] Results:
2025-02-03T11:51:41.0467548Z [INFO] 
2025-02-03T11:51:41.0468096Z [ERROR] Failures: 
2025-02-03T11:51:41.0469413Z [ERROR] org.wso2.identity.integration.test.scim2.SCIM2PaginationTestCase.testUserListingPagination(org.wso2.identity.integration.test.scim2.SCIM2PaginationTestCase)
2025-02-03T11:51:41.0471620Z [ERROR]   Run 1: SCIM2PaginationTestCase.testUserListingPagination:125->getCurrentUsersCount:282 » AxisFault
2025-02-03T11:51:41.0473077Z [ERROR]   Run 2: SCIM2PaginationTestCase.testUserListingPagination:125->getCurrentUsersCount:282 » AxisFault
2025-02-03T11:51:41.0474112Z [INFO] 
2025-02-03T11:51:41.0475499Z [ERROR] org.wso2.identity.integration.test.scim2.SCIM2PaginationTestCase.testUserListingPaginationWithoutParams(org.wso2.identity.integration.test.scim2.SCIM2PaginationTestCase)
2025-02-03T11:51:41.0476830Z [ERROR]   Run 1: SCIM2PaginationTestCase.testUserListingPaginationWithoutParams:157->getCurrentUsersCount:282 » AxisFault
2025-02-03T11:51:41.0477802Z [ERROR]   Run 2: SCIM2PaginationTestCase.testUserListingPaginationWithoutParams:157->getCurrentUsersCount:282 » AxisFault
2025-02-03T11:51:41.0478496Z [INFO] 
2025-02-03T11:51:41.0478924Z [ERROR]   JDBCBasedUserMgtTestCase.testInit:39 » UserAdminUserAdmin UserAdminUserAdminEx...
2025-02-03T11:51:41.0479343Z [INFO] 
2025-02-03T11:51:41.0479569Z [ERROR] Tests run: 3217, Failures: 3, Errors: 0, Skipped: 18

Above test cases are intermittently failing.

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/13129635330
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/13129635330

@PasinduYeshan PasinduYeshan merged commit 65a719c into wso2-extensions:master Feb 5, 2025
5 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.

3 participants