-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issues related to having catalog_name in identifier #964
Conversation
# specific language governing permissions and limitations | ||
# under the License. | ||
# pylint:disable=redefined-outer-name | ||
from typing import List, Optional, Union |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be moved to test_writes.py
Putting it here temporarily.
tests/catalog/test_rest.py
Outdated
@@ -1226,3 +1226,25 @@ def test_catalog_from_parameters_empty_env(rest_mock: Mocker) -> None: | |||
|
|||
catalog = cast(RestCatalog, load_catalog("production", uri="https://other-service.io/api")) | |||
assert catalog.uri == "https://other-service.io/api" | |||
|
|||
|
|||
def test_commit_table_fail(rest_mock: Mocker, example_table_metadata_v2: Dict[str, Any]) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I find the name of this test confusing as it sounds like we are expecting the table commit to fail, but it succeeds with a 200 status code within the test
+1 to this solution for 0.7.0 @HonahX . This is a creative way to mitigate the issue for the release in the short term. Thank you for taking your time to put together this solution so quickly! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this workaround keeps the catalog name (self.name
) as part of the TableIdentifier and removes it when interacting with the REST server.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
confirmed that the fix works with the rust REST Catalog
An attempt to fix #742 without removing the catalog_name. This may serve as a temporary solution if we finally decide to
do #963 in a later release (or not remove). Otherwise #963 should be preferred