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

[CT-1664] [Feature] Add a new UnsupportedException exception #6448

Open
Fleid opened this issue Dec 15, 2022 · 5 comments
Open

[CT-1664] [Feature] Add a new UnsupportedException exception #6448

Fleid opened this issue Dec 15, 2022 · 5 comments
Labels
enhancement New feature or request Refinement Maintainer input needed user docs [docs.getdbt.com] Needs better documentation

Comments

@Fleid
Copy link
Contributor

Fleid commented Dec 15, 2022

  1. Add the new UnsupportedException exception
  2. Refactor adaptors to use it when a feature defined in / expected by core is not supported by the database/platform
  3. ...
  4. Profit!

Tagging @VersusFacit and @emmyoop
Original ask from @dataders : "to build out a feature compatibility matrix across all of our adapters"

@Fleid Fleid added enhancement New feature or request triage labels Dec 15, 2022
@github-actions github-actions bot changed the title [Feature] Add a new UnsupportedException exception [CT-1664] [Feature] Add a new UnsupportedException exception Dec 15, 2022
@Fleid Fleid removed the triage label Dec 15, 2022
@dataders
Copy link
Contributor

dataders commented Dec 15, 2022

here's an example of how Ibis uses a support registry concept for each backend. Then registry objects can be invoked to generate Ibis's backend feature support matrix.

https://github.com/ibis-project/ibis/blob/9138f6b4d4b15d9d965a73c3afe0f2472e696fdc/ibis/backends/clickhouse/registry.py#L798-L849

@jtcohen6
Copy link
Contributor

jtcohen6 commented Jan 5, 2023

We do have a NotImplementedException, which we use for abstract methods in our base adapter classes, with the expectation that real adapters will implement those things (or otherwise raise):

class NotImplementedException(Exception):
def __init__(self, msg: str):
self.msg = msg
self.formatted_msg = f"ERROR: {self.msg}"
super().__init__(self.formatted_msg)

(in the same spirit of https://docs.python.org/3/library/exceptions.html#NotImplementedError)

Let's use that in favor of a new UnsupportedException. We'd still need to refactor our adapters to explicitly use it, when there's functionality we aren't / can't implement, and update our docs for adapter maintainers encouraging them to do the same.

Some doubts in conversation about the guarantees we'd be able to get from this approach, in terms of automating the creation / update of the original ask:

to build out a feature compatibility matrix across all of our adapters

@jtcohen6 jtcohen6 added user docs [docs.getdbt.com] Needs better documentation Refinement Maintainer input needed labels Jan 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.

@github-actions github-actions bot added the stale Issues that have gone stale label Jul 5, 2023
@github-actions
Copy link
Contributor

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 12, 2023
@dataders
Copy link
Contributor

re-opening because of #8648

@dataders dataders reopened this Sep 29, 2023
@github-actions github-actions bot removed the stale Issues that have gone stale label Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Refinement Maintainer input needed user docs [docs.getdbt.com] Needs better documentation
Projects
None yet
Development

No branches or pull requests

3 participants