ToineSiebelink [Tue, 18 Jul 2023 12:23:29 +0000 (13:23 +0100)]
Refactor ncmp request handlers (fix async issue)
- simplified request handlers (sub)classes (no more need for default interface)
- fix issue with async execution of data operation requests (wasn't really async)
- removed redundant (unreachable) check in production code
- Improved code coverage (branches) ncmp request handlers added UNIT test
- removed MVC test scenarios now covered by appropriate unit level tests
- applied Spock Polling Condition for verifying async call
Issue-ID: CPS-475
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: Ibe601c709de65080fa8898f2419fdbd92c5ba27d
ToineSiebelink [Mon, 17 Jul 2023 08:22:05 +0000 (09:22 +0100)]
Improved code coverage for CpsDataServiceImpl
- Added (extended) test to cover missed scenarios
- Removed unnecesarry null check from Production code
- Improved error messages in production code
- Removed duplicate test
- Cleaned up existign test somewhat (labels and aligment)
Issue-ID: CPS-475
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: I9761ad6d4777a6bcfee4cbe1b876dd39fa218fc8
Luke Gleeson [Fri, 14 Jul 2023 11:25:14 +0000 (11:25 +0000)]
Merge "Improved code coverage for NetworkCmProxyDataServiceImpl"
Sourabh Sourabh [Fri, 14 Jul 2023 10:48:02 +0000 (10:48 +0000)]
Merge "Upgrade to Java 17"
ToineSiebelink [Thu, 13 Jul 2023 16:55:32 +0000 (17:55 +0100)]
Improved code coverage for NetworkCmProxyDataServiceImpl
- Production code had catch block that is no longer needed
- Cleaned up some test somewhat (close to the new tests)
Issue-ID: CPS-475
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: Iaa409e752a496bf088a58ccd422fe3d850442b59
raviteja.karumuri [Thu, 6 Jul 2023 12:48:31 +0000 (13:48 +0100)]
[CSIT] Testing DataOperations Request with positive Scenario
# Sending CMHandle with ready state to the NCMP then it forwarded to DMI to complete the read operation once done with success it produces a message to the client topic'
Issue-ID: CPS-1560
Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech>
Change-Id: I0af68fdf97bf0a5063361ae08475dee38dbe7b8e
sourabh_sourabh [Tue, 4 Jul 2023 23:56:05 +0000 (00:56 +0100)]
Introduced a dmi rest demo csit stub
- Introduced a new response code 0 for data operational success response.
- Created a new dmi plugin rest stub for demo and performance testing.
- Removed dmi plugin stub of wiremocked.
- Updated parent pom to add newely created demo stub.
- updated docker compose to add neww demo stub with profile for CSIT,
demo and performance testing.
- Removed target id list from unsupported operation/datastore from REST
response.
Issue-ID: CPS-1560
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: Ie8198366df820e7d4b8b6e8a85ff9cdb0fce7435
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
danielhanrahan [Wed, 12 Jul 2023 15:11:07 +0000 (16:11 +0100)]
Fix handling of special characters in prefix names
This fixes issues with special characters like square brackets
- Make PrefixResolver use CpsPathParser instead of regex
- Make DataMapUtils use CpsPathParser instead of String parsing
Issue-ID: CPS-1758
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I6dd66eee398a46a69c0229059195f5096ab6fdec
Sourabh Sourabh [Thu, 13 Jul 2023 10:15:28 +0000 (10:15 +0000)]
Merge "Improved code coverage for record filter strategies"
egernug [Mon, 3 Jul 2023 09:09:09 +0000 (10:09 +0100)]
Upgrade to Java 17
Upgrade CPS component to Java 17
Issue-ID:CPS-1767
Signed-off-by: egernug <gerard.nugent@est.tech>
Change-Id: Ide1e75205851e025371b4822ee161f71f04a6af1
ToineSiebelink [Wed, 12 Jul 2023 16:05:41 +0000 (17:05 +0100)]
Improved code coverage for record filter strategies
(the semi-integration test dont cover all scenarios)
Issue-ID: CPS-475
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: I717946cddec315a1e69ca8d104b07f91691c1b63
ToineSiebelink [Wed, 12 Jul 2023 16:41:44 +0000 (17:41 +0100)]
Improved code coverage for Data Sync Watchdog
- also cleaned up existing test (c&p errors in descriptions)
Issue-ID: CPS-475
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: I20ed98faf0e05e2eb3b2aeaa92bed7dc73cbb358
ToineSiebelink [Wed, 12 Jul 2023 14:30:48 +0000 (15:30 +0100)]
Improved code coverage (branches) for sync watchdog
- had to refactor prod. code slightly to make it testable
- added a batch size check although the task is a simple iteration there is overhead in creating a paralel task
Issue-ID: CPS-475
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: I0db7ba3a15f4edc469a5af1ddc6fd76922b16809
danielhanrahan [Fri, 30 Jun 2023 11:14:07 +0000 (12:14 +0100)]
Combine alreadyDefinedException classes
Issue-ID: CPS-1774
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I52ff9074a9f8188e8635a811b0d2713a97cb4b10
danielhanrahan [Mon, 10 Jul 2023 09:47:36 +0000 (10:47 +0100)]
NCMP fails to start if /subscription-registry already exists
cpsDataService only throws AlreadyDefinedException, not
AlreadyDefinedExceptionBatch. This causes NcmpStartupException
to be thrown during startup, if /subscription-registry exists.
Issue-ID: CPS-1783
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I5667d891f855ef47ca2475891f9216be102932ed
danielhanrahan [Fri, 23 Jun 2023 13:37:12 +0000 (14:37 +0100)]
Handle special characters in CpsPath queries (CPS-1760 #2)
This fixes issues with special characters for CPS-500, CPS-1756,
CPS-1758, and CPS-1760. It also improves query performance.
- use SQL LIKE instead of regex in Cps Path queries
Issue-ID: CPS-1763
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I5c179882bfba71d3b009c60059e9073f46227e7d
Priyank Maheshwari [Mon, 10 Jul 2023 09:53:59 +0000 (09:53 +0000)]
Merge "Subscription Creation: NCMP to DMI CloudEvent transformation"
Toine Siebelink [Mon, 10 Jul 2023 09:06:56 +0000 (09:06 +0000)]
Merge "Escape SQL LIKE wildcards in queries (CPS-1760 #1)"
halil.cakal [Mon, 3 Jul 2023 14:24:02 +0000 (15:24 +0100)]
Subscription Creation: NCMP to DMI CloudEvent transformation
- Add mapper to convert client event into ncmp event
- Add sample json object of ncmp version
- Change subscription event consumer to consume CloudEvents
- Change subscription event forwarder to publish CloudEvents
- Change test producer config to support CloudEvents
- Change sample subscription event json to comply with new schema
- Add more test for missing branches
- Change packages of the mappers into relevant directory
Issue-ID: CPS-1737
Change-Id: I8c9e6e7bf713a8fb530a0586dfb2bce796a462f5
Signed-off-by: halil.cakal <halil.cakal@est.tech>
Luke Gleeson [Fri, 7 Jul 2023 14:47:22 +0000 (14:47 +0000)]
Merge "NCMP to client schema for Subscription"
lukegleeson [Fri, 7 Jul 2023 14:12:17 +0000 (15:12 +0100)]
Fix doc issue
Issue-ID: CPS-475
Signed-off-by: lukegleeson <luke.gleeson@est.tech>
Change-Id: Id1f15d148dca7801ecfabd447e9f87d56414a2b4
danielhanrahan [Fri, 23 Jun 2023 11:49:27 +0000 (12:49 +0100)]
Escape SQL LIKE wildcards in queries (CPS-1760 #1)
If '%' and '_' are used in the contains-condition of a CpsPath query,
incorrect results will be returned. For example:
/bookstore/categories[contains(@code, "%")]
Special characters in the contains-condition value must be escaped.
Issue-ID: CPS-1762
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I2fdd5a26433d510cd7d6af5b734a6779b537d63d
mpriyank [Wed, 5 Jul 2023 15:14:34 +0000 (16:14 +0100)]
NCMP to client schema for Subscription
- added schema to comply with the agreed upon changes and it include
capability to have statusCode and statusMessage as well.
- Renamed existing schemas just for consistency
Issue-ID: CPS-1739
Change-Id: I6bb1d13bf5c84ca812c5cf37062a168845d6be1d
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
Toine Siebelink [Mon, 3 Jul 2023 13:03:51 +0000 (13:03 +0000)]
Merge "Modify dmi plugin stub mapping of data operation"
raviteja.karumuri [Fri, 30 Jun 2023 12:23:33 +0000 (13:23 +0100)]
Kafka (De)serializtion test case for legacy consumer
# Added test case to verify the legacy consumer able to forward the event to client topic
Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech>
Change-Id: I9c88023028eaa2453e5578b5afb4951a41bf4999
sourabh_sourabh [Fri, 30 Jun 2023 11:21:09 +0000 (12:21 +0100)]
Modify dmi plugin stub mapping of data operation
- Modifiying exising dmi stub behaviour to mock onap-dmi plugin to send response HTTP 501.
Issue-ID: CPS-1723
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: I5dad5004ce69b29752821afdbb87839befa97cf5
Sourabh Sourabh [Fri, 30 Jun 2023 11:54:40 +0000 (11:54 +0000)]
Merge "Kafka (De-)Serialization Test"
mpriyank [Fri, 30 Jun 2023 10:14:10 +0000 (11:14 +0100)]
Prepare for next CPS-NCMP release
- updated the docs.
- Bumped the version to 3.3.4-SNAPSHOT for the next release.
Issue-ID: CPS-1773
Change-Id: Ibe9a694baadb33d284913868452b143c14d105cc
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
mpriyank [Fri, 30 Jun 2023 09:24:35 +0000 (10:24 +0100)]
Container yaml for release
- Release process
Issue-ID: CPS-1772
Change-Id: Ia3ce440f9a58d59ec9e44717c0c749d546c725b6
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
mpriyank [Thu, 29 Jun 2023 17:25:20 +0000 (18:25 +0100)]
Maven stage yaml
Issue-ID: CPS-1772
Change-Id: I06bf1a018e891339d16bd8c2c8f935ef3b44ea84
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
ToineSiebelink [Thu, 29 Jun 2023 17:00:48 +0000 (18:00 +0100)]
Kafka (De-)Serialization Test
- added test that proof (de-)serialization of DataOperation CloudEvent
- extracted new baseclass for kafka consumer tests
Issue-ID: CPS-1746
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: I3b04dc0ed8cd1f1f48206cbcf0fd739532ba423c
mpriyank [Thu, 29 Jun 2023 15:56:11 +0000 (16:56 +0100)]
Openapi file and RTD update
- Step-1 and 2 of the release process
Issue-ID: CPS-1771
Change-Id: I2c5f2f04fdf6344c788aa47a82090b2b37d1505f
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
Toine Siebelink [Thu, 29 Jun 2023 14:56:12 +0000 (14:56 +0000)]
Merge "Clearing code smells"
Priyank Maheshwari [Thu, 29 Jun 2023 14:42:13 +0000 (14:42 +0000)]
Merge "NCMP to DMI subscription event schema compliant with Cloud Events"
ToineSiebelink [Thu, 29 Jun 2023 14:08:14 +0000 (15:08 +0100)]
Clearing code smells
- added/updated @deprecated javadoc in EventPublisher
Issue-ID: CPS-475
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: Ic0fa3efbc7dc580368bed6782db683b3c7a4d918
Toine Siebelink [Thu, 29 Jun 2023 14:26:55 +0000 (14:26 +0000)]
Merge "Updating the Kafka listener compliance to could events and legacy"
raviteja.karumuri [Thu, 29 Jun 2023 12:57:40 +0000 (13:57 +0100)]
Updating the Kafka listener compliance to could events and legacy
# Added filter property to the legay(DMIAsync) Consumer
# Added containerFactory property to the CloudEvent(DataOperation) consumer to use 'cloudEventDeserializtion'
Issue-ID: CPS-1746
Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech>
Change-Id: I73315b816eb6446b7e163fd8779bc35fd6cbef63
sourabh_sourabh [Wed, 28 Jun 2023 11:28:27 +0000 (12:28 +0100)]
NCMP : NCMP : Handle non responding DMI-Plugin
- Added new response code for non-responding dmi and non-success.
- Captured any exception after sending request to dmi service and then
create a cloud event with error code and publish it to client topic.
- Minor modificarion into resource data operation util class.
Issue-ID: CPS-1558
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: I39d409fb42856b816bf9833c2a23f7fa250a1e62
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Toine Siebelink [Thu, 29 Jun 2023 13:49:21 +0000 (13:49 +0000)]
Merge "Normalize parent xpath when building datanodes in CpsDataService"
Toine Siebelink [Thu, 29 Jun 2023 13:48:20 +0000 (13:48 +0000)]
Merge "Update write performance test timings"
danielhanrahan [Thu, 29 Jun 2023 10:28:47 +0000 (11:28 +0100)]
Update write performance test timings
Issue-ID: CPS-1673
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: Ia2e5bf557bf2ade98fba64b7923856f727049d84
halil.cakal [Fri, 23 Jun 2023 13:30:52 +0000 (14:30 +0100)]
NCMP to DMI subscription event schema compliant with Cloud Events
- Change avc subscription schema into cloud events format
- Remove json objects that is provided in header of cloud event
- Add CmHandle object for private properties into json schema
- Remove required field and additional properties
from subscriptionevent and subscriptioneventresponse
Issue-ID: CPS-1737
Change-Id: I9648e5f0264ac56153ff477b1242d3c7b53b2844
Signed-off-by: halil.cakal <halil.cakal@est.tech>
ToineSiebelink [Thu, 29 Jun 2023 09:42:23 +0000 (10:42 +0100)]
Improved code coverage (branches) around multipart file utils
- added test
- moved wrongly placed test (from MultipartFileUtilSpec to DataMapUtilsSpec)
- applied curent conventions to DataMapUtilsSpec
Issue-ID: CPS-475
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: Ie8dc7f6802bb6ff0a256dc05df73da6af75409f3
Priyank Maheshwari [Wed, 28 Jun 2023 15:53:55 +0000 (15:53 +0000)]
Merge "Client to NCMP Subscription schema change"
emaclee [Tue, 27 Jun 2023 09:45:52 +0000 (10:45 +0100)]
Client to NCMP Subscription schema change
- Schema changes only
- Following code change changes on seperate commit
Issue-ID: CPS-1736
Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
Change-Id: I37f67a325d800a479c065ff72822b3e51d7f525f
ToineSiebelink [Wed, 28 Jun 2023 11:09:29 +0000 (12:09 +0100)]
Improved code covage (branches) around cm handle state changes
- added test
- removed redundant (unreachable) check in production code
Issue-ID: CPS-475
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: Ia39ac7a1473a248710c2a52f65715fb6b6a85fca
Luke Gleeson [Wed, 28 Jun 2023 09:44:46 +0000 (09:44 +0000)]
Merge "Subscription dmi_to_ncmp package clean-up"
Priyank Maheshwari [Wed, 28 Jun 2023 09:18:36 +0000 (09:18 +0000)]
Merge "Streamline outcome response for subscription creation"
danielhanrahan [Mon, 26 Jun 2023 12:21:21 +0000 (13:21 +0100)]
Normalize parent xpath when building datanodes in CpsDataService
Data nodes are being saved with non-normalized xpaths, resuling in
data nodes that cannot be operated on. This affects all operations
including get, query, update, and delete.
Issue-ID: CPS-1765
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I5352182d79daec67805753ca5943b1a86c18159f
seanbeirne [Tue, 27 Jun 2023 15:56:31 +0000 (16:56 +0100)]
Subscription dmi_to_ncmp package clean-up
Issue-ID: CPS-1738
Signed-off-by: seanbeirne <sean.beirne@est.tech>
Change-Id: I7e01c89cb187233b53b8786e42d2fe2c0f24dbd9
sourabh_sourabh [Mon, 26 Jun 2023 10:15:57 +0000 (11:15 +0100)]
NCMP : Handle non-existing and non-ready cm handles
- Modified data operation schema to contains cm handle as steing and
response content field name as result.
- Added a new common cloud event builder for NCMP to create an event.
- Added data operation event creater that uses cloud event builder to
create a cloud event.
- Introduced a new method onto json object mapper to convert json object
to bytes.
- Modified EventDateTimeFormatter and added a new method to convert date timestamp into offsetdateTime.
- Added a new code into ResourceRequestUtil to identify non-ready cm
handle and non-existing cm handle and later publish it as cloud event
to tha client given topic.
- Introduced CpsApplicationContext to get spring mannaged bean into non
spring managed java object.
Issue-ID: CPS-1583, CPS-1614
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: I24a39d2cb2c54dea25cd2f17e7748e21cd83a088
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
egernug [Tue, 27 Jun 2023 08:31:23 +0000 (09:31 +0100)]
Generate docs using OpenAPI 3.0
Doc generation in OpenAPI 3.0 requires executions for each file being generated.
This change adds those executions and updates the dependency to copy these files.
Issue-ID:CPS-1745
Signed-off-by: egernug <gerard.nugent@est.tech>
Change-Id: I144b49b0066f798f15408d955dcd914dd2c0bc91
halil.cakal [Wed, 14 Jun 2023 07:10:15 +0000 (08:10 +0100)]
Streamline outcome response for subscription creation
- Pivot to outcome response generated from db
for the corresponding subscription
- Fine tuning to wait till the cutoff time
for all cm handles that subject to subscription
- Update cm handles as rejected if dmi plugin or
cm handles does not exist in db
- Add more test for missed branches in mappers
and response outcome
Issue-ID: CPS-1741
Change-Id: I82ab6958e673059977abc7708974d5a2cb13e339
Signed-off-by: halil.cakal <halil.cakal@est.tech>
Sourabh Sourabh [Mon, 26 Jun 2023 12:17:36 +0000 (12:17 +0000)]
Merge "KafkaListener config for CloudEvents"
mpriyank [Fri, 23 Jun 2023 14:01:38 +0000 (15:01 +0100)]
KafkaListener config for CloudEvents
- Introduced kafkalistener factory configs to correctly use the configs
and convert the incoming events to CloudEvents
- Also legacy events to use a separate listener factory
- Increased the wait time from 100ms to 300ms to listen to the message
in the test
Issue-ID: CPS-1764
Change-Id: I8b9fe0ba82ef87d52b7731941ccd3af8ae980109
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
halil.cakal [Mon, 26 Jun 2023 11:00:51 +0000 (12:00 +0100)]
Change exclude path for mappers into more general
Issue-ID: CPS-1741
Change-Id: I5ad92f19d65bbd7577014b6ea2ffbfffd41e0b00
Signed-off-by: halil.cakal <halil.cakal@est.tech>
Toine Siebelink [Mon, 26 Jun 2023 09:46:10 +0000 (09:46 +0000)]
Merge "Adding logic to read response files from"
Toine Siebelink [Mon, 26 Jun 2023 09:29:58 +0000 (09:29 +0000)]
Merge "#2 NCMP : Replacing the word 'Batch' as 'DataOperation'."
Toine Siebelink [Mon, 26 Jun 2023 09:28:34 +0000 (09:28 +0000)]
Merge "Chsnge to OpenApi 3.0"
waqas.ikram [Wed, 21 Jun 2023 13:16:22 +0000 (14:16 +0100)]
Adding logic to read response files from
filesystem for client integration tests
Issue-ID: CPS-1751
Change-Id: I62e24d09474184716c56149a06deae4500b7b286
Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
egernug [Wed, 21 Jun 2023 10:16:02 +0000 (11:16 +0100)]
Chsnge to OpenApi 3.0
In preparation for the Java 17 and Springboot 3 migrations Swagger Codegen has to upgrade to OpenApi 3.0
This effects cps-rest and cps-ncmp-rest
Issue-Id: CPS-1745
Signed-off-by: egernug <gerard.nugent@est.tech>
Change-Id: I18b8e9ca26d0123009702c2474efbfbeec6d4c44
raviteja.karumuri [Fri, 23 Jun 2023 12:52:18 +0000 (13:52 +0100)]
#2 NCMP : Replacing the word 'Batch' as 'DataOperation'.
Issue-ID: CPS-1754
Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech>
Change-Id: Ib04e9d8a909e8868bf094e2625412996409b3a67
Luke Gleeson [Fri, 23 Jun 2023 10:48:27 +0000 (10:48 +0000)]
Merge "Improve code coverage"
Sourabh Sourabh [Fri, 23 Jun 2023 10:15:25 +0000 (10:15 +0000)]
Merge "NCMP : Replacing the word 'Batch' as 'DataOperation'."
ToineSiebelink [Thu, 22 Jun 2023 15:53:33 +0000 (16:53 +0100)]
Improve code coverage
cleaned up the modified test a bit as well
Issue-ID: CPS-475
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: I0a6ac50bb5720935c5c1c7036ada8423b3174fda
seanbeirne [Wed, 21 Jun 2023 09:42:14 +0000 (10:42 +0100)]
Subscription Response Event Schema
Issue-ID: CPS-1738
Signed-off-by: seanbeirne <sean.beirne@est.tech>
Change-Id: I409baf66ca702166308821eeeff4887e9385148e
raviteja.karumuri [Tue, 20 Jun 2023 18:10:21 +0000 (19:10 +0100)]
NCMP : Replacing the word 'Batch' as 'DataOperation'.
Issue-ID: CPS-1754
Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech>
Change-Id: Ie9f56effb160582ba7177331fb6260b2bde2342b
Toine Siebelink [Thu, 22 Jun 2023 10:17:18 +0000 (10:17 +0000)]
Merge "Improve performance of updateDataLeaves"
ToineSiebelink [Thu, 22 Jun 2023 08:24:04 +0000 (09:24 +0100)]
Add RTD link to CPS in Release notes
Issue-ID: REQ-1580
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: Id7f561a4686f62697bb98f7049199b44ebd387d4
Toine Siebelink [Wed, 21 Jun 2023 17:04:52 +0000 (17:04 +0000)]
Merge "Remove irrelevant groovy class that tests nothing"
ToineSiebelink [Wed, 21 Jun 2023 15:45:47 +0000 (16:45 +0100)]
Improve handling of legacy events
Legacy (non-cloud) events would cause a NPE in the event filter
Although the event woudl still be ignored it would lead to uncessary error logging
This fix addressed this issue using a trace level message instead
(also some improvements in the associated test)
Issue-ID: CPS-1724
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: Ibf71b13e4a47aaf705e32df5fe50cf41de5f558f
halil.cakal [Wed, 21 Jun 2023 15:54:09 +0000 (16:54 +0100)]
Remove irrelevant groovy class that tests nothing
Issue-ID: CPS-1741
Change-Id: If27a74e2496b952eb4803bbabb8363400c57915a
Signed-off-by: halil.cakal <halil.cakal@est.tech>
Toine Siebelink [Wed, 21 Jun 2023 14:44:41 +0000 (14:44 +0000)]
Merge "Patch # 3: Data operation response event (NCMP → Client App) to comply with CloudEvents"
danielhanrahan [Wed, 21 Jun 2023 12:53:32 +0000 (13:53 +0100)]
Improve performance of updateDataLeaves
Avoid fetching descendants during batchUpdateDataLeaves,
as descendants are not needed:
- Remove prefetch descendants step from getFragmentEntities;
- Explicitly prefetch descendants in operations requiring it;
- Update performance tests (5x faster for batch update).
Issue-ID: CPS-1675
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I7442a6f799cc0803b3a78f09d1ee53377f24b0b7
danielhanrahan [Wed, 21 Jun 2023 11:22:46 +0000 (12:22 +0100)]
Add performance tests for updateDataLeaves
Issue-ID: CPS-1675
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I4dcd2ff0d0f6c3acf7373357da0ef7217a691573
sourabh_sourabh [Mon, 19 Jun 2023 16:35:15 +0000 (17:35 +0100)]
Patch # 3: Data operation response event (NCMP → Client App) to comply with CloudEvents
- Modified data operation record strategy to consume cloud event.
- Modified NCMP data operation event consumer to read cloud event
header. (prefixed with ce_)
- Modified event publisher to support legacy and cloud event based on
event type (if legacy event use legacy kafka template else cloud kafka
template).
- Introduced a new method onto json object mapper to convert json object
to bytes.
- Modified data operation consumer spec to produce a cloud event and validate it.
- Added Kafka Integration Test (for filtering)
Issue-ID: CPS-1724
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: Ide701b1ff952f57413cb4e4aa0d55c08753f0298
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
danielhanrahan [Tue, 20 Jun 2023 17:19:59 +0000 (18:19 +0100)]
publishLcmEventBatchAsynchronously is not async
Spring @Async has a limitation where calling the async method from
within the same class won't work, as the method needs to be proxied,
and calling from the same class bypasses the proxy and calls the
underlying method directly, thus running synchronously.
Issue-ID: CPS-1749
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I7f198487dc18b359654dc38b5cf8fd600d33e189
ToineSiebelink [Wed, 21 Jun 2023 09:13:46 +0000 (10:13 +0100)]
Apply latest ReedTheDoc config rules
Issue-ID: CPS-1757
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: Icdf5fe5b5b1d6628bed786a1d99816e7990302cc
waqas.ikram [Fri, 16 Jun 2023 12:05:04 +0000 (13:05 +0100)]
Refactored code to enable its utilization in Junit
tests for the client
Change-Id: I847ae0f48444af907039bfddb9879581003c0f35
Issue-ID: CPS-1751
Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
Toine Siebelink [Tue, 20 Jun 2023 09:00:13 +0000 (09:00 +0000)]
Merge "Fix test-deregistration script"
Luke Gleeson [Tue, 20 Jun 2023 08:38:01 +0000 (08:38 +0000)]
Merge "DMI Data AVC to cloud events"
Toine Siebelink [Tue, 20 Jun 2023 08:36:39 +0000 (08:36 +0000)]
Merge "Patch # 1: Data operation response event (NCMP → Client App) to comply with CloudEvents"
Toine Siebelink [Tue, 20 Jun 2023 07:30:56 +0000 (07:30 +0000)]
Merge "Replace deprecated WebSecurityConfigurerAdapter"
danielhanrahan [Fri, 2 Jun 2023 10:44:09 +0000 (11:44 +0100)]
Fix test-deregistration script
- Fix issue where script breaks with newer version of docker-compose
caused by profile names being omitted during `docker-compose down`
- Use main .gitignore file to ignore metrics-reports directory
- Fix Intelli-j/shellcheck warnings (mostly variables needing quotes)
- Script prints summary report at exit
Issue-ID: CPS-1552
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: Ia51e51c1c199de8cc2f4878bfb04cb09fbb0b0e7
danielhanrahan [Mon, 19 Jun 2023 13:44:21 +0000 (14:44 +0100)]
Update performance test timings
The fixes to lower memory usage in FragmentRepository have
positively affected read performance, so tests must be updated.
Issue-ID: CPS-1716
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I2c8b882f56fb8c1eaefe5b802da1d308d16b1f02
sourabh_sourabh [Thu, 8 Jun 2023 14:25:33 +0000 (15:25 +0100)]
Patch # 1: Data operation response event (NCMP → Client App) to comply with CloudEvents
- Removed header definitions (since we now use CloudEvents)
- Used 'dataOperation' instead of batch where appropriate.
- Modified test json
Issue-ID: CPS-1724
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: Ic0f65297b944adf9cf5f3c2cbec679a031a675ec
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Priyank Maheshwari [Mon, 19 Jun 2023 13:49:11 +0000 (13:49 +0000)]
Merge "Code to persist or update the yang model subscription into db"
halil.cakal [Fri, 9 Jun 2023 13:58:00 +0000 (14:58 +0100)]
Code to persist or update the yang model subscription into db
- Change subscription persistence for subscription registry
to handle adding or updating cm handles into db
Issue-ID: CPS-1735
Change-Id: Icae609e810b2a097a4a174de1691892526f6b5c0
Signed-off-by: halil.cakal <halil.cakal@est.tech>
mpriyank [Fri, 16 Jun 2023 14:55:52 +0000 (15:55 +0100)]
DMI Data AVC to cloud events
- DMI Data AVC to be consumed as CloudEvents now
- Removed the schema header as it is taken care by cloudevent headers
- Implemented naming and packaging comments on the schema
- Test cases refactoring
Issue-ID: CPS-1719
Change-Id: I9864f90446720fe903fb3c1502d86035d886751d
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
ToineSiebelink [Mon, 12 Jun 2023 15:24:02 +0000 (16:24 +0100)]
Move integration test (clean-up, last phase)
- Moved session manager test
- Improved schemaset concurrency test (retry testing)
- Cleaned up all ri (container based) integration test (setup)
- Applied some groovy best practice where needed
- internal ri module cover now down to 29%, covred by integration instead with
- Line coverage up by 41 lines to 99% (was 97%)
- Branch coverage up by 3 branches to 96% (was 93%)
Issue-ID: CPS-1687
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: Ifb77a053e5a5db62a3f6a32ae60a3a8b10918efd
Toine Siebelink [Thu, 15 Jun 2023 16:44:02 +0000 (16:44 +0000)]
Merge "Patch #2 : Introduce kafka template for cloud events"
sourabh_sourabh [Thu, 15 Jun 2023 02:12:29 +0000 (03:12 +0100)]
Patch #2 : Introduce kafka template for cloud events
- Introduced a new cloud kafka template for cloud events that reads
it's configuration from application.yml
- Kept legacy kafka template for backward compatibility utill all cps
events moved to cloud event comply.
- Modified application.yml producer and consumer value deserializer properties to support cloud events.
- Added new cloudevents-bom used into cps-ncmp-service pom.
- For the time being we will have 2 kafkatemplates (legacyEventKafkaTemplate, cloudEventKafkaTemplate) into EventsPublisher until we fully move to
cloudevents for all events. Once all cps events will be cloud event compy, we have TODO task where Deprecated: legacyKafkaEventTemplate will be removed with its
java configuration file KafkaTemplateConfig.
Issue-ID: CPS-1724
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: I78c15bd480db063b89c6630c46c2d3a328b4fae4
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
danielhanrahan [Thu, 15 Jun 2023 12:52:34 +0000 (13:52 +0100)]
Bump CPS version to 3.3.3-SNAPSHOT
- Update version properties as well as we prepare for the next release.
Issue-ID: CPS-1750
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I0626eee7834499d2fa96812fb416ce7daebf0529
danielhanrahan [Thu, 15 Jun 2023 12:31:24 +0000 (13:31 +0100)]
Add container yaml for 3.3.2
- Step 6 of the release process
Issue-ID: CPS-1703
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I58e54ecd17878d3b9b6bc69ac9d254e454bd68b2
danielhanrahan [Thu, 15 Jun 2023 11:37:24 +0000 (12:37 +0100)]
Add maven stage yaml for 3.3.2
- Step 5 of the release process
Issue-ID: CPS-1703
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I105dedd6b1a634ca8ac4409ed682f6a10d1b018a
egernug [Thu, 15 Jun 2023 10:44:50 +0000 (11:44 +0100)]
Replace deprecated WebSecurityConfigurerAdapter
WebSecurityConfigurerAdapter has been deprecated in Spring 2.7. Change needed to use SecurityFilterChain and InMemoryUserDetailsManager.
Note: WebMvcTest does not autoimport configurations that use beans.
Issue-Id: CPS-1742
Signed-off-by: egernug <gerard.nugent@est.tech>
Change-Id: I100884f10beaac6ce87e603302280aeb78559017
danielhanrahan [Thu, 15 Jun 2023 10:08:54 +0000 (11:08 +0100)]
Update release docs
- Also synched up the API changes in openapi yml file
- Step 1 and 2 of the release process
Issue-ID: CPS-1703
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: Id47822737df3b89dffddb90413a53cac2b7ced6a
danielhanrahan [Thu, 8 Jun 2023 13:37:17 +0000 (14:37 +0100)]
Lower memory usage in FragmentRepository
Avoid using Spring Data "interface projection" in FragmentRepository.
The use of FragmentExtract in FragmentRepository is causing an
overhead of around 5 kilobytes per fragment, which is leading to
abnormally high memory usage when queries return a large number of
nodes. For example, around 250MB of additional memory is needlessly
used when fetching 50,000 datanodes.
- Remove FragmentExtract interface and FragmentEntityArranger class.
- Add FragmentPrefetchRepository, using JdbcTemplate and RowMapper
to fetch FragmentEntity descendants in a single SQL query.
- Many CpsDataService operations have memory reductions:
- queryDataNodes
- getDataNodesForMultipleXpaths
- updateDataNodesAndDescendants
- updateNodeLeaves
- and any NCMP methods using the above.
Issue-ID: CPS-1716
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: Ic47a2c9eb34150ed76bd5ce452fe1c9aaf9b4c5c
Toine Siebelink [Tue, 13 Jun 2023 10:56:29 +0000 (10:56 +0000)]
Merge "Move integration test (DataService)"
danielhanrahan [Mon, 12 Jun 2023 15:24:55 +0000 (16:24 +0100)]
Fix for recursive SQL returning extra level of descendants
Recursive SQL queries are incorrectly returning maxDepth + 1 levels
of fragments due to incorrect comparison in the WHERE clause.
This code is used by getDataNodes and queryDataNodes to
prefetch the descendants before converting to datanodes.
Prefetching extra descendants causes high memory usage.
Issue-ID: CPS-1716
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: Ie22215c0c7018cd293f73cf75adca2cd55f218a6