Skip to content

Commit 6ecbd46

Browse files
committed
[DOP-30631] Improve Iceberg params naming
1 parent a71e092 commit 6ecbd46

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

syncmaster/dto/connections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class IcebergRESTCatalogOAuth2ClientCredentialsS3DTO(IcebergRESTCatalogS3Connect
103103
rest_catalog_oauth2_scopes: list[str]
104104
rest_catalog_oauth2_resource: str | None = None
105105
rest_catalog_oauth2_audience: str | None = None
106-
rest_catalog_oauth2_server_uri: str | None = None
106+
rest_catalog_oauth2_token_endpoint: str | None = None
107107
rest_catalog_auth_type: Literal["oauth2"] = "oauth2"
108108

109109

syncmaster/schemas/v1/auth/iceberg/oauth2_client_credentials.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class ReadIcebergRESTCatalogOAuth2ClientCredentialsAuthSchema(BaseModel):
1313
rest_catalog_oauth2_scopes: list[str] = Field(default_factory=list)
1414
rest_catalog_oauth2_resource: str | None = None
1515
rest_catalog_oauth2_audience: str | None = None
16-
rest_catalog_oauth2_server_uri: URL | None = None
16+
rest_catalog_oauth2_token_endpoint: URL | None = None
1717
s3_access_key: str
1818

1919

syncmaster/worker/handlers/db/iceberg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def _make_auth(self):
9797
scopes=self.connection_dto.rest_catalog_oauth2_scopes,
9898
resource=self.connection_dto.rest_catalog_oauth2_resource,
9999
audience=self.connection_dto.rest_catalog_oauth2_audience,
100-
server_uri=self.connection_dto.rest_catalog_oauth2_server_uri,
100+
oauth2_token_endpoint=self.connection_dto.rest_catalog_oauth2_token_endpoint,
101101
)
102102
return Iceberg.RESTCatalog.BasicAuth(
103103
user=self.connection_dto.rest_catalog_username,

tests/test_unit/test_connections/test_db_connection/test_create_iceberg_connection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ async def test_developer_plus_can_create_iceberg_rest_s3_connection_with_oauth2_
124124
"rest_catalog_oauth2_client_secret": "my_client_secret",
125125
"rest_catalog_oauth2_scopes": ["catalog:read"],
126126
"rest_catalog_oauth2_audience": "iceberg-catalog",
127-
"rest_catalog_oauth2_server_uri": "https://oauth.example.com/token",
127+
"rest_catalog_oauth2_token_endpoint": "https://oauth.example.com/token",
128128
"s3_access_key": "access_key",
129129
"s3_secret_key": "secret_key",
130130
},
@@ -172,7 +172,7 @@ async def test_developer_plus_can_create_iceberg_rest_s3_connection_with_oauth2_
172172
"rest_catalog_oauth2_scopes": decrypted["rest_catalog_oauth2_scopes"],
173173
"rest_catalog_oauth2_audience": decrypted["rest_catalog_oauth2_audience"],
174174
"rest_catalog_oauth2_resource": decrypted["rest_catalog_oauth2_resource"],
175-
"rest_catalog_oauth2_server_uri": decrypted["rest_catalog_oauth2_server_uri"],
175+
"rest_catalog_oauth2_token_endpoint": decrypted["rest_catalog_oauth2_token_endpoint"],
176176
"s3_access_key": decrypted["s3_access_key"],
177177
},
178178
}

tests/test_unit/test_connections/test_db_connection/test_update_iceberg_connection.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ async def test_developer_plus_can_update_iceberg_rest_s3_connection(
112112
"rest_catalog_oauth2_client_secret": "my_client_secret",
113113
"rest_catalog_oauth2_scopes": ["catalog:read"],
114114
"rest_catalog_oauth2_audience": "iceberg-catalog",
115-
"rest_catalog_oauth2_resource": None,
116-
"rest_catalog_oauth2_server_uri": "https://oauth.example.com/token",
115+
"rest_catalog_oauth2_resource": "some-old-resource",
116+
"rest_catalog_oauth2_token_endpoint": "https://oauth.example.com/token",
117117
"s3_access_key": "access_key",
118118
"s3_secret_key": "secret_key",
119119
},
@@ -151,7 +151,7 @@ async def test_developer_plus_can_update_iceberg_rest_s3_connection_with_oauth2_
151151
"rest_catalog_oauth2_scopes": ["catalog:write"],
152152
"rest_catalog_oauth2_audience": "iceberg-new-catalog",
153153
"rest_catalog_oauth2_resource": "iceberg-new-resource",
154-
"rest_catalog_oauth2_server_uri": "https://oauth.new.example.com/token",
154+
"rest_catalog_oauth2_token_endpoint": "https://oauth.new.example.com/token",
155155
"s3_access_key": "new_access_key",
156156
"s3_secret_key": "new_secret_key",
157157
},
@@ -182,7 +182,7 @@ async def test_developer_plus_can_update_iceberg_rest_s3_connection_with_oauth2_
182182
"rest_catalog_oauth2_scopes": ["catalog:write"],
183183
"rest_catalog_oauth2_audience": "iceberg-new-catalog",
184184
"rest_catalog_oauth2_resource": "iceberg-new-resource",
185-
"rest_catalog_oauth2_server_uri": "https://oauth.new.example.com/token",
185+
"rest_catalog_oauth2_token_endpoint": "https://oauth.new.example.com/token",
186186
"s3_access_key": "new_access_key",
187187
},
188188
}

0 commit comments

Comments
 (0)