fix(DataInjectionCommandLineRunner): do not fail on existing own partner#1062
fix(DataInjectionCommandLineRunner): do not fail on existing own partner#1062tom-rm-meyer-ISST merged 2 commits intomainfrom
Conversation
|
Cross-checked after some sleeping! I've run the local deployment and then restarted the pod. cd local
./deploy.sh -ci
# .... starts
docker compose restart puris-backend-customer
docker compose logs puris-backend-customer -f
# ... some logs
customer-backend | 2025-12-04T06:19:41.333Z INFO 1 --- [ main] o.e.t.p.b.c.e.l.s.EdcAdapterService : Registration of PartTypeInformation 1.0.0 submodel successful true
customer-backend | 2025-12-04T06:19:41.639Z INFO 1 --- [ main] o.e.t.p.b.DataInjectionCommandLineRunner : Following partner has been configured for yourself (and not been changed): Partner(uuid=36bc135b-c7a3-4fa9-a607-b6c90de855fc, name=Control Unit Creator Inc., edcUrl=http://customer-control-plane:8184/api/v1/dsp, bpnl=BPNL4444444444XX, addresses=[], sites=[Site(bpns=BPNS4444444444XX, name=Control Unit Creator Production Site, addresses=[Address(bpna=BPNA4444444444AA, streetAndNumber=13th Street 47, zipCodeAndCity=10011 New York, country=USA)])])
customer-backend | 2025-12-04T06:19:41.640Z INFO 1 --- [ main] o.e.t.p.b.DataInjectionCommandLineRunner : Creating setup for
customer-backend | 2025-12-04T06:19:41.640Z INFO 1 --- [ main] o.e.t.p.b.DataInjectionCommandLineRunner : No role specific setup was created
customer-backend | 2025-12-04T06:19:45.051Z INFO 1 --- [nio-8081-exec-1] o.a.c.c.C.[.[localhost].[/catena] : Initializing Spring DispatcherServlet 'dispatcherServlet'
customer-backend | 2025-12-04T06:19:45.052Z INFO 1 --- [nio-8081-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
customer-backend | 2025-12-04T06:19:45.054Z INFO 1 --- [nio-8081-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 2 ms
customer-backend | 2025-12-04T06:20:40.934Z INFO 1 --- [MessageBroker-1] o.s.w.s.c.WebSocketMessageBrokerStats : WebSocketSession[0 current WS(0)-HttpStream(0)-HttpPoll(0), 0 total, 0 closed abnormally (0 connect failure, 0 send limit, 0 transport error)], stompSubProtocol[processed CONNECT(0)-CONNECTED(0)-DISCONNECT(0)], stompBrokerRelay[null], inboundChannel[pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0], outboundChannel[pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0], sockJsScheduler[pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 0] |
…njectionCommandLineRunnerTest.java Co-authored-by: Malte Hellmeier <malte.hellmeier@isst.fraunhofer.de>
There was a problem hiding this comment.
Thank you for the changes and especially also adding the test.
The change works for the own partner entity. However, when running this locally and restarting the customer container it fails on supplier creation, because the existing supplier partner from the previous run causes a conflict, which is not caught.
From your posted example I assume it worked, because you ran the command with -ci, which skips the data injection for supplier.
fair point, please raise an issue. Need the change for today at the community days and will thus only need the built main image. Won't releaes yet |
ReneSchroederLJ
left a comment
There was a problem hiding this comment.
Approved due to the main use case working.
I've created #1063 to take care of the remaining bug.
Description
When restarting the pod an error occurs due to failed existence check:
Pre-review checks
Please ensure to do as many of the following checks as possible, before asking for committer review: