@@ -1198,6 +1198,7 @@ async def db_with_cleanup(
11981198 ImageRow ,
11991199 EndpointRow ,
12001200 EntityFieldRow , # DeploymentRevisionRow relationship dependency
1201+ AssociationScopesEntitiesRow , # RBACEntityCreator dependency
12011202 DeploymentRevisionRow ,
12021203 DeploymentPolicyRow ,
12031204 ],
@@ -1455,7 +1456,16 @@ async def test_revision_data(
14551456 runtime_variant = RuntimeVariant .CUSTOM ,
14561457 extra_mounts = [],
14571458 )
1458- return await deployment_repository .create_revision (Creator (spec = spec ))
1459+ return await deployment_repository .create_revision (
1460+ RBACEntityCreator (
1461+ spec = spec ,
1462+ element_type = RBACElementType .DEPLOYMENT_REVISION ,
1463+ scope_ref = RBACElementRef (
1464+ element_type = RBACElementType .MODEL_DEPLOYMENT ,
1465+ element_id = str (test_endpoint_id ),
1466+ ),
1467+ )
1468+ )
14591469
14601470 @pytest .fixture
14611471 async def test_multiple_revisions (
@@ -1488,7 +1498,16 @@ async def test_multiple_revisions(
14881498 runtime_variant = RuntimeVariant .CUSTOM ,
14891499 extra_mounts = [],
14901500 )
1491- revision = await deployment_repository .create_revision (Creator (spec = spec ))
1501+ revision = await deployment_repository .create_revision (
1502+ RBACEntityCreator (
1503+ spec = spec ,
1504+ element_type = RBACElementType .DEPLOYMENT_REVISION ,
1505+ scope_ref = RBACElementRef (
1506+ element_type = RBACElementType .MODEL_DEPLOYMENT ,
1507+ element_id = str (test_endpoint_id ),
1508+ ),
1509+ )
1510+ )
14921511 revisions .append (revision )
14931512 return revisions
14941513
@@ -1523,7 +1542,16 @@ async def test_five_revisions(
15231542 runtime_variant = RuntimeVariant .CUSTOM ,
15241543 extra_mounts = [],
15251544 )
1526- revision = await deployment_repository .create_revision (Creator (spec = spec ))
1545+ revision = await deployment_repository .create_revision (
1546+ RBACEntityCreator (
1547+ spec = spec ,
1548+ element_type = RBACElementType .DEPLOYMENT_REVISION ,
1549+ scope_ref = RBACElementRef (
1550+ element_type = RBACElementType .MODEL_DEPLOYMENT ,
1551+ element_id = str (test_endpoint_id ),
1552+ ),
1553+ )
1554+ )
15271555 revisions .append (revision )
15281556 return revisions
15291557
@@ -1534,7 +1562,7 @@ async def test_create_revision(
15341562 test_image_id : uuid .UUID ,
15351563 test_scaling_group_name : str ,
15361564 ) -> None :
1537- """Test creating a deployment revision using Creator ."""
1565+ """Test creating a deployment revision using RBACEntityCreator ."""
15381566 spec = DeploymentRevisionCreatorSpec (
15391567 endpoint_id = test_endpoint_id ,
15401568 revision_number = 1 ,
@@ -1555,7 +1583,14 @@ async def test_create_revision(
15551583 runtime_variant = RuntimeVariant .CUSTOM ,
15561584 extra_mounts = [],
15571585 )
1558- creator = Creator (spec = spec )
1586+ creator = RBACEntityCreator (
1587+ spec = spec ,
1588+ element_type = RBACElementType .DEPLOYMENT_REVISION ,
1589+ scope_ref = RBACElementRef (
1590+ element_type = RBACElementType .MODEL_DEPLOYMENT ,
1591+ element_id = str (test_endpoint_id ),
1592+ ),
1593+ )
15591594
15601595 result = await deployment_repository .create_revision (creator )
15611596
0 commit comments