OS Core Lib Azure merge requestshttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests2023-08-18T12:43:59Zhttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/150too many cosmosdb request exception handler2023-08-18T12:43:59ZNeelesh Thakurtoo many cosmosdb request exception handlerM9 - Release 0.12https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/138Token generation based on pod identity2023-08-18T12:44:12ZAbhishek PatilToken generation based on pod identity## All Submissions:
-------------------------------------
* [YES] I have added an explanation of what changes in this merge do and why we should include it?
* [YES] I have updated the documentation accordingly.
* [NA] I have added tests ...## All Submissions:
-------------------------------------
* [YES] I have added an explanation of what changes in this merge do and why we should include it?
* [YES] I have updated the documentation accordingly.
* [NA] I have added tests to cover my changes.
* [YES] All new and existing tests passed.
* [YES] My code follows the code style of this project.
* [NO] I ran lint checks locally prior to submission.
## What is the issue or story related to the change?
-------------------------------------
<!-- Please describe the current behavior that you are modifying, 'or' link to a relevant issue.
Feel free to add references to any design documents you might have shared with the team or any
related MR that you are building on top of. -->
High level design:
Issue: <!-- Link any __GitLab__ workitem(s) to this pull request. -->
<!-- Please add implementation details of current set of changes and how the code changes are
doing what they are expected to do. Are there any complex loops or designated code blocks that
should be elaborated? Is there some contextual knowledge that the reviewer should be aware of? -->
Change details:
Added logic to generate token using managed identity credentials.
## Test coverage:
------------------
<!-- Mention unit test coverage of changes. -->
## Does this introduce a breaking change?
-------------------------------------
- [NO]
<!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. -->
## Pending items
----------------
<!-- Are there changes that you'll introduce in upcoming MRs and hence did not add in this one? Next steps of your
feature can also be mentioned here. -->
## Reviewer request
-------------------
- Please provide an ETA when you plan to review this MR. Write a comment to decline or provide an ETA.
- Block the MR if you feel there is less testing or no details in the MR
- Please cover the following aspects in the MR
-- Coding design: _\<Reviewer1>_
-- Backward Compatibility: _\<Reviewer2>_
-- Feature Logic: _\<Logic design\>_
-- _\<Any other context mention here>_
OR
-- _\<Component 1>_: _\<Reviewer1>_
-- _\<CosmosDB>_: _\<Reviewer2>_
-- _\<ServiceBus>_ _\<Reviewer3>_
-- _\<Mention any other component and owner>_
## Other information
-------------------------------------
<!-- Any other information that is important to this MR such as screenshots of how the component looks before and after the change. -->
Tested these changes with storage service.M8 - Release 0.11Abhishek PatilAbhishek Patilhttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/155throw explicit 503 when server is busy to process BlobStorage request so clie...2023-08-18T12:43:51ZNeelesh Thakurthrow explicit 503 when server is busy to process BlobStorage request so client can retryWe see Storage API starts to responds with 500 when system is under heavy ingestion for very few requests. On closer look, we found that BlobStorage is throttled and underlaying error message is following:
AppException(error=AppError(co...We see Storage API starts to responds with 500 when system is under heavy ingestion for very few requests. On closer look, we found that BlobStorage is throttled and underlaying error message is following:
AppException(error=AppError(code=500, reason=Failed to read specified blob, message=Status code 503, "<?xml version="1.0" encoding="utf-8"?><Error><Code>ServerBusy</Code><Message>The server is busy._RequestId:82895e12-701e-0066-26d3-b568b7000000_Time:2021-09-30T08:13:49.5116925Z</Message></Error>", errors=null, debuggingInfo=null, originalException=com.azure.storage.blob.models.BlobStorageException: Status code 503, "<?xml version="1.0" encoding="utf-8"?><Error><Code>ServerBusy</Code><Message>The server is busy.
RequestId:82895e12-701e-0066-26d3-b568b7000000
Time:2021-09-30T08:13:49.5116925Z</Message></Error>"), originalException=com.azure.storage.blob.models.BlobStorageException: Status code 503, "<?xml version="1.0" encoding="utf-8"?><Error><Code>ServerBusy</Code><Message>The server is busy.
RequestId:82895e12-701e-0066-26d3-b568b7000000
Time:2021-09-30T08:13:49.5116925Z</Message></Error>")
![image](/uploads/2ac4650821f1a3ae252b65f4a5958d3c/image.png)
With this change, client can retry based of response code.M9 - Release 0.12https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/326[TEST] AzureAuditLogger debugging2024-01-16T12:46:36ZRahul Khapre[TEST] AzureAuditLogger debugging## All Submissions:
-------------------------------------
* [YES/NO] I have added an explanation of what changes in this merge do and why we should include it?
* [YES/NO] I have updated the documentation accordingly.
* [YES/NO/NA] I have...## All Submissions:
-------------------------------------
* [YES/NO] I have added an explanation of what changes in this merge do and why we should include it?
* [YES/NO] I have updated the documentation accordingly.
* [YES/NO/NA] I have added tests to cover my changes.
* [YES/NO/NA] All new and existing tests passed.
* [YES/NO/NA] My code follows the code style of this project.
* [YES/NO/NA] I ran lint checks locally prior to submission.
## What is the issue or story related to the change?
-------------------------------------
<!-- Please describe the current behavior that you are modifying, 'or' link to a relevant issue.
Feel free to add references to any design documents you might have shared with the team or any
related MR that you are building on top of. -->
High level design:
Issue: <!-- Link any __GitLab__ workitem(s) to this pull request. -->
<!-- Please add implementation details of current set of changes and how the code changes are
doing what they are expected to do. Are there any complex loops or designated code blocks that
should be elaborated? Is there some contextual knowledge that the reviewer should be aware of? -->
Change details:
## Test coverage:
------------------
<!-- Mention unit test coverage of changes. -->
## Does this introduce a breaking change?
-------------------------------------
- [YES/NO]
<!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. -->
## Pending items
----------------
<!-- Are there changes that you'll introduce in upcoming MRs and hence did not add in this one? Next steps of your
feature can also be mentioned here. -->
## Reviewer request
-------------------
- Please provide an ETA when you plan to review this MR. Write a comment to decline or provide an ETA.
- Block the MR if you feel there is less testing or no details in the MR
- Please cover the following aspects in the MR
-- Coding design: _\<Reviewer1>_
-- Backward Compatibility: _\<Reviewer2>_
-- Feature Logic: _\<Logic design\>_
-- _\<Any other context mention here>_
OR
-- _\<Component 1>_: _\<Reviewer1>_
-- _\<CosmosDB>_: _\<Reviewer2>_
-- _\<ServiceBus>_ _\<Reviewer3>_
-- _\<Mention any other component and owner>_
## Other information
-------------------------------------
<!-- Any other information that is important to this MR such as screenshots of how the component looks before and after the change. -->https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/284Support for bulk patch2023-03-07T18:19:35ZAlok JoshiSupport for bulk patchAs part of [ADR](https://community.opengroup.org/osdu/platform/system/storage/-/issues/124), we are implementing a solution in Storage service. We want to use Cosmos's implicit patch document support to implement this feature in Storage ...As part of [ADR](https://community.opengroup.org/osdu/platform/system/storage/-/issues/124), we are implementing a solution in Storage service. We want to use Cosmos's implicit patch document support to implement this feature in Storage serivce. This change introduces the ability to do that via this library's methods. We are using CosmosContainer's bulk executor support.M17 - Release 0.20Alok JoshiAlok Joshihttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/266Style check update2023-08-25T22:30:45ZSrishti SharmaStyle check updateAdded Style Check - Javadoc update to fix stylecheck Errors.
![image](/uploads/ce32bd4031cec86cb1384ed075f8810e/image.png)Added Style Check - Javadoc update to fix stylecheck Errors.
![image](/uploads/ce32bd4031cec86cb1384ed075f8810e/image.png)https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/193Standardize worker logs2023-08-18T12:43:19ZVibhuti Sharma [Microsoft]Standardize worker logs**Aim**
Enable worker services to follow a common logging format.
**Implementation**
* Added an Abstract class for MessageHandler class that is defined in worker services like WKS and Indexer Queue, to follow a common start and end work...**Aim**
Enable worker services to follow a common logging format.
**Implementation**
* Added an Abstract class for MessageHandler class that is defined in worker services like WKS and Indexer Queue, to follow a common start and end worker log template.
* Added WorkerPayload class in logging module, along with logWorker method in CoreLogger
**Related MRs**
* https://community.opengroup.org/osdu/platform/system/storage/-/merge_requests/382/diffsM11 - Release 0.14Vibhuti Sharma [Microsoft]Vibhuti Sharma [Microsoft]https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/240Stack trace Enhancement2023-08-18T12:42:45ZSrishti SharmaStack trace Enhancement## All Submissions:
-------------------------------------
* [YES/NO] I have added an explanation of what changes in this merge do and why we should include it? Yes
* [YES/NO] I have updated the documentation accordingly.
* [YES/NO/NA] I ...## All Submissions:
-------------------------------------
* [YES/NO] I have added an explanation of what changes in this merge do and why we should include it? Yes
* [YES/NO] I have updated the documentation accordingly.
* [YES/NO/NA] I have added tests to cover my changes. Yes
* [YES/NO/NA] All new and existing tests passed. Yes
* [YES/NO/NA] My code follows the code style of this project. Yes
* [YES/NO/NA] I ran lint checks locally prior to submission. Yes
## What is the issue or story related to the change?
-------------------------------------
**Issue: **Stack trace is split across multiple line and contains unnecessary information.
**Impact:** Issue is resulting in too many logs. Also impacts DRI's troubleshooting.
**Target: **Reduce stack trace by having each exception without line breaks and removing unwanted details from stacktrace.
High level design:
**PBI:** Product Backlog Item 12836: Enhance exception stack traces - Boards (azure.com)
**Extension of Bug:** Stack traces split across multiple lines - Boards (azure.com)
1. Changes made to log4j2.xml to define the PatternLayout for the exceptions.
2. We filter out packages that would not be necessary for troubleshooting. For example: org.apache,org.springframework,sun.reflect,javax.servlet
3. We remove new lines from the Exception and replace with | separator to avoid exception splitting across multiple lines.
4. Please find below the difference between a segment of generated exception before and after changes: -
**Before:**
2022-09-02 12:36:52.315 ERROR DESKTOP-JF1LE60 --- [nio-8086-exec-6] o.o.o.f.a.FileLocationApi correlation-id=15bcefbe-e482-47b0-a07e-5284580f09d1 data-partition-id=mstest3221-dp api-method=GET operation-name={GET [/v2/files/uploadURL]} user-id=51d2f791-795b-4c8d-9657-cd23b1f9f2a7 app-id=:blah something bad happened java.lang.RuntimeException: koopa
at org.opengroup.osdu.file.api.FileLocationApi.getLocationFile(FileLocationApi.java:81) [file-core-0.17.0-SNAPSHOT.jar!/:0.17.0-SNAPSHOT]
at org.opengroup.osdu.file.api.FileLocationApi$$FastClassBySpringCGLIB$$3bf58739.invoke(<generated>) [file-core-0.17.0-SNAPSHOT.jar!/:0.17.0-SNAPSHOT]
**at org.springframework**.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) [spring-core-5.3.12.jar!/:5.3.12]
**at org.springframework**.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783) [spring-aop-5.3.12.jar!/:5.3.12]
**at org.springframework**.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) [spring-aop-5.3.12.jar!/:5.3.12]
**at org.springframework**.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753) [spring-aop-5.3.12.jar!/:5.3.12]
**at org.springframework**.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:123) [spring-context-5.3.12.jar!/:5.3.12]
**at org.springframework.aop.framework**.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) [spring-aop-5.3.12.jar!/:5.3.12]
**at org.springframework.aop.framework**.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753) [spring-aop-5.3.12.jar!/:5.3.12]
**at org.springframework.aop.framework**.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698) [spring-aop-5.3.12.jar!/:5.3.12]
at org.opengroup.osdu.file.api.FileLocationApi$$EnhancerBySpringCGLIB$$ac97402f.getLocationFile(<generated>) [file-core-0.17.0-SNAPSHOT.jar!/:0.17.0-SNAPSHOT]
**After:**
2022-09-05 13:43:34.633 INFO DESKTOP-JF1LE60 --- [nio-8086-exec-4] o.o.o.a.l.Slf4JLogger correlation-id=e1c58641-6788-4a03-bcf0-fd3778a8f2f9 data-partition-id=mstest3221-dp api-method=GET operation-name={GET [/v2/files/uploadURL]} user-id=51d2f791-795b-4c8d-9657-cd23b1f9f2a7 app-id=:file.app method: GET | latency: 0 | url: /groups | correlation id: e1c58641-6788-4a03-bcf0-fd3778a8f2f9 {correlation-id=e1c58641-6788-4a03-bcf0-fd3778a8f2f9, data-partition-id=mstest3221-dp}
2022-09-05 13:43:34.638 ERROR DESKTOP-JF1LE60 --- [nio-8086-exec-4] o.o.o.a.l.Slf4JLogger correlation-id=e1c58641-6788-4a03-bcf0-fd3778a8f2f9 data-partition-id=mstest3221-dp api-method=GET operation-name={GET [/v2/files/uploadURL]} user-id=51d2f791-795b-4c8d-9657-cd23b1f9f2a7 app-id=:file.app null {correlation-id=e1c58641-6788-4a03-bcf0-fd3778a8f2f9, data-partition-id=mstest3221-dp} org.opengroup.osdu.core.common.model.http.AppException: Internal communication failure| at org.opengroup.osdu.core.common.http.HttpClientHandler.sendRequest(HttpClientHandler.java:107) ~[os-core-common-0.16.0.jar!/:?]**| at **org.opengroup.osdu.core.common.http.UrlFetchServiceImpl.sendRequest(UrlFetchServiceImpl.java:64) ~[os-core-common-0.16.0.jar!/:?]| at org.opengroup.osdu.core.common.http.UrlFetchServiceImpl.sendRequest(UrlFetchServiceImpl.java:44) ~[os-core-common-0.16.0.jar!/:?]**| at** org.opengroup.osdu.core.common.http.UrlFetchServiceImpl$$FastClassBySpringCGLIB$$7ffb74e.invoke(<generated>) ~[os-core-common-0.16.0.jar!/:?]| ... **suppressed 9 lines**| at org.opengroup.osdu.core.common.http.UrlFetchServiceImpl$$EnhancerBySpringCGLIB$$e035e205.sendRequest(<generated>) ~[os-core-common-0.16.0.jar!/:?]| at org.opengroup.osdu.azure.httpconfig.HttpClientAzure.decoratedSend(HttpClientAzure.java:63) ~[core-lib-azure-0.17.0-SNAPSHOT.jar!/:?]| at org.opengroup.osdu.azure.httpconfig.HttpClientAzure.send(HttpClientAzure.java:91) ~[core-lib-azure-0.17.0-SNAPSHOT.jar!/:?]| at org.opengroup.osdu.core.common.entitlements.EntitlementsService.getGroups(EntitlementsService.java:77) ~[os-core-common-0.16.0.jar!/:?]| at org.opengroup.osdu.core.common.entitlements.AuthorizationServiceImpl.authorizeAny(AuthorizationServiceImpl.java:52) ~[os-core-common-0.16.0.jar!/:?]| at org.opengroup.osdu.file.middleware.AuthorizationFilter.hasPermission(AuthorizationFilter.java:50) ~[file-core-0.17.0-SNAPSHOT.jar!/:0.17.0-SNAPSHOT]| at org.opengroup.osdu.file.middleware.AuthorizationFilter$$FastClassBySpringCGLIB$$5aded031.invoke(<generated>) ~[file-core-0.17.0-SNAPSHOT.jar!/:0.17.0-SNAPSHOT]| ... suppressed 9 lines| at org.opengroup.osdu.file.middleware.AuthorizationFilter$$EnhancerBySpringCGLIB$$919911a8.hasPermission(<generated>) ~[file-core-0.17.0-SNAPSHOT.jar!/:0.17.0-SNAPSHOT]| ... **suppressed 3 lines**| at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_332]| ... suppressed 18 lines| at org.opengroup.osdu.file.api.FileLocationApi$$EnhancerBySpringCGLIB$$64470961.getLocationFile(<generated>) ~[file-core-0.17.0-SNAPSHOT.jar!/:0.17.0-SNAPSHOT]| at org.opengroup.osdu.file.api.FileLocationApi$$FastClassBySpringCGLIB$$3bf58739.invoke(<generated>) ~[file-core-0.17.0-SNAPSHOT.jar!/:0.17.0-SNAPSHOT]| ... **suppressed 9 lines**
## Test coverage:
------------------
Tested in IntelliJ Console and Kusto
## Does this introduce a breaking change?
-------------------------------------
- No
## Pending items
----------------
No
## Reviewer request
-------------------
- Please provide an ETA when you plan to review this MR. Write a comment to decline or provide an ETA.
- Block the MR if you feel there is less testing or no details in the MR
- Please cover the following aspects in the MR
-- Coding design: _\<Reviewer1>_
-- Backward Compatibility: _\<Reviewer2>_
-- Feature Logic: _\<Logic design\>_
-- _\<Any other context mention here>_
OR
-- _\<Component 1>_: _\<Reviewer1>_
-- _\<CosmosDB>_: _\<Reviewer2>_
-- _\<ServiceBus>_ _\<Reviewer3>_
-- _\<Mention any other component and owner>_
## Other information
-------------------------------------
<!-- Any other information that is important to this MR such as screenshots of how the component looks before and after the change. -->M14 - Release 0.17https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/162Size limit2023-08-18T12:43:43ZAlok JoshiSize limitMinor improvement over https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/160Minor improvement over https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/160M10 - Release 0.13Alok JoshiAlok Joshihttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/88simple-xml jar fix2023-08-18T12:45:04ZLarissa Pereirasimple-xml jar fixFix for the vulnerable simple-xml jar that was identified by our internal scansFix for the vulnerable simple-xml jar that was identified by our internal scansM6 - Release 0.9https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/70Set App Insights user_Id value for requests and exceptions2021-08-24T11:57:28ZKelly DomicoSet App Insights user_Id value for requests and exceptionsSet App Insights "user_Id" value for requests and exceptions. This value is copied from the customDimensions object. Setting the user_Id makes it easier for creating dashboards on the Azure portal.Set App Insights "user_Id" value for requests and exceptions. This value is copied from the customDimensions object. Setting the user_Id makes it easier for creating dashboards on the Azure portal.Kishore BattulaVibhuti Sharma [Microsoft]Kishore Battulahttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/103Rosakhuj/cosmos22021-06-20T09:46:59ZRonak SakhujaRosakhuj/cosmos2Duplicate of https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/98
## All Submissions:
-------------------------------------
* [YES] I have added an explanation of what changes in this...Duplicate of https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/98
## All Submissions:
-------------------------------------
* [YES] I have added an explanation of what changes in this merge do and why we should include it?
* [NO] I have updated the documentation accordingly.
* [YES] I have added tests to cover my changes.
* [YES] All new and existing tests passed.
* [YES] My code follows the code style of this project.
* [YES] I ran lint checks locally prior to submission.
## What is the issue or story related to the change?
-------------------------------------
CosmosDB offers option for configuring MaxRetryAttempts and MaxRetryWaitTime. For any service who wish not to use the default values, and want to provide custom values for the mentioned attributes, they will be able to after this change.
High level design:
![image](/uploads/24e32c7ff6c8541f98fed70324aa998b/image.png)
Issue: <!-- Link any __GitLab__ workitem(s) to this pull request. -->
We are adding some configurable options for retries in CosmosDB to common.properties. Services can override these properties through application.properties and set their own custom values.
Sample values
azure.cosmos.maxRetryCount=9
azure.cosmos.retryWaitTimeout=30
## Test coverage:
------------------
<!-- Mention unit test coverage of changes. -->
## Does this introduce a breaking change?
-------------------------------------
- [NO]
<!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. -->
## Pending items
----------------
<!-- Are there changes that you'll introduce in upcoming MRs and hence did not add in this one? Next steps of your
feature can also be mentioned here. -->
## Reviewer request
-------------------
- Please provide an ETA when you plan to review this MR. Write a comment to decline or provide an ETA.
- Block the MR if you feel there is less testing or no details in the MR
- Please cover the following aspects in the MR
-- Coding design: _\<Reviewer1>_
-- Backward Compatibility: _\<Reviewer2>_
-- Feature Logic: _\<Logic design\>_
-- _\<Any other context mention here>_
OR
-- _\<Component 1>_: _\<Reviewer1>_
-- _\<CosmosDB>_: _\<Reviewer2>_
-- _\<ServiceBus>_ _\<Reviewer3>_
-- _\<Mention any other component and owner>_
## Other information
-------------------------------------
<!-- Any other information that is important to this MR such as screenshots of how the component looks before and after the change. -->https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/234Revert "Merge branch 'update-spring-version' into 'master'"2022-09-15T08:30:34ZKrishna Nikhil VedurumudiRevert "Merge branch 'update-spring-version' into 'master'"## All Submissions:
-------------------------------------
* [YES/NO] I have added an explanation of what changes in this merge do and why we should include it?
* [YES/NO] I have updated the documentation accordingly.
* [YES/NO/NA] I have...## All Submissions:
-------------------------------------
* [YES/NO] I have added an explanation of what changes in this merge do and why we should include it?
* [YES/NO] I have updated the documentation accordingly.
* [YES/NO/NA] I have added tests to cover my changes.
* [YES/NO/NA] All new and existing tests passed.
* [YES/NO/NA] My code follows the code style of this project.
* [YES/NO/NA] I ran lint checks locally prior to submission.
## What is the issue or story related to the change?
-------------------------------------
<!-- Please describe the current behavior that you are modifying, 'or' link to a relevant issue.
Feel free to add references to any design documents you might have shared with the team or any
related MR that you are building on top of. -->
High level design:
Issue: <!-- Link any __GitLab__ workitem(s) to this pull request. -->
<!-- Please add implementation details of current set of changes and how the code changes are
doing what they are expected to do. Are there any complex loops or designated code blocks that
should be elaborated? Is there some contextual knowledge that the reviewer should be aware of? -->
Change details:
## Test coverage:
------------------
<!-- Mention unit test coverage of changes. -->
## Does this introduce a breaking change?
-------------------------------------
- [YES/NO]
<!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. -->
## Pending items
----------------
<!-- Are there changes that you'll introduce in upcoming MRs and hence did not add in this one? Next steps of your
feature can also be mentioned here. -->
## Reviewer request
-------------------
- Please provide an ETA when you plan to review this MR. Write a comment to decline or provide an ETA.
- Block the MR if you feel there is less testing or no details in the MR
- Please cover the following aspects in the MR
-- Coding design: _\<Reviewer1>_
-- Backward Compatibility: _\<Reviewer2>_
-- Feature Logic: _\<Logic design\>_
-- _\<Any other context mention here>_
OR
-- _\<Component 1>_: _\<Reviewer1>_
-- _\<CosmosDB>_: _\<Reviewer2>_
-- _\<ServiceBus>_ _\<Reviewer3>_
-- _\<Mention any other component and owner>_
## Other information
-------------------------------------
<!-- Any other information that is important to this MR such as screenshots of how the component looks before and after the change. -->M14 - Release 0.17https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/181Revert back to 0.13.0-SNAPSHOT2022-01-24T16:15:44ZDavid Diederichd.diederich@opengroup.orgRevert back to 0.13.0-SNAPSHOTThe 0.13.1-SNAPSHOT artifact version is used by the release/0.13 branch to prepare for the first patch of 0.13 (that is,
0.13.1). Utilizing the version here on the default branch will create packages that could interfere with that develo...The 0.13.1-SNAPSHOT artifact version is used by the release/0.13 branch to prepare for the first patch of 0.13 (that is,
0.13.1). Utilizing the version here on the default branch will create packages that could interfere with that development line when
it comes into existence.
Additionally, other logic that attempts to find the latest version will return 0.13.1-SNAPSHOT as being newer than 0.13.0 (full
release), even though this isn't true. When used in the release branch, this relationship does hold -- development in preparation
for the first patch _is_ newer than the last release.M10 - Release 0.13David Diederichd.diederich@opengroup.orgDavid Diederichd.diederich@opengroup.orghttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/176Resolve "Upgrade to Log4J 2.17.1 to address CVE-2021-44832"2022-01-18T19:23:41ZDavid Diederichd.diederich@opengroup.orgResolve "Upgrade to Log4J 2.17.1 to address CVE-2021-44832"Closes #16Closes #16M10 - Release 0.13David Diederichd.diederich@opengroup.orgDavid Diederichd.diederich@opengroup.orghttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/124Resolve "Reset to 0.10.0-SNAPSHOT"2021-06-29T09:14:41ZDavid Diederichd.diederich@opengroup.orgResolve "Reset to 0.10.0-SNAPSHOT"Closes #10Closes #10M7 - Release 0.10David Diederichd.diederich@opengroup.orgDavid Diederichd.diederich@opengroup.orghttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/237Replaced insert bulk operation with upsert for cosmos client2022-09-01T16:14:59ZDmitrii Novikov (EPAM)Replaced insert bulk operation with upsert for cosmos clientReplaced type of operation from insert to replace due to breaking changes in following MRs:
https://community.opengroup.org/osdu/platform/system/storage/-/merge_requests/427
https://community.opengroup.org/osdu/platform/system/lib/cloud/...Replaced type of operation from insert to replace due to breaking changes in following MRs:
https://community.opengroup.org/osdu/platform/system/storage/-/merge_requests/427
https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/211M13 - Release 0.16Dmitrii Novikov (EPAM)Dmitrii Novikov (EPAM)https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/91Replace CosmosCache with Map2023-08-18T12:45:01ZKrishna Nikhil VedurumudiReplace CosmosCache with Map## All Submissions:
-------------------------------------
* [YES/NO] I have added an explanation of what changes in this merge do and why we should include it?
* [YES/NO] I have updated the documentation accordingly.
* [YES] I have added...## All Submissions:
-------------------------------------
* [YES/NO] I have added an explanation of what changes in this merge do and why we should include it?
* [YES/NO] I have updated the documentation accordingly.
* [YES] I have added tests to cover my changes.
* [YES] All new and existing tests passed.
* [YES] My code follows the code style of this project.
* [YES] I ran lint checks locally prior to submission.
## What is the issue or story related to the change?
-------------------------------------
<!-- Please describe the current behavior that you are modifying, 'or' link to a relevant issue.
Feel free to add references to any design documents you might have shared with the team or any
related MR that you are building on top of. -->
As per the recommendation from Cosmos team, there should be single client of Cosmos during the entire life cycle of the application.
The cosmos clients are heavy in nature and can eat up significant amount of memory. Using a cache is leading to two issues.
1. Expiry of existing clients causes cache eviction which is leading to connection leaks.
2. It is anyway not required, given that whatever Cosmos GoneExceptions are raised by the Cosmos are handled by the SDK itself.
High level design:
Issue: <!-- Link any __GitLab__ workitem(s) to this pull request. -->
<!-- Please add implementation details of current set of changes and how the code changes are
doing what they are expected to do. Are there any complex loops or designated code blocks that
should be elaborated? Is there some contextual knowledge that the reviewer should be aware of? -->
Change details:
## Test coverage:
------------------
<!-- Mention unit test coverage of changes. -->
## Does this introduce a breaking change?
-------------------------------------
- [YES/NO]
<!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. -->
## Pending items
----------------
<!-- Are there changes that you'll introduce in upcoming MRs and hence did not add in this one? Next steps of your
feature can also be mentioned here. -->
## Reviewer request
-------------------
- Please provide an ETA when you plan to review this MR. Write a comment to decline or provide an ETA.
- Block the MR if you feel there is less testing or no details in the MR
- Please cover the following aspects in the MR
-- Coding design: _\<Reviewer1>_
-- Backward Compatibility: _\<Reviewer2>_
-- Feature Logic: _\<Logic design\>_
-- _\<Any other context mention here>_
OR
-- _\<Component 1>_: _\<Reviewer1>_
-- _\<CosmosDB>_: _\<Reviewer2>_
-- _\<ServiceBus>_ _\<Reviewer3>_
-- _\<Mention any other component and owner>_
## Other information
-------------------------------------
<!-- Any other information that is important to this MR such as screenshots of how the component looks before and after the change. -->
Before fix, during scale up - the number of GoneExceptions were high.
![Before_fix](/uploads/1cb6196d3c6c195d3f11d32b3f33b4bc/Before_fix.PNG)
### After fix, during scale up - no GoneExceptions
![After_fix](/uploads/725bfb17da48a467ff7f936bbb73496f/After_fix.PNG)
### Logs that confirm Cosmos client per partition is created only once.
![Cosmos_Created_only_once](/uploads/3665f5bb55d6ee1106bef9a7b5728538/Cosmos_Created_only_once.PNG)
### Response status with scale up
![5xx_while_scale_up](/uploads/d40a1bdb6bd184a0dc3d63673310e3a8/5xx_while_scale_up.PNG)M6 - Release 0.9Krishna Nikhil VedurumudiKrishna Nikhil Vedurumudihttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/32rename azure.activedirectory.client-id to avoid triggering AADAuthFilter2023-08-18T12:46:23ZNeelesh Thakurrename azure.activedirectory.client-id to avoid triggering AADAuthFilterrename azure.activedirectory.client-id setting to avoid triggering AADAppRoleStatelessAuthenticationFilter at start-up. If we enable the Istio with externalized authentication and disabled AADAppRoleStatelessAuthenticationFilter for a se...rename azure.activedirectory.client-id setting to avoid triggering AADAppRoleStatelessAuthenticationFilter at start-up. If we enable the Istio with externalized authentication and disabled AADAppRoleStatelessAuthenticationFilter for a service, and include '`azure.activedirectory.client-id`' in application.properties than spring auto configuration will trigger AADAppRoleStatelessAuthenticationFilter at startup and cause start-up error.
AAD client Id is required by each service to get a bearer token to call Partition service. This configuration is only utilized for this use-case for now and it will decouple partition service specific requirements from authN/Z
We missed this case while testing partition service integration.M1 - Release 0.1https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/180Removing unused variables2023-08-18T12:43:29ZAbhishek Kumar (SLB)Removing unused variablesFix for the issue described here: https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/issues/17Fix for the issue described here: https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/issues/17M11 - Release 0.14Abhishek Kumar (SLB)Paresh BehedeAbhishek Kumar (SLB)