KubernetesResourceUtil: Replace deprecated usage of JsonMappingException constructor
See original GitHub issueDescription
In KubernetesResourceUtil.readFragment method, we’re using this constructor for JsonMappingException: https://github.com/eclipse/jkube/blob/a49aff150d4cee4cba39c2305e8096721444d0c3/jkube-kit/enricher/api/src/main/java/org/eclipse/jkube/kit/enricher/api/util/KubernetesResourceUtil.java#L383
This has been marked deprecated as per latest Jackson Databind documentation. We can use the static methods for creating exceptions:
throw JsonMappingException.from(mapper.getDeserializationContext(), String.format("[%s] %s", file, e.getMessage()));
Before you start
Make sure you read the contributing guide first. Pay special attention to the ECA agreement section and the requirement to sign-off your commit.
How to manually test my changes
Kubernetes
If you don’t have a real Kubernetes cluster available (most probably), you can use Minikube or Kind to test with a local cluster.
- Minikube get started guide
- Kind (Requires Docker) quick start
OpenShift
If you don’t have a real OpenShift cluster available (most probably), you can use Red Hat’s developer Sandbox for Red Hat OpenShift. The only requirement is to have a Red Hat account.
Once you have your Sandbox environment, you’ll need to download the oc tool from the cluster console.
(Press the ? icon and from the context menu select Command line tools, you’ll be redirected to https://$subdomain.openshiftapps.com/command-lines-tools where you’ll be able to download the CLI for your platform)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Related StackOverflow Question
@shivkushwaha1511 : Thanks for showing interest. I’ll create one issue and let you know
@shivkushwaha1511 : I think we can close this issue. Shall I create some other good first issue for you? Would you be willing to work on that?