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

metabase.analyze API namespace #42469

Merged
merged 9 commits into from May 22, 2024
Merged

metabase.analyze API namespace #42469

merged 9 commits into from May 22, 2024

Conversation

camsaul
Copy link
Member

@camsaul camsaul commented May 9, 2024

No description provided.

@metabase-bot metabase-bot bot added the .Team/QueryProcessor :hammer_and_wrench: label May 9, 2024
(mu/defn infer-entity-type :- analyze.schema/Table
(mu/defn infer-entity-type-by-name :- analyze.schema/Table
Copy link
Member Author

Choose a reason for hiding this comment

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

I renamed this because classifiers.name/infer-entity-type clearly implied this was based on column name, however analyze/infer-entity-type lost that clarity

@camsaul camsaul requested review from crisptrutski and a team May 9, 2024 17:55
@camsaul camsaul enabled auto-merge (squash) May 9, 2024 17:55
@camsaul camsaul added the no-backport Do not backport this PR to any branch label May 9, 2024
@crisptrutski
Copy link
Contributor

crisptrutski commented May 10, 2024

This seems to introduce a circular reference:

Cyclic load dependency: 

** /metabase/query_processor/compile **

-> /metabase/query_processor
-> /metabase/db/metadata_queries
-> /metabase/models/field_values
-> /metabase/analyze/classifiers/category
-> /metabase/analyze/classifiers/core
-> /metabase/analyze
-> /metabase/query_processor/middleware/annotate
-> /metabase/query_processor/preprocess

** /metabase/query_processor/compile **

-> /metabase/driver/common/parameters/values
-> /metabase/driver/sql
-> /metabase/driver/oracle

Copy link
Contributor

@crisptrutski crisptrutski left a comment

Choose a reason for hiding this comment

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

This exposes a thorny circular dependency between the query-processor and analyze modules, not sure the easiest way to resolve that.

Otherwise this looks hunky dory

@camsaul camsaul requested a review from crisptrutski May 22, 2024 01:50
Copy link

replay-io bot commented May 22, 2024

Status Complete ↗︎
Commit 37024a2
Results
⚠️ 1 Flaky
2572 Passed

Copy link
Contributor

@crisptrutski crisptrutski left a comment

Choose a reason for hiding this comment

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

Nicely done

@@ -27,6 +27,7 @@
[java-time.api :as t]
[malli.core :as mc]
[medley.core :as m]
[metabase.analyze :as analyze]
Copy link
Contributor

Choose a reason for hiding this comment

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

This dependency bothers me a bit, in my mind models shouldn't depend on higher level modules, if possible. We could "fix" this by moving the constants out to a general config namespace at some point.

Copy link
Member Author

Choose a reason for hiding this comment

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

agreed, but that's a step 2 thing and step 1 is just getting things in modules. It's going to take a while and several iterations to clean everything up

@camsaul camsaul merged commit 618b8c2 into master May 22, 2024
107 checks passed
@camsaul camsaul deleted the analyze-api-namespace branch May 22, 2024 02:56
oisincoveney pushed a commit that referenced this pull request May 22, 2024
* Squashed commit

* Update config

* Backport the kondo ignore stuff from other PR.

* `metabase.analyze` API namespace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-backport Do not backport this PR to any branch .Team/QueryProcessor :hammer_and_wrench:
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants