OS Core Lib Azure merge requestshttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests2023-08-18T12:46:43Zhttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/20adding BlobServiceClientFactory2023-08-18T12:46:43ZAman Vermaadding BlobServiceClientFactory## 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
* [YES/NO/NA...## 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
* [YES/NO/NA] I have added tests to cover my changes. NA
* [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?
-------------------------------------
<!-- Please describe the current behavior that you are modifying, 'or' link to a relevant issue. -->
Description:
Adding a factory method get instance of `BlobServiceClient` based on the data partitionId passes.
The current implementation of blobStore does not offer flexibility to query across different containers as it uses the `BlobContinerCLient` hence both `storage account name` and `container name` are fixed.
Issue: <!-- Link any __GitLab__ workitem(s) to this pull request. -->
## Does this introduce a breaking change?
-------------------------------------
- [YES/NO]
NO
<!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. -->
## Other information
-------------------------------------
<!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
This PR only introduces interface and a class implementing it. these changes are not being consumed currently. Will send consecutive MRs to introduce related changes
FYI @kibattul , @polavishnuM1 - Release 0.1Aman VermaAman Vermahttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/21Fixing an Exception Scenario Handling in CosmosStore2023-08-18T12:46:41Zharshit aggarwalFixing an Exception Scenario Handling in CosmosStoreFixing an Exception Scenario Handling in CosmosStore
**Change**:
Throwing 500 exception in case of IOException rather than sending empty responseFixing an Exception Scenario Handling in CosmosStore
**Change**:
Throwing 500 exception in case of IOException rather than sending empty responseM1 - Release 0.1harshit aggarwalharshit aggarwalhttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/22using BlobServiceCientFactory instead of BlobContainerClientFactory2023-08-18T12:46:39ZAman Vermausing BlobServiceCientFactory instead of BlobContainerClientFactory## 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
* [YES/NO/NA...## 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
* [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?
-------------------------------------
<!-- Please describe the current behavior that you are modifying, 'or' link to a relevant issue. -->
Description:
Consuming the `BlobServiceClientFactory`, as introduced in this MR: https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/20
The previous implementation uses `BlobContainerClientFactory` which returns an instance of `BlobContainerClient`. Having BlobContainerClient takes away the flexibility to choose the storage container name on demand, as the container client is tied to a <storage account, container name> combo. Using the service client removes this dependency. Now the container name can be parameterized.
Issue: <!-- Link any __GitLab__ workitem(s) to this pull request. -->
## Does this introduce a breaking change?
-------------------------------------
- [YES/NO]
NO
<!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. -->
## Other information
-------------------------------------
<!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
Next set of changes would be to update Schema service and any other service using BlobStore class, to pass the container name in parameters.
FYI @harshit283 , @kibattul , @polavishnuM1 - Release 0.1Aman VermaAman Vermahttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/23BugFix: moving client creation logic out of constructor2023-08-18T12:46:37ZAman VermaBugFix: moving client creation logic out of constructor## 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. NA
* [YES/NO/NA]...## 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. NA
* [YES/NO/NA] I have added tests to cover my changes. NA
* [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?
-------------------------------------
<!-- Please describe the current behavior that you are modifying, 'or' link to a relevant issue. -->
Description:
Currently, logic to initialize `BlobServiceClient` is inside the constructor. But it relies on `DefaultAzureCredential` bean which has been `Autowired` and at run time we get `NullRefException` as the autowired bean is yet to be picked
FIX: Tagging the constructor with `Autowired` tag so that other autowired components can be passed as parameters.
Issue: <!-- Link any __GitLab__ workitem(s) to this pull request. -->
TESTING: Tested the new package version locally with schema service. All ITs passing.
## Does this introduce a breaking change?
-------------------------------------
- [YES/NO]
NO
<!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. -->
## Other information
-------------------------------------
<!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
FYI @kibattul , @polavishnuM1 - Release 0.1Aman VermaAman Vermahttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/24update client lib to support multi-tenancy2023-08-18T12:46:36ZNeelesh Thakurupdate client lib to support multi-tenancyM1 - Release 0.1https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/25Adding conditional propery for blobStore class2023-08-18T12:46:33ZAman VermaAdding conditional propery for blobStore class## 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
* [YES/NO/NA...## 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
* [YES/NO/NA] I have added tests to cover my changes. NA
* [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?
-------------------------------------
<!-- Please describe the current behavior that you are modifying, 'or' link to a relevant issue. -->
Description:
Adding `ConditionalOnProperty` for blobStore related classes.
This class requires certain properties to be defined in the application.properties file of service which wants to consume `core-lib-azure`. Since not all the services want to consume blobStore class, making the related classes conditional
Issue: <!-- Link any __GitLab__ workitem(s) to this pull request. -->
## Does this introduce a breaking change?
-------------------------------------
- [YES/NO]
NO
<!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. -->
## Other information
-------------------------------------
<!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
FYI @kibattul @polavishnu @dkodeih @danielschollM1 - Release 0.1Aman VermaAman Vermahttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/26cleaning up the IBlobContainerClientFactory related code2023-08-18T12:46:32ZAman Vermacleaning up the IBlobContainerClientFactory related code## 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
* [YES/NO/NA...## 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
* [YES/NO/NA] I have added tests to cover my changes. NA
* [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?
-------------------------------------
<!-- Please describe the current behavior that you are modifying, 'or' link to a relevant issue. -->
Description:
Cleaning up the older blob store related methods.
1. cleaned up the `BlobContainerClientFactoryImpl ` and `IBlobContainerClientFactory `
2. Cleaned up related methods in `BlobStore` class
3. Updated UTs.
Issue: <!-- Link any __GitLab__ workitem(s) to this pull request. -->
Validation:
Ran ITs of schema service with the new package locally
## 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. -->
NO
## Other information
-------------------------------------
<!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
FYI @kibattul , @polavishnu , @dkodeih , @danielschollM1 - Release 0.1Aman VermaAman Vermahttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/27Using SLF4JLogger for CosmosStore2023-08-18T12:46:30Zharshit aggarwalUsing SLF4JLogger for CosmosStoreUsing SLF4JLogger for CosmosStore, current logger is from java.util which is not integrated with
azure app insights
Verified that any logs in CosmosStore are getting populated in Azure app insightsUsing SLF4JLogger for CosmosStore, current logger is from java.util which is not integrated with
azure app insights
Verified that any logs in CosmosStore are getting populated in Azure app insightsM1 - Release 0.1harshit aggarwalharshit aggarwalhttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/28Conditionally enabling TenantFactory component2023-08-18T12:46:28Zharshit aggarwalConditionally enabling TenantFactory componentThis PR contains following changes
1. Conditionally enabling TenantFactory component
This change was introduced because some R2 services already have this Class defined and we get conflicting beans exception.
Now with this change by de...This PR contains following changes
1. Conditionally enabling TenantFactory component
This change was introduced because some R2 services already have this Class defined and we get conflicting beans exception.
Now with this change by default this component will be disabled and services can enable this by setting a flag true
Locally tested in legal serviceM1 - Release 0.1harshit aggarwalharshit aggarwalhttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/29Adding serviceprincipal attribute in TenantInfo2023-08-18T12:46:27Zharshit aggarwalAdding serviceprincipal attribute in TenantInfoAdding serviceprincipal and groups attribute while returning TenantInfo
These are required in indexer service and where not added earlierAdding serviceprincipal and groups attribute while returning TenantInfo
These are required in indexer service and where not added earlierM1 - Release 0.1harshit aggarwalharshit aggarwalhttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/31Adding order in MDC filter2023-08-18T12:46:25ZVibhuti Sharma [Microsoft]Adding order in MDC filter## 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.
* [NA] I have added tests t...## 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.
* [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.
* [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. -->
**High level design:**
Adding Order component in Slf4jMDCFilter class.
**Issue:** <!-- Link any __GitLab__ workitem(s) to this pull request. -->
Correlation-id was not getting logged in customDimensions column of Traces table in appInsights. This was because the order of MDC filter was not set correctly. Adding changes to set the order of this filter correctly.
<!-- 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:**
Setting order of MDCFilter as -104 (logic added as comment in the code itself)
## Test coverage:
------------------
<!-- Mention unit test coverage of changes. -->
N/A
## 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. -->
N/A
## 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. -->M1 - Release 0.1Vibhuti Sharma [Microsoft]Vibhuti Sharma [Microsoft]https://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/33enable missing annotation on BlobServiceClientCache2023-08-18T12:46:22ZNeelesh Thakurenable missing annotation on BlobServiceClientCacheM1 - Release 0.1https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/35Upgrade cosmos2023-08-18T12:46:20ZChristian LecknerUpgrade cosmosM1 - Release 0.1Christian LecknerChristian Lecknerhttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/36adds ability use own ElasticCredentialsCache impl2023-08-18T12:46:18ZAliaksei Darafeyeuadds ability use own ElasticCredentialsCache implM1 - Release 0.1Neelesh ThakurAlok JoshiDuvelis CaraoNeelesh Thakurhttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/37Implementation of get All partitions. After partition implemented that list API2023-08-18T12:46:16ZDuvelis CaraoImplementation of get All partitions. After partition implemented that list APIImplementation of list all tenants
## Dependency
This MR depends on os-core-common where the new partition API for list all partition is defined
https://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_reques...Implementation of list all tenants
## Dependency
This MR depends on os-core-common where the new partition API for list all partition is defined
https://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests/31M1 - Release 0.1ethiraj krishnamanaiduDania Kodeih (Microsoft)Nitin-slbNeelesh ThakurDaniel SchollSherman YangAlok Joshiethiraj krishnamanaiduhttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/39Added Slf4jBindingChecker2023-08-18T12:46:15ZVibhuti Sharma [Microsoft]Added Slf4jBindingChecker## 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.
* [NO] I have added tests t...## 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.
* [NO] 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.
* [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:
Added logic to throw exception at application start if slf4j is not bound to log4j2
Issue: <!-- Link any __GitLab__ workitem(s) to this pull request. -->
If there are multiple bindings available for slf4j, then the binding with log4j2 breaks and consequently the integration with appinsights also breaks. Till date only a warning was being thrown in this scenario, and the application would run without logs going to appinsights. There is a need to fail the application if appinsights integration is broken in such a way.
<!-- 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 component Slf4jBindingChecker
* This component contains a method - performCheck() - that checks the slf4j binding with log4j2, just after the component is initialized as it is annotated with '@PostConstruct'
* Method performCheck() throws a RunTimeException with appropriate error message if binding is not correct. This happens at application startup.
## Test coverage:
------------------
<!-- Mention unit test coverage of changes. -->
Not added
## 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. -->
NA
## 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. -->M1 - Release 0.1Vibhuti Sharma [Microsoft]Vibhuti Sharma [Microsoft]https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/41Azure SDKs Upgrade & Dependency Management2023-08-18T12:46:13ZAbhishek PatilAzure SDKs Upgrade & Dependency Management## 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:
- Azure SDKs upgrade.
- Managed dependencies which are common across all OSDU services.
- HLD [link](https://microsoft-my.sharepoint.com/:w:/p/abpatil/EVbuX6l-7qJAhrjDKyk4PT8BeewI_iZg0mPAwb2WIBhyBg?e=XPJTm6)
Issue: https://dev.azure.com/msazure/One/_workitems/edit/8708897<!-- 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:
- Azure SDKs are upgraded to latest stable version.
- Managed dependencies (azure spring boot starters, reactor-bom, netty-bom etc.) added in POM. These can be inherited by each OSDU service and hence a consistent set of versions for these dependencies will be used across all OSDU services.
## Test coverage:
------------------
Not applicable<!-- 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
----------------
Raise MRs for all OSDU services to use this version of core-lib-azure.<!-- 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
-------------------------------------
None<!-- Any other information that is important to this MR such as screenshots of how the component looks before and after the change. -->M1 - Release 0.1Abhishek PatilAbhishek Patilhttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/42Exception handling fix in CosmosStore2023-08-18T12:46:11ZAbhishek PatilException handling fix in CosmosStore## 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?
-------------------------------------
AppException is not handled in getCosmosContainer method in CosmosStore class. Due to this, for every exception in getCosmosContainer method, 500 error code is thrown.<!-- 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: None
Issue: None<!-- 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 code to handle AppException in getCosmosContainer method. This will make sure that correct error code is thrown instead of just throwing 500 error code for every exception.
## Test coverage:
------------------
NA<!-- 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
----------------
None<!-- 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. -->M1 - Release 0.1Abhishek PatilAbhishek Patilhttps://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/merge_requests/43Implementation to fetch service bus subscription client for partition2023-08-18T12:46:09ZOrsu AkhilImplementation to fetch service bus subscription client for partition## 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.
* [YES] 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.
* [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.
* [NO] I ran lint checks locally prior to submission.
## What is the issue or story related to the change?
-------------------------------------
With multi tenancy support enabled, there's need to get service bus subscription client based on partition and from it messages can be read. Changes are related to fetch such client.
High level design:
Issue: None
When function call is made to fetch subscription client for a partition and subscription name, after validations, partition service is queried for info related to that partition. This info has service bus connection string , subscription client is returned based on subscription name and this connection string.
Change details:
## Test coverage:
------------------
100% coverage
## Does this introduce a breaking change?
-------------------------------------
- [NO]
## Pending items
----------------
## 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
-------------------------------------M1 - Release 0.1ethiraj krishnamanaiduHema Vishnu Pola [Microsoft]devesh bajpaiKhilesh Sahuethiraj krishnamanaidu