Skip to content

Commit a4ca2ac

Browse files
committed
fix: improve RBAC proxy initialization error handling
1 parent 3b73567 commit a4ca2ac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/model_registry/rbac/test_mr_rbac_sa.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ def test_service_account_access_denied(
4747

4848
# Retry for up to 2 minutes to allow kube-rbac-proxy initialization
4949
# Accept UnauthorizedException (401) as a transient error during initialization
50+
# When we get ForbiddenException (403), stop retrying and let it raise
5051
sampler = TimeoutSampler(
5152
wait_timeout=120,
5253
sleep=5,
5354
func=lambda: ModelRegistryClient(**client_args),
54-
exceptions_dict={UnauthorizedException: []},
55+
exceptions_dict={UnauthorizedException: [], ForbiddenException: [ForbiddenException]},
5556
)
5657

5758
# Expect ForbiddenException (403) once kube-rbac-proxy is fully initialized

0 commit comments

Comments
 (0)