Thanks a lot for all your input.
It helps to grow my understanding.
I am not able to reproduce the issue anymore, so , no further investigations possible and needed !
Original Message:
Sent: Feb 12, 2024 06:50 AM
From: Raju Gurram
Subject: graphman import issue
You assumption about the lookup is correct. Graphman checks the existence of a given entity by non goid unique property (i.e., resolutionPath for WebApi). For more info, please check this out: https://techdocs.broadcom.com/us/en/ca-enterprise-software/layer7-api-management/api-gateway/11-0/apis-and-toolkits/graphman-management-api.html#concept.dita_d3303fde-e786-4fd4-b0b6-e3a28fd60a82_entities
Table from the above page lists the identity fields for the supported entities.
Most likely, goid matches between source and target and the difference in their identity fields happen if we author the entities manually. Especially, when we duplicate the existing entity manually and changed the fields but not goid/guid's.
Original Message:
Sent: Feb 12, 2024 02:45 AM
From: Michael Mueller
Subject: graphman import issue
Thanks you for comments, Francois and Raju.
@Francois Lascelles: What surprises me the most, that source and target goid were the same, but graphman decided to insert the 2nd resource, that of course lead to the constraint violation, as the "new" goid already exists.
Which leads me to the question, how the lookup logic looks like, to decide if a resource needs to be inserted or updated?
Would the removal of the source goid/guid be a general approach, to have a more reliable lookup processing?
I assume that then the lookup will only be done on the unique "symbol" attribute. e.g. like resolutionPath for api's.
@Raju Gurram Yes you are right, we are not yet on V11 CR02 but still plain V11 and using graphman-client V1.0.01.
Thanks for the hint. Just another reason for being up-to-date ;)
I am looking into all this, as we are on the way to automate deployments, with the help of GitLab and Jenkins.
A special scenario might be , that we are looking at "incremental" deployments only on VMware based gw's, not "all in one" ones.
Meaning , we are selecting explicit api's & policies to deploy, not the whole gw config at once.
That leads to some more complex situations and questions, especially in regard to rollback and error handling.
Kind regards
...Michael
Original Message:
Sent: Feb 09, 2024 09:53 PM
From: Raju Gurram
Subject: graphman import issue
Looking at the posted error response from the graphman, I think you are with the older version of gateway. We've improved this with the latest available. May I know the gateway and graphman-client version?
Original Message:
Sent: Feb 08, 2024 05:10 AM
From: Michael Mueller
Subject: graphman import issue
Dear team.
I encountered the following issue, when trying to update an existing api throughh graphman.
Error:
{ "errors": [ { "message": "Exception while fetching data (/setWebApiServices) : could not execute statement; SQL [n/a]; constraint [published_service.PRIMARY]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement", "locations": [ { "line": 53, "column": 9 } ], "path": [ "setWebApiServices" ], "extensions": { "classification": "DataFetchingException" } } ], "data": {}}
Any obvious root cause, or hint , what I am doing wrong?
Thanks
...Michael