From 237c5b84d3f932fc98f181efa9570fac603df9ca Mon Sep 17 00:00:00 2001 From: MUzairS15 Date: Fri, 2 Feb 2024 21:57:30 +0530 Subject: [PATCH 1/2] improve path retrieval Signed-off-by: MUzairS15 --- server/meshmodel/kubernetes/policies/path.rego | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/meshmodel/kubernetes/policies/path.rego b/server/meshmodel/kubernetes/policies/path.rego index 3356190ed9c..5d492d844f8 100644 --- a/server/meshmodel/kubernetes/policies/path.rego +++ b/server/meshmodel/kubernetes/policies/path.rego @@ -12,7 +12,8 @@ ensureParentPathsExist(patches, object) = result { missingPaths := {sprintf("/%s", [concat("/", prefixPath)]) | paths[path] - path[i] + path[i] # walk over path + # If a path is missing, all its subpaths will be added. # Eg: a/b/c: If path b is missing all its subpaths will be added. From eabc329a518cdcc40b91aa62164c99b28d100e9c Mon Sep 17 00:00:00 2001 From: MUzairS15 Date: Mon, 5 Feb 2024 14:13:33 +0530 Subject: [PATCH 2/2] fix deprettify results Signed-off-by: MUzairS15 --- server/handlers/policy_relationship_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/handlers/policy_relationship_handler.go b/server/handlers/policy_relationship_handler.go index fd8eda91938..de281bc35de 100644 --- a/server/handlers/policy_relationship_handler.go +++ b/server/handlers/policy_relationship_handler.go @@ -108,7 +108,7 @@ func (h *Handler) EvaluateRelationshipPolicy( } evalresults[query] = result } - evalResults = evalresults + evalResults = core.Format.Prettify(evalresults, false) // write the response ec := json.NewEncoder(rw)