OS Core Common - Spring 5 merge requestshttps://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests2023-08-18T13:08:14Zhttps://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests/72Add support for ttl in milliseconds2023-08-18T13:08:14ZRostislav Vatolinvatolinrp@gmail.comAdd support for ttl in millisecondsMore info here: https://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/issues/36
Entitlement service requires configurable caching. We need different cache expiration time set when we create and update cache. Exi...More info here: https://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/issues/36
Entitlement service requires configurable caching. We need different cache expiration time set when we create and update cache. Existing functionality doesn't allow us to include ttl (expiration time) when we create and update cache. This is why I created this MRM5 - Release 0.8https://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests/73partion-service-as-tenantinfo-provider (GONRG-2188)2023-08-18T13:08:12ZRustam Lotsmanenko (EPAM)rustam_lotsmanenko@epam.compartion-service-as-tenantinfo-provider (GONRG-2188)# Description:
Replace TenantInfo table call in os-core-common with implementation that utilize Partition Service <br/>
Migration of OSDU Core R3 services to Partition service<br/>
# How to test:
Functionality was tested with Schema se...# Description:
Replace TenantInfo table call in os-core-common with implementation that utilize Partition Service <br/>
Migration of OSDU Core R3 services to Partition service<br/>
# How to test:
Functionality was tested with Schema service , that successfully consume TenantInfo from Partition Service
# Changes include:
- [ ] Refactor (a non-breaking change that improves code maintainability).
- [ ] Bugfix (a non-breaking change that solves an issue).
- [x] New feature (a non-breaking change that adds functionality).
- [ ] Breaking change (a change that is not backward-compatible and/or changes current functionality).
# Changes in:
- [x] Common code
# Dev Checklist:
- [x] Added Unit Tests, wherever applicable.
- [ ] Updated the Readme, if applicable.
- [x] Existing Tests pass
- [x] Verified functionality locally
- [x] Self Reviewed my code for formatting and complex business logic.
# Other comments:
Partition service must have configured TenantInfo according to common model:<br/>
Long id;<br/>
String name;<br/>
String projectId;<br/>
String serviceAccount;<br/>
String complianceRuleSet;<br/>
String dataPartitionId;<br/>
List<String> crmAccountIds;<br/>M6 - Release 0.9Rostislav Dublin (EPAM)Rostislav Dublin (EPAM)https://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests/74add check for null tags on read2023-08-18T13:08:10ZNeelesh Thakuradd check for null tags on readAdd check for null tags on record read. Storage GET getLatestRecordVersion & GET getSpecificRecordVersion fails if a record ingested without any tags and users tries retrieved records by above two APIs.Add check for null tags on record read. Storage GET getLatestRecordVersion & GET getSpecificRecordVersion fails if a record ingested without any tags and users tries retrieved records by above two APIs.M5 - Release 0.8https://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests/75Fix CVE security vulnerabilities2023-08-18T13:08:09ZAlok JoshiFix CVE security vulnerabilitiesCurrent versions of tomcat-embed-core and jackson-dataformat-cbor have known CVE vulnerabilities. This change addresses the issue by upgrading to the higher minor versions, which don't have any vulnerability.
Below are the listed vulner...Current versions of tomcat-embed-core and jackson-dataformat-cbor have known CVE vulnerabilities. This change addresses the issue by upgrading to the higher minor versions, which don't have any vulnerability.
Below are the listed vulnerabilities for the library versions
`tomcat-embed-core-9.0.37.jar` : [CVE-2021-25122](https://nvd.nist.gov/vuln/detail/CVE-2021-25122), [CVE-2021-24122](https://nvd.nist.gov/vuln/detail/CVE-2021-24122), [CVE-2021-25329](https://nvd.nist.gov/vuln/detail/CVE-2021-25329)
`jackson-dataformat-cbor-2.11.3.jar` : [CVE-2020-28491](https://nvd.nist.gov/vuln/detail/CVE-2020-28491)
We plan to create a release candidate with this change and use it in services to resolve the same issue there too.
The vulnerabilities were flagged in SLB's internal Whitesource scanM5 - Release 0.8Alok JoshiAlok Joshihttps://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests/76Upgrade dependencies2023-08-18T13:08:07ZRostislav Vatolinvatolinrp@gmail.comUpgrade dependenciesUpgrading library guava, because it has security vulnerabilities: [CVE-2020-8908](https://nvd.nist.gov/vuln/detail/CVE-2020-8908)
Upgrading bom for netty because of: [CVE-2021-21290](https://nvd.nist.gov/vuln/detail/CVE-2021-21290) and ...Upgrading library guava, because it has security vulnerabilities: [CVE-2020-8908](https://nvd.nist.gov/vuln/detail/CVE-2020-8908)
Upgrading bom for netty because of: [CVE-2021-21290](https://nvd.nist.gov/vuln/detail/CVE-2021-21290) and [CVE-2021-21409](https://nvd.nist.gov/vuln/detail/CVE-2021-21409) and [CVE-2021-21295](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-21295)
Upgrading version of spring: [WS-2016-7107](https://www.whitesourcesoftware.com/vulnerability-database/WS-2016-7107) and [WS-2020-0293](https://www.whitesourcesoftware.com/vulnerability-database/WS-2020-0293) and [CVE-2020-5421](https://nvd.nist.gov/vuln/detail/CVE-2020-5421)M6 - Release 0.9https://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests/77add overloaded constructors for RedisCache2023-08-18T13:08:06ZKelly Zhouadd overloaded constructors for RedisCacheHere is the best practice for Azure Cache for Redis: [Documentation](https://docs.microsoft.com/en-us/azure/azure-cache-for-redis/cache-best-practices?WT.mc_id=Portal-Microsoft_Azure_Support)
To follow the best practice "Configure your ...Here is the best practice for Azure Cache for Redis: [Documentation](https://docs.microsoft.com/en-us/azure/azure-cache-for-redis/cache-best-practices?WT.mc_id=Portal-Microsoft_Azure_Support)
To follow the best practice "Configure your client library to use a connect timeout of at least 15 seconds", we would like to set the redisClient connection timeout as 15 seconds.
However, this is a common library which can be used for any provider, and the recommended value of connection timeout may be different. So we consider to have overloaded constructor where ClientOptions can be passed when initialize RedisCache.M5 - Release 0.8https://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests/78Upgrade hibernate-validator dependency2023-08-18T13:08:04ZRostislav Vatolinvatolinrp@gmail.comUpgrade hibernate-validator dependencyos-core-common library uses hibernate-validator dependency. This hibernate library is located in spring-boot-starter-validation.
os-core-common library is using such annotations: @NotEmpty @NotBlank from `org.hibernate.validator.constra...os-core-common library uses hibernate-validator dependency. This hibernate library is located in spring-boot-starter-validation.
os-core-common library is using such annotations: @NotEmpty @NotBlank from `org.hibernate.validator.constraints` package. Example: https://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/blob/master/src/main/java/org/opengroup/osdu/core/common/model/indexer/MultiFieldIndexRequest.java
After Spring version upgrade, this library is moved to `spring-boot-starter-validation` from `spring-boot-starter-web`M6 - Release 0.9https://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests/80add debug logging for ILogger and JaxRsDpsLog;2023-08-18T13:08:02ZYauheni Lesnikauadd debug logging for ILogger and JaxRsDpsLog;Add debugging logging feature for further logging optimization in servicesAdd debugging logging feature for further logging optimization in servicesM6 - Release 0.9ethiraj krishnamanaiduNitin-slbNeelesh ThakurAlok JoshiRostislav Vatolinvatolinrp@gmail.comashley kelhamViacheslav Tarasov - SLBYauheni LesnikauSanjeev-SLBTika Lestari [SLB]ethiraj krishnamanaiduhttps://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests/81Support updateTtl and getTtl methods in RedisCache2023-08-18T13:08:00ZTika Lestari [SLB]Support updateTtl and getTtl methods in RedisCacheDetails: #40Details: #40M6 - Release 0.9https://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests/82Adding the maven release-candidiate script to this library's pipeline2023-08-18T13:07:59ZDavid Diederichd.diederich@opengroup.orgAdding the maven release-candidiate script to this library's pipelineM6 - Release 0.9David Diederichd.diederich@opengroup.orgDavid Diederichd.diederich@opengroup.orghttps://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests/84Add a default constructor for RecordData2023-08-18T13:07:57ZMina OtgonboldAdd a default constructor for RecordDataNeed to add a default constructor for RecordData in order to change gson to jackson in storage service which is a fix for the issue below.
- Actual MR fixing the issue below: https://community.opengroup.org/osdu/platform/system/storage/...Need to add a default constructor for RecordData in order to change gson to jackson in storage service which is a fix for the issue below.
- Actual MR fixing the issue below: https://community.opengroup.org/osdu/platform/system/storage/-/merge_requests/196
- The issue on Gitlab: https://community.opengroup.org/osdu/platform/system/storage/-/issues/67M6 - Release 0.9https://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests/85Made the constructor of services public2023-08-18T13:07:56ZMuskan SrivastavaMade the constructor of services publicThis MR makes constructor of following classes as public: -
- CrsConverterService
- EntitlementsService
- LegalService
- SubscriptionService(notification)
- PolicyService
- SearchService
- StorageService
------------------
Currently, th...This MR makes constructor of following classes as public: -
- CrsConverterService
- EntitlementsService
- LegalService
- SubscriptionService(notification)
- PolicyService
- SearchService
- StorageService
------------------
Currently, there are 2 services - PartitionService and EntitlementsService V2, which have public constructors and rest have package-private.
Making the constructor public will increase the accessibility and extensibility of <Service>Service classes (<Service> used as placeholder).
As of now, <Service>Factory classes which return an instance to <Service>Service (for example, EntitlementsFactory returns instance of EntitlementsService) acts as the only access point to <Service>Service classes. By making the constructor public of the above mentioned classes will enable us to extend those classes, write our own <Service>Factory classes that or use Http Client of our choice.
<br>
**Impact** : <br>
This will enable us to: -
1. Have parity in SDK.
2. The factories can be overloaded. This will enable us to plug in HttpClient.
3. Opens up Service classes being used as SDK to be able to be extensible and configurable.M6 - Release 0.9Muskan SrivastavaMuskan Srivastavahttps://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests/86update legal service interface populateLegalInfoFromParents hold version as w...2023-08-18T13:07:54ZYauheni Lesnikauupdate legal service interface populateLegalInfoFromParents hold version as well as parentId;This MR related to the changes into the Storage service where we need to hold version as well as parentId of the parent records
Related to the MR in storage servive: https://community.opengroup.org/osdu/platform/system/storage/-/merge_re...This MR related to the changes into the Storage service where we need to hold version as well as parentId of the parent records
Related to the MR in storage servive: https://community.opengroup.org/osdu/platform/system/storage/-/merge_requests/198
Related to the issue: https://community.opengroup.org/osdu/platform/system/storage/-/issues/72M6 - Release 0.9ethiraj krishnamanaiduNitin-slbNeelesh ThakurSherman YangAlok Joshiashley kelhamYauheni LesnikauSanjeev-SLBethiraj krishnamanaiduhttps://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests/87Upgrade elastic libraries2023-08-18T13:07:53ZRostislav Vatolinvatolinrp@gmail.comUpgrade elastic librariesMore details: https://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/issues/42More details: https://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/issues/42M6 - Release 0.9https://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests/88fix debug default method implementation in Ilogger2023-08-18T13:07:51ZYauheni Lesnikaufix debug default method implementation in Iloggerfix debug default method implementation in Iloggerfix debug default method implementation in IloggerM6 - Release 0.9ethiraj krishnamanaiduNeelesh ThakurAlok JoshiRostislav Vatolinvatolinrp@gmail.comYauheni Lesnikauethiraj krishnamanaiduhttps://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests/89Correct page size doc for Query and CursorQuery2023-08-18T13:07:49ZNeelesh ThakurCorrect page size doc for Query and CursorQueryM6 - Release 0.9https://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests/90Implemented HttpClientHandler to an interface2023-08-18T13:07:47ZMuskan SrivastavaImplemented HttpClientHandler to an interface
This MR implements HttpClientHandler to an interface- IHttpClientHandler. Also, changes RETRY_COUNT and REQUEST_CONFIG from being private final to protected static.
We follow the pattern of implementing to the interface across the ent...
This MR implements HttpClientHandler to an interface- IHttpClientHandler. Also, changes RETRY_COUNT and REQUEST_CONFIG from being private final to protected static.
We follow the pattern of implementing to the interface across the entire project, hence this MR wants to bring HttpClientHandler to the same line. Moreover, doing so will make the class extensible. Making REQUEST_CONFIG and RETRY_COUNT protected static will allow the extended classes to configure these parameters.
<br>
**Impact** : <br>
This will enable us to: -
1. Have same coding pattern across project.
2. Extend HttpClientHandler.
3. Configure REQUEST_CONFIG and RETRY_COUNT in child classes.M6 - Release 0.9Muskan SrivastavaMuskan Srivastavahttps://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests/92Update unit conversion implementation to support nested array properties2023-08-18T13:07:46ZKelly ZhouUpdate unit conversion implementation to support nested array propertieshttps://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/issues/43https://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/issues/43M7 - Release 0.10Sherman YangSherman Yanghttps://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests/94Update unit conversion implementation to support nested array properties - In...2023-08-18T13:07:44ZKelly ZhouUpdate unit conversion implementation to support nested array properties - Inhomogeneous casesRelated issue: https://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/issues/43Related issue: https://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/issues/43M7 - Release 0.10https://community.opengroup.org/osdu/platform/system/lib/core/os-core-common/-/merge_requests/98Changed status producing model and interface to standardize publishing of sta...2023-08-18T13:07:42ZKhilesh SahuChanged status producing model and interface to standardize publishing of status eventsThis MR includes following changes
- Builder classes for StatusDetails and DatasetDetails are removed. Methods in these classes should be taken care by services itself rather than in library.
- IEventPublisher accepts array of Message wh...This MR includes following changes
- Builder classes for StatusDetails and DatasetDetails are removed. Methods in these classes should be taken care by services itself rather than in library.
- IEventPublisher accepts array of Message which is an interface implemented by StatusDetails and DatasetDetails. This interface is like marker for our models and will help us to standardize all publisher of different services.
- Timestamp datatype is now long to accept epoch timestamp.M7 - Release 0.10