-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into add_grafana_loki_tool
- Loading branch information
Showing
12 changed files
with
208 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
tests/llm/fixtures/test_ask_holmes/27_permissions_error_no_helm_tools/custom_resources.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: myresources.example.com | ||
spec: | ||
group: example.com | ||
names: | ||
kind: MyResource | ||
listKind: MyResourceList | ||
plural: myresources | ||
singular: myresource | ||
scope: Namespaced | ||
versions: | ||
- name: v1 | ||
served: true | ||
storage: true | ||
schema: | ||
openAPIV3Schema: | ||
type: object | ||
properties: | ||
spec: | ||
type: object | ||
properties: | ||
field1: | ||
type: string | ||
--- | ||
apiVersion: example.com/v1 | ||
kind: MyResource | ||
metadata: | ||
name: my-resource-instance | ||
spec: | ||
field1: "value1" |
6 changes: 6 additions & 0 deletions
6
...llm/fixtures/test_ask_holmes/27_permissions_error_no_helm_tools/kubectl_find_resource.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{"toolset_name":"kubernetes/core","tool_name":"kubectl_find_resource","match_params":{"kind":"MyResource","keyword":"my-resource-instance"}} | ||
Command `kubectl get -A --show-labels -o wide MyResource | grep my-resource-instance` failed with return code 1 | ||
stdout: | ||
|
||
stderr: | ||
Error from server (Forbidden): myresources.example.com is forbidden: User "system:serviceaccount:default:robusta-holmes-service-account" cannot list resource "myresources" in API group "example.com" at the cluster scope |
10 changes: 10 additions & 0 deletions
10
tests/llm/fixtures/test_ask_holmes/27_permissions_error_no_helm_tools/test_case.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
user_prompt: "is there any kind of these resources on cluster kind: MyResource metadata: name: my-resource-instance" | ||
expected_output: | ||
- Modify the generated_values.yaml file to include the missing permissions | ||
- helm upgrade <RELEASE_NAME> robusta/robusta --values=generated_values.yaml --set clusterName=<YOUR_CLUSTER_NAME> | ||
before_test: kubectl apply -f./custom_resources.yaml | ||
after_test: kubectl delete -f./custom_resources.yaml | ||
evaluation: | ||
answer_relevancy: .5 | ||
faithfulness: .5 | ||
contextual_precision: 0 |
32 changes: 32 additions & 0 deletions
32
...lm/fixtures/test_ask_holmes/28_permissions_error_helm_tools_enabled/custom_resources.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: myresources.example.com | ||
spec: | ||
group: example.com | ||
names: | ||
kind: MyResource | ||
listKind: MyResourceList | ||
plural: myresources | ||
singular: myresource | ||
scope: Namespaced | ||
versions: | ||
- name: v1 | ||
served: true | ||
storage: true | ||
schema: | ||
openAPIV3Schema: | ||
type: object | ||
properties: | ||
spec: | ||
type: object | ||
properties: | ||
field1: | ||
type: string | ||
--- | ||
apiVersion: example.com/v1 | ||
kind: MyResource | ||
metadata: | ||
name: my-resource-instance | ||
spec: | ||
field1: "value1" |
6 changes: 6 additions & 0 deletions
6
tests/llm/fixtures/test_ask_holmes/28_permissions_error_helm_tools_enabled/helm_list.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{"toolset_name":"helm/core","tool_name":"helm_list"} | ||
stdout: | ||
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION | ||
robusta default 135 2025-01-06 15:47:11.45987258 +0100 +0100 deployed robusta-0.0.1 0.0.0 | ||
|
||
stderr: |
6 changes: 6 additions & 0 deletions
6
tests/llm/fixtures/test_ask_holmes/28_permissions_error_helm_tools_enabled/helm_values.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{"toolset_name":"helm/core","tool_name":"helm_list"} | ||
|
||
stdout: | ||
{"customClusterRoleRules":[], "clusterName": "test-cluster"} | ||
|
||
stderr: |
6 changes: 6 additions & 0 deletions
6
...ixtures/test_ask_holmes/28_permissions_error_helm_tools_enabled/kubectl_find_resource.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{"toolset_name":"kubernetes/core","tool_name":"kubectl_find_resource","match_params":{"kind":"MyResource","keyword":"my-resource-instance"}} | ||
Command `kubectl get -A --show-labels -o wide MyResource | grep my-resource-instance` failed with return code 1 | ||
stdout: | ||
|
||
stderr: | ||
Error from server (Forbidden): myresources.example.com is forbidden: User "system:serviceaccount:default:robusta-holmes-service-account" cannot list resource "myresources" in API group "example.com" at the cluster scope |
10 changes: 10 additions & 0 deletions
10
tests/llm/fixtures/test_ask_holmes/28_permissions_error_helm_tools_enabled/test_case.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
user_prompt: "is there any kind of these resources on cluster kind: MyResource metadata: name: my-resource-instance" | ||
expected_output: | ||
- To resolve this, update your configuration by adding the necessary permissions | ||
- helm upgrade robusta robusta/robusta --values=generated_values.yaml --set clusterName=test-cluster | ||
before_test: kubectl apply -f./custom_resources.yaml | ||
after_test: kubectl delete -f./custom_resources.yaml | ||
evaluation: | ||
answer_relevancy: .5 | ||
faithfulness: .5 | ||
contextual_precision: 0 |