Skip to content
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

Update spec to reflect that deleteCatalog is not cascading #201

Merged
merged 4 commits into from
Sep 12, 2024

Conversation

eric-maynard
Copy link
Contributor

@eric-maynard eric-maynard commented Aug 23, 2024

Description

The language of the spec needs to be updated in order to accurately reflect the current behavior.

Partially fixes #112

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Doc change

Checklist:

Please delete options that are not relevant.

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

flyrain
flyrain previously approved these changes Aug 23, 2024
Copy link
Contributor

@flyrain flyrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. Are we going to provide a tool for cascading deletion?

all metadata, including principals, roles and grants. If the catalog is
an internal catalog, all tables and namespaces are dropped without
purge.
description: Delete an existing catalog. The catalog must be empty.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR itself LGTM, but I wonder how this spec file is related to the Iceberg REST Catalog spec... I see some paths match the Iceberg REST paths... I'd assume this whole file is meant to be 1:1 with the Iceberg spec... WDYT?

Copy link
Contributor

@flyrain flyrain Aug 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should be exact the same for anything in Iceberg REST spec. But I think this file also provides specs that only in Polaris, like catalog endpoint.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also opened a thread for this in Zulip Chat.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This spec file is specific to the Polaris management APIs - they aren't part of the Iceberg catalog spec, nor should they be. There shouldn't be any correspondence to catalog APIs. The actual Iceberg catalog rest spec that we implement lives here: https://github.com/apache/polaris/blob/main/spec/rest-catalog-open-api.yaml

Copy link
Contributor

@flyrain flyrain Aug 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We got three yaml files in the directory

  1. polaris-management-service.yml
  2. rest-catalog-open-api.yaml
  3. index.yaml

The index.yaml is actually a generated file combined by 1 and 2. I think that's where the confusion came from. I was confused as well. Should we remove the generated file in the repo?

docker run -p 8080:80 -v ${PWD}:/spec --rm docker.io/redocly/cli join spec/docs.yaml spec/polaris-management-service.yml spec/rest-catalog-open-api.yaml -o spec/index.yaml --prefix-components-with-info-prop title

@RussellSpitzer
Copy link
Member

Thanks @eric-maynard and @dimas-b and @flyrain and @collado-mike for Review

@flyrain flyrain merged commit 19c8258 into apache:main Sep 12, 2024
3 checks passed
@flyrain
Copy link
Contributor

flyrain commented Sep 12, 2024

Thanks @eric-maynard for the fix. Thanks @dimas-b, @RussellSpitzer for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] delete catalog fails when there are existing tables and namespaces.
5 participants