Skip to content

Commit 01bc727

Browse files
committed
ci: Merge branch 'main' of github.com:fege/opendatahub-tests into mcp_regression
Signed-off-by: fege <fmosca@redhat.com>
2 parents ea2888c + f381daa commit 01bc727

File tree

15 files changed

+166
-448
lines changed

15 files changed

+166
-448
lines changed

docs/GETTING_STARTED.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ To run tests with admin client only, pass `--tc=use_unprivileged_client:False` t
138138
### jira integration
139139

140140
To skip running tests which have open bugs, [pytest_jira](https://github.com/rhevm-qe-automation/pytest_jira) plugin is used.
141-
To run tests with jira integration, you need to set `PYTEST_JIRA_URL` and `PYTEST_JIRA_TOKEN` environment variables.
141+
To run tests with jira integration, you need to set `PYTEST_JIRA_URL`, `PYTEST_JIRA_USERNAME` and `PYTEST_JIRA_TOKEN` environment variables.
142142
To make a test with jira marker, add: `@pytest.mark.jira(jira_id="RHOAIENG-0000", run=False)` to the test.
143143

144144
### Running containerized tests

tests/llama_stack/conftest.py

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -229,48 +229,6 @@ def test_with_remote_milvus(llama_stack_server_config):
229229
if trustyai_embedding_model:
230230
env_vars.append({"name": "TRUSTYAI_EMBEDDING_MODEL", "value": trustyai_embedding_model})
231231

232-
# Kubeflow-related environment variables
233-
if params.get("enable_ragas_remote"):
234-
# Get fixtures only when Ragas Remote/Kubeflow is enabled
235-
model_namespace = request.getfixturevalue(argname="model_namespace")
236-
current_client_token = request.getfixturevalue(argname="current_client_token")
237-
dspa_route = request.getfixturevalue(argname="dspa_route")
238-
dspa_s3_secret = request.getfixturevalue(argname="dspa_s3_secret")
239-
240-
# KUBEFLOW_LLAMA_STACK_URL: Build from LlamaStackDistribution service
241-
env_vars.append({
242-
"name": "KUBEFLOW_LLAMA_STACK_URL",
243-
"value": f"http://{distribution_name}-service.{model_namespace.name}.svc.cluster.local:8321",
244-
})
245-
246-
# KUBEFLOW_PIPELINES_ENDPOINT: Get from DSPA route
247-
env_vars.append({"name": "KUBEFLOW_PIPELINES_ENDPOINT", "value": f"https://{dspa_route.instance.spec.host}"})
248-
249-
# KUBEFLOW_NAMESPACE: Use model namespace
250-
env_vars.append({"name": "KUBEFLOW_NAMESPACE", "value": model_namespace.name})
251-
252-
# KUBEFLOW_BASE_IMAGE
253-
env_vars.append({
254-
"name": "KUBEFLOW_BASE_IMAGE",
255-
"value": params.get(
256-
"kubeflow_base_image",
257-
"quay.io/diegosquayorg/my-ragas-provider-image"
258-
"@sha256:3749096c47f7536d6be2a7932e691abebacd578bafbe65bad2f7db475e2b93fb",
259-
),
260-
})
261-
262-
# KUBEFLOW_RESULTS_S3_PREFIX: Build from MinIO bucket
263-
env_vars.append({
264-
"name": "KUBEFLOW_RESULTS_S3_PREFIX",
265-
"value": params.get("kubeflow_results_s3_prefix", "s3://llms/ragas-results"),
266-
})
267-
268-
# KUBEFLOW_S3_CREDENTIALS_SECRET_NAME: Use DSPA secret name
269-
env_vars.append({"name": "KUBEFLOW_S3_CREDENTIALS_SECRET_NAME", "value": dspa_s3_secret.name})
270-
271-
# KUBEFLOW_PIPELINES_TOKEN: Get from current client token
272-
env_vars.append({"name": "KUBEFLOW_PIPELINES_TOKEN", "value": str(current_client_token)})
273-
274232
# POSTGRESQL environment variables for sql_default and kvstore_default
275233
env_vars.append({"name": "POSTGRES_HOST", "value": "vector-io-postgres-service"})
276234
env_vars.append({"name": "POSTGRES_PORT", "value": "5432"})

tests/llama_stack/constants.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ class Safety(str, Enum):
1717

1818
class Eval(str, Enum):
1919
TRUSTYAI_LMEVAL = "trustyai_lmeval"
20-
TRUSTYAI_RAGAS_INLINE = "trustyai_ragas_inline"
21-
TRUSTYAI_RAGAS_REMOTE = "trustyai_ragas_remote"
2220

2321

2422
class ModelInfo(NamedTuple):

tests/llama_stack/eval/conftest.py

Lines changed: 0 additions & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,11 @@
33

44
import pytest
55
from kubernetes.dynamic import DynamicClient
6-
from ocp_resources.data_science_pipelines_application import DataSciencePipelinesApplication
76
from ocp_resources.namespace import Namespace
87
from ocp_resources.persistent_volume_claim import PersistentVolumeClaim
98
from ocp_resources.pod import Pod
10-
from ocp_resources.route import Route
11-
from ocp_resources.secret import Secret
12-
from ocp_resources.service import Service
13-
from timeout_sampler import TimeoutSampler
149

1510
from tests.llama_stack.eval.constants import DK_CUSTOM_DATASET_IMAGE
16-
from tests.llama_stack.eval.utils import wait_for_dspa_pods
17-
from utilities.constants import MinIo
1811

1912

2013
@pytest.fixture(scope="class")
@@ -117,141 +110,3 @@ def teardown_lmeval_job_pod(admin_client, model_namespace) -> None:
117110
]:
118111
for pod in pods:
119112
pod.delete()
120-
121-
122-
@pytest.fixture(scope="class")
123-
def dspa(
124-
pytestconfig: pytest.Config,
125-
admin_client: DynamicClient,
126-
model_namespace: Namespace,
127-
minio_pod: Pod,
128-
minio_service: Service,
129-
dspa_s3_secret: Secret,
130-
teardown_resources: bool,
131-
) -> Generator[DataSciencePipelinesApplication, Any, Any]:
132-
"""
133-
Creates a DataSciencePipelinesApplication with MinIO object storage.
134-
"""
135-
136-
dspa_resource = DataSciencePipelinesApplication(
137-
client=admin_client,
138-
name="dspa",
139-
namespace=model_namespace.name,
140-
dsp_version="v2",
141-
pod_to_pod_tls=True,
142-
api_server={
143-
"deploy": True,
144-
"enableOauth": True,
145-
"enableSamplePipeline": False,
146-
"cacheEnabled": True,
147-
"artifactSignedURLExpirySeconds": 60,
148-
"pipelineStore": "kubernetes",
149-
},
150-
database={
151-
"disableHealthCheck": False,
152-
"mariaDB": {
153-
"deploy": True,
154-
"pipelineDBName": "mlpipeline",
155-
"pvcSize": "10Gi",
156-
"username": "mlpipeline",
157-
},
158-
},
159-
object_storage={
160-
"disableHealthCheck": False,
161-
"enableExternalRoute": False,
162-
"externalStorage": {
163-
"bucket": "ods-ci-ds-pipelines",
164-
"host": f"{minio_service.instance.spec.clusterIP}:{MinIo.Metadata.DEFAULT_PORT}",
165-
"region": "us-east-1",
166-
"scheme": "http",
167-
"s3CredentialsSecret": {
168-
"accessKey": "AWS_ACCESS_KEY_ID", # pragma: allowlist secret
169-
"secretKey": "AWS_SECRET_ACCESS_KEY", # pragma: allowlist secret
170-
"secretName": dspa_s3_secret.name,
171-
},
172-
},
173-
},
174-
persistence_agent={
175-
"deploy": True,
176-
"numWorkers": 2,
177-
},
178-
scheduled_workflow={
179-
"deploy": True,
180-
"cronScheduleTimezone": "UTC",
181-
},
182-
ensure_exists=pytestconfig.option.post_upgrade,
183-
teardown=teardown_resources,
184-
)
185-
if pytestconfig.option.post_upgrade:
186-
wait_for_dspa_pods(
187-
admin_client=admin_client,
188-
namespace=model_namespace.name,
189-
dspa_name=dspa_resource.name,
190-
)
191-
yield dspa_resource
192-
dspa_resource.clean_up()
193-
else:
194-
with dspa_resource:
195-
wait_for_dspa_pods(
196-
admin_client=admin_client,
197-
namespace=model_namespace.name,
198-
dspa_name=dspa_resource.name,
199-
)
200-
yield dspa_resource
201-
202-
203-
@pytest.fixture(scope="class")
204-
def dspa_s3_secret(
205-
pytestconfig: pytest.Config,
206-
admin_client: DynamicClient,
207-
model_namespace: Namespace,
208-
minio_service: Service,
209-
teardown_resources: bool,
210-
) -> Generator[Secret, Any, Any]:
211-
"""
212-
Creates a secret for DSPA S3 credentials using MinIO.
213-
"""
214-
secret = Secret(
215-
client=admin_client,
216-
name="dashboard-dspa-secret",
217-
namespace=model_namespace.name,
218-
string_data={
219-
"AWS_ACCESS_KEY_ID": MinIo.Credentials.ACCESS_KEY_VALUE,
220-
"AWS_SECRET_ACCESS_KEY": MinIo.Credentials.SECRET_KEY_VALUE,
221-
"AWS_DEFAULT_REGION": "us-east-1",
222-
},
223-
ensure_exists=pytestconfig.option.post_upgrade,
224-
teardown=teardown_resources,
225-
)
226-
if pytestconfig.option.post_upgrade:
227-
yield secret
228-
secret.clean_up()
229-
else:
230-
with secret:
231-
yield secret
232-
233-
234-
@pytest.fixture(scope="class")
235-
def dspa_route(
236-
admin_client: DynamicClient,
237-
model_namespace: Namespace,
238-
dspa: DataSciencePipelinesApplication,
239-
) -> Generator[Route, Any, Any]:
240-
"""
241-
Retrieves the Route for the DSPA API server.
242-
"""
243-
244-
def _get_dspa_route() -> Route | None:
245-
routes = list(
246-
Route.get(
247-
client=admin_client,
248-
namespace=model_namespace.name,
249-
name="ds-pipeline-dspa",
250-
)
251-
)
252-
return routes[0] if routes else None
253-
254-
for route in TimeoutSampler(wait_timeout=240, sleep=5, func=_get_dspa_route):
255-
if route:
256-
yield route
257-
return

0 commit comments

Comments
 (0)