test: Update Feast Registry Rest Tests run on Openshift Env#6082
test: Update Feast Registry Rest Tests run on Openshift Env#6082ntkathole merged 1 commit intofeast-dev:masterfrom
Conversation
| # Apply feast projects | ||
| applyFeastProject(namespace, credit_scoring) | ||
| applyFeastProject(namespace, driver_ranking) | ||
|
|
||
| applyFeastProject(namespace, driver_ranking) | ||
|
|
||
| # Create Saved Datasets and Permissions | ||
| pod_name = get_pod_name_by_prefix(namespace, credit_scoring) | ||
|
|
||
| # Apply datasets | ||
| execPodCommand( | ||
| namespace, pod_name, ["python", "create_ui_visible_datasets.py"] | ||
| ) | ||
|
|
||
| # Apply permissions | ||
| execPodCommand(namespace, pod_name, ["python", "permissions_apply.py"]) | ||
|
|
||
| else: | ||
| # OpenShift cluster setup using S3-based registry | ||
| aws_access_key = os.getenv("AWS_ACCESS_KEY") | ||
| aws_secret_key = os.getenv("AWS_SECRET_KEY") | ||
| aws_bucket = os.getenv("AWS_BUCKET_NAME") | ||
| registry_path = os.getenv("AWS_REGISTRY_FILE_PATH") | ||
|
|
||
| run_kubectl_apply_with_sed( | ||
| aws_access_key, | ||
| aws_secret_key, | ||
| aws_bucket, | ||
| registry_path, | ||
| str(resource_dir / "feast_config_rhoai.yaml"), | ||
| namespace, | ||
| ) | ||
| validate_feature_store_cr_status(namespace, "test-s3") | ||
| route_url = create_route(namespace, credit_scoring, service_name) | ||
| # Create Saved Datasets and Permissions | ||
| pod_name = get_pod_name_by_prefix(namespace, credit_scoring) | ||
| execPodCommand( | ||
| namespace, pod_name, ["python", "create_ui_visible_datasets.py"] | ||
| ) | ||
| execPodCommand(namespace, pod_name, ["python", "permissions_apply.py"]) | ||
| if not route_url: | ||
| raise RuntimeError("Route URL could not be fetched.") |
There was a problem hiding this comment.
🟡 Delayed route_url validation allows misleading failures when create_route returns None
On the OpenShift path, if create_route returns None (e.g. the oc command fails), the code proceeds to run applyFeastProject, get_pod_name_by_prefix, and execPodCommand before reaching the if not route_url check on line 162. In the old code, the OpenShift else block set route_url and then immediately hit this check. Now, these intermediate operations can fail with confusing errors (e.g., kubectl exec None ... from execPodCommand at support.py:240 when get_pod_name_by_prefix returns None), masking the real issue that the route URL could not be created. The if not route_url check should be moved immediately after the if/else block that sets route_url, before lines 152–161.
Was this helpful? React with 👍 or 👎 to provide feedback.
4a6c299 to
03cdd64
Compare
03cdd64 to
ab06be2
Compare
7cd94ba to
d738e5a
Compare
Signed-off-by: Srihari <svenkata@redhat.com>
d738e5a to
3f9d1ba
Compare
What this PR does / why we need it:
Updated registry rest API tests for Openshift environment tests run
Which issue(s) this PR fixes:
Misc