You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/04/16 19:20:28 UTC

[GitHub] [superset] betodealmeida opened a new pull request #14204: feat: improve engine spec discoverability

betodealmeida opened a new pull request #14204:
URL: https://github.com/apache/superset/pull/14204


   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   This PR changes the mechanism we use to discover DB engine specs, relying on [Python entry points](https://packaging.python.org/specifications/entry-points/). Using entry points is cleaner, and allows users to distribute new engine specs as packages separate from Superset.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   List of engines before:
   
   ```
   {'awsathena': <class 'superset.db_engine_specs.athena.AthenaEngineSpec'>,
    'base': <class 'superset.db_engine_specs.base.BaseEngineSpec'>,
    'bigquery': <class 'superset.db_engine_specs.bigquery.BigQueryEngineSpec'>,
    'clickhouse': <class 'superset.db_engine_specs.clickhouse.ClickHouseEngineSpec'>,
    'cockroachdb': <class 'superset.db_engine_specs.cockroachdb.CockroachDbEngineSpec'>,
    'crate': <class 'superset.db_engine_specs.crate.CrateEngineSpec'>,
    'databricks': <class 'superset.db_engine_specs.databricks.DatabricksHiveEngineSpec'>,
    'dremio': <class 'superset.db_engine_specs.dremio.DremioBaseEngineSpec'>,
    'drill': <class 'superset.db_engine_specs.drill.DrillEngineSpec'>,
    'druid': <class 'superset.db_engine_specs.druid.DruidEngineSpec'>,
    'elasticsearch': <class 'superset.db_engine_specs.elasticsearch.ElasticSearchEngineSpec'>,
    'exa': <class 'superset.db_engine_specs.exasol.ExasolEngineSpec'>,
    'firebird': <class 'superset.db_engine_specs.firebird.FirebirdEngineSpec'>,
    'gsheets': <class 'superset.db_engine_specs.gsheets.GSheetsEngineSpec'>,
    'hana': <class 'superset.db_engine_specs.hana.HanaEngineSpec'>,
    'hive': <class 'superset.db_engine_specs.hive.HiveEngineSpec'>,
    'ibm_db_sa': <class 'superset.db_engine_specs.db2.Db2EngineSpec'>,
    'impala': <class 'superset.db_engine_specs.impala.ImpalaEngineSpec'>,
    'kylin': <class 'superset.db_engine_specs.kylin.KylinEngineSpec'>,
    'mssql': <class 'superset.db_engine_specs.mssql.MssqlEngineSpec'>,
    'mysql': <class 'superset.db_engine_specs.mysql.MySQLEngineSpec'>,
    'odelasticsearch': <class 'superset.db_engine_specs.elasticsearch.OpenDistroEngineSpec'>,
    'oracle': <class 'superset.db_engine_specs.oracle.OracleEngineSpec'>,
    'pinot': <class 'superset.db_engine_specs.pinot.PinotEngineSpec'>,
    'postgres': <class 'superset.db_engine_specs.postgres.PostgresEngineSpec'>,
    'postgresql': <class 'superset.db_engine_specs.postgres.PostgresEngineSpec'>,
    'presto': <class 'superset.db_engine_specs.presto.PrestoEngineSpec'>,
    'redshift': <class 'superset.db_engine_specs.redshift.RedshiftEngineSpec'>,
    'snowflake': <class 'superset.db_engine_specs.snowflake.SnowflakeEngineSpec'>,
    'solr': <class 'superset.db_engine_specs.solr.SolrEngineSpec'>,
    'sqlite': <class 'superset.db_engine_specs.sqlite.SqliteEngineSpec'>,
    'teradata': <class 'superset.db_engine_specs.teradata.TeradataEngineSpec'>,
    'trino': <class 'superset.db_engine_specs.trino.TrinoEngineSpec'>,
    'vertica': <class 'superset.db_engine_specs.vertica.VerticaEngineSpec'>}
   ```
   
   And after:
   
   ```
   {'awsathena': <class 'superset.db_engine_specs.athena.AthenaEngineSpec'>,
    'bigquery': <class 'superset.db_engine_specs.bigquery.BigQueryEngineSpec'>,
    'clickhouse': <class 'superset.db_engine_specs.clickhouse.ClickHouseEngineSpec'>,
    'cockroachdb': <class 'superset.db_engine_specs.cockroachdb.CockroachDbEngineSpec'>,
    'crate': <class 'superset.db_engine_specs.crate.CrateEngineSpec'>,
    'databricks': <class 'superset.db_engine_specs.databricks.DatabricksHiveEngineSpec'>,
    'dremio': <class 'superset.db_engine_specs.dremio.DremioBaseEngineSpec'>,
    'drill': <class 'superset.db_engine_specs.drill.DrillEngineSpec'>,
    'druid': <class 'superset.db_engine_specs.druid.DruidEngineSpec'>,
    'elasticsearch': <class 'superset.db_engine_specs.elasticsearch.ElasticSearchEngineSpec'>,
    'exa': <class 'superset.db_engine_specs.exasol.ExasolEngineSpec'>,
    'firebird': <class 'superset.db_engine_specs.firebird.FirebirdEngineSpec'>,
    'gsheets': <class 'superset.db_engine_specs.gsheets.GSheetsEngineSpec'>,
    'hana': <class 'superset.db_engine_specs.hana.HanaEngineSpec'>,
    'hive': <class 'superset.db_engine_specs.hive.HiveEngineSpec'>,
    'ibm_db_sa': <class 'superset.db_engine_specs.db2.Db2EngineSpec'>,
    'impala': <class 'superset.db_engine_specs.impala.ImpalaEngineSpec'>,
    'kylin': <class 'superset.db_engine_specs.kylin.KylinEngineSpec'>,
    'mssql': <class 'superset.db_engine_specs.mssql.MssqlEngineSpec'>,
    'mysql': <class 'superset.db_engine_specs.mysql.MySQLEngineSpec'>,
    'odelasticsearch': <class 'superset.db_engine_specs.elasticsearch.OpenDistroEngineSpec'>,
    'oracle': <class 'superset.db_engine_specs.oracle.OracleEngineSpec'>,
    'pinot': <class 'superset.db_engine_specs.pinot.PinotEngineSpec'>,
    'postgres': <class 'superset.db_engine_specs.postgres.PostgresEngineSpec'>,
    'postgresql': <class 'superset.db_engine_specs.postgres.PostgresEngineSpec'>,
    'presto': <class 'superset.db_engine_specs.presto.PrestoEngineSpec'>,
    'redshift': <class 'superset.db_engine_specs.redshift.RedshiftEngineSpec'>,
    'snowflake': <class 'superset.db_engine_specs.snowflake.SnowflakeEngineSpec'>,
    'solr': <class 'superset.db_engine_specs.solr.SolrEngineSpec'>,
    'sqlite': <class 'superset.db_engine_specs.sqlite.SqliteEngineSpec'>,
    'teradata': <class 'superset.db_engine_specs.teradata.TeradataEngineSpec'>,
    'trino': <class 'superset.db_engine_specs.trino.TrinoEngineSpec'>,
    'vertica': <class 'superset.db_engine_specs.vertica.VerticaEngineSpec'>}
   ```
   
   The only difference is the absence of the base class:` 'base': <class 'superset.db_engine_specs.base.BaseEngineSpec'>,`
   
   ### TEST PLAN
   <!--- What steps should be taken to verify the changes -->
   
   Tested Superset, everything works as expected.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #14204: feat: improve engine spec discoverability

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #14204:
URL: https://github.com/apache/superset/pull/14204#issuecomment-821516820


   # [Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#14204](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b9ffa0c) into [master](https://codecov.io/gh/apache/superset/commit/1448f7840643c8edb0ff1f1f94437e776c740ca3?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1448f78) will **increase** coverage by `2.78%`.
   > The diff coverage is `86.66%`.
   
   > :exclamation: Current head b9ffa0c differs from pull request most recent head 09c12de. Consider uploading reports for the commit 09c12de to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/14204/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #14204      +/-   ##
   ==========================================
   + Coverage   76.13%   78.92%   +2.78%     
   ==========================================
     Files         945      945              
     Lines       47927    47949      +22     
     Branches     5950     6069     +119     
   ==========================================
   + Hits        36491    37843    +1352     
   + Misses      11230     9971    -1259     
   + Partials      206      135      -71     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `80.37% <86.66%> (-0.03%)` | :arrow_down: |
   | mysql | `?` | |
   | postgres | `?` | |
   | presto | `?` | |
   | python | `80.37% <86.66%> (-0.88%)` | :arrow_down: |
   | sqlite | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/\_\_init\_\_.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL19faW5pdF9fLnB5) | `88.23% <86.66%> (-11.77%)` | :arrow_down: |
   | [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [superset/views/database/views.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2Uvdmlld3MucHk=) | `62.50% <0.00%> (-25.07%)` | :arrow_down: |
   | [superset/databases/commands/create.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `82.35% <0.00%> (-9.81%)` | :arrow_down: |
   | [superset-frontend/src/views/routes.tsx](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL3JvdXRlcy50c3g=) | `54.54% <0.00%> (-9.10%)` | :arrow_down: |
   | [superset/databases/commands/update.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
   | [superset/sql\_validators/base.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvYmFzZS5weQ==) | `93.33% <0.00%> (-6.67%)` | :arrow_down: |
   | [...rBar/CascadeFilters/CascadeFilterControl/index.tsx](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQmFyL0Nhc2NhZGVGaWx0ZXJzL0Nhc2NhZGVGaWx0ZXJDb250cm9sL2luZGV4LnRzeA==) | `85.71% <0.00%> (-6.60%)` | :arrow_down: |
   | [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `90.62% <0.00%> (-6.25%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `84.10% <0.00%> (-5.80%)` | :arrow_down: |
   | ... and [208 more](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1448f78...09c12de](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] betodealmeida commented on a change in pull request #14204: feat: improve engine spec discoverability

Posted by GitBox <gi...@apache.org>.
betodealmeida commented on a change in pull request #14204:
URL: https://github.com/apache/superset/pull/14204#discussion_r615895237



##########
File path: setup.py
##########
@@ -62,7 +62,43 @@ def get_git_sha():
     packages=find_packages(),
     include_package_data=True,
     zip_safe=False,
-    entry_points={"console_scripts": ["superset=superset.cli:superset"]},
+    entry_points={
+        "console_scripts": ["superset=superset.cli:superset",],
+        "superset.db_engine_specs": [
+            "athena=superset.db_engine_specs.athena:AthenaEngineSpec",
+            "bigquery=superset.db_engine_specs.bigquery:BigQueryEngineSpec",
+            "clickhouse=superset.db_engine_specs.clickhouse:ClickHouseEngineSpec",
+            "cockroachdb=superset.db_engine_specs.cockroachdb:CockroachDbEngineSpec",
+            "crate=superset.db_engine_specs.crate:CrateEngineSpec",
+            "databricks=superset.db_engine_specs.databricks:DatabricksHiveEngineSpec",
+            "db2=superset.db_engine_specs.db2:Db2EngineSpec",
+            "dremio=superset.db_engine_specs.dremio:DremioBaseEngineSpec",
+            "drill=superset.db_engine_specs.drill:DrillEngineSpec",
+            "druid=superset.db_engine_specs.druid:DruidEngineSpec",
+            "elasticsearch=superset.db_engine_specs.elasticsearch:ElasticSearchEngineSpec",
+            "odelasticsearch=superset.db_engine_specs.elasticsearch:OpenDistroEngineSpec",
+            "exasol=superset.db_engine_specs.exasol:ExasolEngineSpec",
+            "firebird=superset.db_engine_specs.firebird:FirebirdEngineSpec",
+            "gsheets=superset.db_engine_specs.gsheets:GSheetsEngineSpec",
+            "hana=superset.db_engine_specs.hana:HanaEngineSpec",
+            "hive=superset.db_engine_specs.hive:HiveEngineSpec",
+            "impala=superset.db_engine_specs.impala:ImpalaEngineSpec",
+            "kylin=superset.db_engine_specs.kylin:KylinEngineSpec",
+            "mssql=superset.db_engine_specs.mssql:MssqlEngineSpec",
+            "mysql=superset.db_engine_specs.mysql:MySQLEngineSpec",
+            "oracle=superset.db_engine_specs.oracle:OracleEngineSpec",
+            "pinot=superset.db_engine_specs.pinot:PinotEngineSpec",
+            "postgres=superset.db_engine_specs.postgres:PostgresEngineSpec",
+            "presto=superset.db_engine_specs.presto:PrestoEngineSpec",
+            "redshift=superset.db_engine_specs.redshift:RedshiftEngineSpec",
+            "snowflake=superset.db_engine_specs.snowflake:SnowflakeEngineSpec",
+            "solr=superset.db_engine_specs.solr:SolrEngineSpec",
+            "sqlite=superset.db_engine_specs.sqlite:SqliteEngineSpec",
+            "teradata=superset.db_engine_specs.teradata:TeradataEngineSpec",
+            "trino=superset.db_engine_specs.trino:TrinoEngineSpec",
+            "vertica=superset.db_engine_specs.vertica:VerticaEngineSpec",
+        ],
+    },

Review comment:
       Will do!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #14204: feat: improve engine spec discoverability

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #14204:
URL: https://github.com/apache/superset/pull/14204#issuecomment-821516820


   # [Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#14204](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b9ffa0c) into [master](https://codecov.io/gh/apache/superset/commit/df04c3af212a18c00a0bc97f8500317551016ce9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (df04c3a) will **decrease** coverage by `0.32%`.
   > The diff coverage is `86.66%`.
   
   > :exclamation: Current head b9ffa0c differs from pull request most recent head 6f15372. Consider uploading reports for the commit 6f15372 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/14204/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #14204      +/-   ##
   ==========================================
   - Coverage   79.24%   78.92%   -0.33%     
   ==========================================
     Files         945      945              
     Lines       47950    47949       -1     
     Branches     6069     6069              
   ==========================================
   - Hits        37998    37843     -155     
   - Misses       9817     9971     +154     
     Partials      135      135              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `80.37% <86.66%> (?)` | |
   | mysql | `?` | |
   | postgres | `?` | |
   | presto | `?` | |
   | python | `80.37% <86.66%> (-0.61%)` | :arrow_down: |
   | sqlite | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/\_\_init\_\_.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL19faW5pdF9fLnB5) | `88.23% <86.66%> (-11.77%)` | :arrow_down: |
   | [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [superset/views/database/views.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2Uvdmlld3MucHk=) | `62.50% <0.00%> (-25.07%)` | :arrow_down: |
   | [superset/databases/commands/create.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `82.35% <0.00%> (-9.81%)` | :arrow_down: |
   | [superset/databases/commands/update.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
   | [superset/sql\_validators/base.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvYmFzZS5weQ==) | `93.33% <0.00%> (-6.67%)` | :arrow_down: |
   | [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `90.62% <0.00%> (-6.25%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `84.10% <0.00%> (-5.86%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `81.91% <0.00%> (-5.59%)` | :arrow_down: |
   | [superset/views/database/forms.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvZm9ybXMucHk=) | `83.33% <0.00%> (-5.56%)` | :arrow_down: |
   | ... and [15 more](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [df04c3a...6f15372](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #14204: feat: improve engine spec discoverability

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #14204:
URL: https://github.com/apache/superset/pull/14204#issuecomment-821516820


   # [Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#14204](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b9ffa0c) into [master](https://codecov.io/gh/apache/superset/commit/df04c3af212a18c00a0bc97f8500317551016ce9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (df04c3a) will **decrease** coverage by `0.32%`.
   > The diff coverage is `86.66%`.
   
   > :exclamation: Current head b9ffa0c differs from pull request most recent head b90bf7e. Consider uploading reports for the commit b90bf7e to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/14204/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #14204      +/-   ##
   ==========================================
   - Coverage   79.24%   78.92%   -0.33%     
   ==========================================
     Files         945      945              
     Lines       47950    47949       -1     
     Branches     6069     6069              
   ==========================================
   - Hits        37998    37843     -155     
   - Misses       9817     9971     +154     
     Partials      135      135              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `80.37% <86.66%> (?)` | |
   | mysql | `?` | |
   | postgres | `?` | |
   | presto | `?` | |
   | python | `80.37% <86.66%> (-0.61%)` | :arrow_down: |
   | sqlite | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/\_\_init\_\_.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL19faW5pdF9fLnB5) | `88.23% <86.66%> (-11.77%)` | :arrow_down: |
   | [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [superset/views/database/views.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2Uvdmlld3MucHk=) | `62.50% <0.00%> (-25.07%)` | :arrow_down: |
   | [superset/databases/commands/create.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `82.35% <0.00%> (-9.81%)` | :arrow_down: |
   | [superset/databases/commands/update.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
   | [superset/sql\_validators/base.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvYmFzZS5weQ==) | `93.33% <0.00%> (-6.67%)` | :arrow_down: |
   | [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `90.62% <0.00%> (-6.25%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `84.10% <0.00%> (-5.86%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `81.91% <0.00%> (-5.59%)` | :arrow_down: |
   | [superset/views/database/forms.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvZm9ybXMucHk=) | `83.33% <0.00%> (-5.56%)` | :arrow_down: |
   | ... and [15 more](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [df04c3a...b90bf7e](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #14204: feat: improve engine spec discoverability

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #14204:
URL: https://github.com/apache/superset/pull/14204#issuecomment-821516820


   # [Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#14204](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b9ffa0c) into [master](https://codecov.io/gh/apache/superset/commit/1448f7840643c8edb0ff1f1f94437e776c740ca3?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1448f78) will **increase** coverage by `2.78%`.
   > The diff coverage is `86.66%`.
   
   > :exclamation: Current head b9ffa0c differs from pull request most recent head 3276b3b. Consider uploading reports for the commit 3276b3b to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/14204/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #14204      +/-   ##
   ==========================================
   + Coverage   76.13%   78.92%   +2.78%     
   ==========================================
     Files         945      945              
     Lines       47927    47949      +22     
     Branches     5950     6069     +119     
   ==========================================
   + Hits        36491    37843    +1352     
   + Misses      11230     9971    -1259     
   + Partials      206      135      -71     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `80.37% <86.66%> (-0.03%)` | :arrow_down: |
   | mysql | `?` | |
   | postgres | `?` | |
   | presto | `?` | |
   | python | `80.37% <86.66%> (-0.88%)` | :arrow_down: |
   | sqlite | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/\_\_init\_\_.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL19faW5pdF9fLnB5) | `88.23% <86.66%> (-11.77%)` | :arrow_down: |
   | [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [superset/views/database/views.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2Uvdmlld3MucHk=) | `62.50% <0.00%> (-25.07%)` | :arrow_down: |
   | [superset/databases/commands/create.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `82.35% <0.00%> (-9.81%)` | :arrow_down: |
   | [superset-frontend/src/views/routes.tsx](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL3JvdXRlcy50c3g=) | `54.54% <0.00%> (-9.10%)` | :arrow_down: |
   | [superset/databases/commands/update.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
   | [superset/sql\_validators/base.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvYmFzZS5weQ==) | `93.33% <0.00%> (-6.67%)` | :arrow_down: |
   | [...rBar/CascadeFilters/CascadeFilterControl/index.tsx](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQmFyL0Nhc2NhZGVGaWx0ZXJzL0Nhc2NhZGVGaWx0ZXJDb250cm9sL2luZGV4LnRzeA==) | `85.71% <0.00%> (-6.60%)` | :arrow_down: |
   | [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `90.62% <0.00%> (-6.25%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `84.10% <0.00%> (-5.80%)` | :arrow_down: |
   | ... and [208 more](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1448f78...3276b3b](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #14204: feat: improve engine spec discoverability

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #14204:
URL: https://github.com/apache/superset/pull/14204#issuecomment-821516820


   # [Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#14204](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3276b3b) into [master](https://codecov.io/gh/apache/superset/commit/1448f7840643c8edb0ff1f1f94437e776c740ca3?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1448f78) will **decrease** coverage by `0.08%`.
   > The diff coverage is `74.19%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/14204/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #14204      +/-   ##
   ==========================================
   - Coverage   76.13%   76.05%   -0.09%     
   ==========================================
     Files         945      945              
     Lines       47927    47946      +19     
     Branches     5950     5950              
   ==========================================
   - Hits        36491    36464      -27     
   - Misses      11230    11276      +46     
     Partials      206      206              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `80.38% <74.19%> (-0.02%)` | :arrow_down: |
   | mysql | `80.67% <74.19%> (-0.02%)` | :arrow_down: |
   | postgres | `80.71% <74.19%> (-0.02%)` | :arrow_down: |
   | presto | `?` | |
   | python | `81.09% <74.19%> (-0.17%)` | :arrow_down: |
   | sqlite | `80.31% <74.19%> (-0.02%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.85% <50.00%> (-0.49%)` | :arrow_down: |
   | [superset/db\_engine\_specs/\_\_init\_\_.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL19faW5pdF9fLnB5) | `81.81% <77.77%> (-18.19%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `84.42% <0.00%> (-5.48%)` | :arrow_down: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `88.61% <0.00%> (-1.46%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1448f78...3276b3b](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #14204: feat: improve engine spec discoverability

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #14204:
URL: https://github.com/apache/superset/pull/14204#issuecomment-821516820


   # [Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#14204](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3276b3b) into [master](https://codecov.io/gh/apache/superset/commit/1448f7840643c8edb0ff1f1f94437e776c740ca3?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1448f78) will **decrease** coverage by `0.24%`.
   > The diff coverage is `74.19%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/14204/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #14204      +/-   ##
   ==========================================
   - Coverage   76.13%   75.89%   -0.25%     
   ==========================================
     Files         945      945              
     Lines       47927    47946      +19     
     Branches     5950     5950              
   ==========================================
   - Hits        36491    36387     -104     
   - Misses      11230    11353     +123     
     Partials      206      206              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `?` | |
   | mysql | `80.67% <74.19%> (-0.02%)` | :arrow_down: |
   | postgres | `80.71% <74.19%> (-0.02%)` | :arrow_down: |
   | presto | `?` | |
   | python | `80.79% <74.19%> (-0.47%)` | :arrow_down: |
   | sqlite | `80.31% <74.19%> (-0.02%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.85% <50.00%> (-0.49%)` | :arrow_down: |
   | [superset/db\_engine\_specs/\_\_init\_\_.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL19faW5pdF9fLnB5) | `81.81% <77.77%> (-18.19%)` | :arrow_down: |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-82.15%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `74.42% <0.00%> (-16.42%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `83.36% <0.00%> (-6.53%)` | :arrow_down: |
   | [superset/views/database/mixins.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `81.03% <0.00%> (-1.73%)` | :arrow_down: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `88.37% <0.00%> (-1.70%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `87.05% <0.00%> (-0.45%)` | :arrow_down: |
   | [superset/utils/core.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `88.48% <0.00%> (-0.13%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1448f78...3276b3b](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro commented on a change in pull request #14204: feat: improve engine spec discoverability

Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #14204:
URL: https://github.com/apache/superset/pull/14204#discussion_r615531215



##########
File path: setup.py
##########
@@ -62,7 +62,43 @@ def get_git_sha():
     packages=find_packages(),
     include_package_data=True,
     zip_safe=False,
-    entry_points={"console_scripts": ["superset=superset.cli:superset"]},
+    entry_points={
+        "console_scripts": ["superset=superset.cli:superset",],
+        "superset.db_engine_specs": [
+            "athena=superset.db_engine_specs.athena:AthenaEngineSpec",
+            "bigquery=superset.db_engine_specs.bigquery:BigQueryEngineSpec",
+            "clickhouse=superset.db_engine_specs.clickhouse:ClickHouseEngineSpec",
+            "cockroachdb=superset.db_engine_specs.cockroachdb:CockroachDbEngineSpec",
+            "crate=superset.db_engine_specs.crate:CrateEngineSpec",
+            "databricks=superset.db_engine_specs.databricks:DatabricksHiveEngineSpec",
+            "db2=superset.db_engine_specs.db2:Db2EngineSpec",
+            "dremio=superset.db_engine_specs.dremio:DremioBaseEngineSpec",
+            "drill=superset.db_engine_specs.drill:DrillEngineSpec",
+            "druid=superset.db_engine_specs.druid:DruidEngineSpec",
+            "elasticsearch=superset.db_engine_specs.elasticsearch:ElasticSearchEngineSpec",
+            "odelasticsearch=superset.db_engine_specs.elasticsearch:OpenDistroEngineSpec",
+            "exasol=superset.db_engine_specs.exasol:ExasolEngineSpec",
+            "firebird=superset.db_engine_specs.firebird:FirebirdEngineSpec",
+            "gsheets=superset.db_engine_specs.gsheets:GSheetsEngineSpec",
+            "hana=superset.db_engine_specs.hana:HanaEngineSpec",
+            "hive=superset.db_engine_specs.hive:HiveEngineSpec",
+            "impala=superset.db_engine_specs.impala:ImpalaEngineSpec",
+            "kylin=superset.db_engine_specs.kylin:KylinEngineSpec",
+            "mssql=superset.db_engine_specs.mssql:MssqlEngineSpec",
+            "mysql=superset.db_engine_specs.mysql:MySQLEngineSpec",
+            "oracle=superset.db_engine_specs.oracle:OracleEngineSpec",
+            "pinot=superset.db_engine_specs.pinot:PinotEngineSpec",
+            "postgres=superset.db_engine_specs.postgres:PostgresEngineSpec",
+            "presto=superset.db_engine_specs.presto:PrestoEngineSpec",
+            "redshift=superset.db_engine_specs.redshift:RedshiftEngineSpec",
+            "snowflake=superset.db_engine_specs.snowflake:SnowflakeEngineSpec",
+            "solr=superset.db_engine_specs.solr:SolrEngineSpec",
+            "sqlite=superset.db_engine_specs.sqlite:SqliteEngineSpec",
+            "teradata=superset.db_engine_specs.teradata:TeradataEngineSpec",
+            "trino=superset.db_engine_specs.trino:TrinoEngineSpec",
+            "vertica=superset.db_engine_specs.vertica:VerticaEngineSpec",
+        ],
+    },

Review comment:
       Would it be possible to automate this part by iterating over modules in `superset/db_engine_specs/*.py` and checking that they are `issubclass` but not `isinstance` of `BaseEngineSpec`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #14204: feat: improve engine spec discoverability

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #14204:
URL: https://github.com/apache/superset/pull/14204#issuecomment-821516820


   # [Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#14204](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6f15372) into [master](https://codecov.io/gh/apache/superset/commit/df04c3af212a18c00a0bc97f8500317551016ce9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (df04c3a) will **decrease** coverage by `0.11%`.
   > The diff coverage is `86.66%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/14204/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #14204      +/-   ##
   ==========================================
   - Coverage   79.24%   79.12%   -0.12%     
   ==========================================
     Files         945      945              
     Lines       47950    47951       +1     
     Branches     6069     6069              
   ==========================================
   - Hits        37998    37942      -56     
   - Misses       9817     9874      +57     
     Partials      135      135              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | mysql | `80.64% <86.66%> (-0.01%)` | :arrow_down: |
   | postgres | `80.68% <86.66%> (-0.01%)` | :arrow_down: |
   | presto | `?` | |
   | python | `80.75% <86.66%> (-0.23%)` | :arrow_down: |
   | sqlite | `80.28% <86.66%> (-0.01%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/\_\_init\_\_.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL19faW5pdF9fLnB5) | `88.23% <86.66%> (-11.77%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `81.79% <0.00%> (-8.16%)` | :arrow_down: |
   | [superset/views/database/mixins.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `81.03% <0.00%> (-1.73%)` | :arrow_down: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `88.37% <0.00%> (-1.46%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `87.05% <0.00%> (-0.45%)` | :arrow_down: |
   | [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `89.07% <0.00%> (-0.28%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [df04c3a...6f15372](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #14204: feat: improve engine spec discoverability

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #14204:
URL: https://github.com/apache/superset/pull/14204#issuecomment-821516820


   # [Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#14204](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6f15372) into [master](https://codecov.io/gh/apache/superset/commit/df04c3af212a18c00a0bc97f8500317551016ce9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (df04c3a) will **decrease** coverage by `0.11%`.
   > The diff coverage is `86.66%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/14204/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #14204      +/-   ##
   ==========================================
   - Coverage   79.24%   79.12%   -0.12%     
   ==========================================
     Files         945      945              
     Lines       47950    47951       +1     
     Branches     6069     6069              
   ==========================================
   - Hits        37998    37942      -56     
   - Misses       9817     9874      +57     
     Partials      135      135              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | mysql | `80.64% <86.66%> (-0.01%)` | :arrow_down: |
   | postgres | `80.67% <86.66%> (-0.01%)` | :arrow_down: |
   | presto | `?` | |
   | python | `80.75% <86.66%> (-0.23%)` | :arrow_down: |
   | sqlite | `80.28% <86.66%> (-0.01%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/\_\_init\_\_.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL19faW5pdF9fLnB5) | `88.23% <86.66%> (-11.77%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `81.79% <0.00%> (-8.16%)` | :arrow_down: |
   | [superset/views/database/mixins.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `81.03% <0.00%> (-1.73%)` | :arrow_down: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `88.37% <0.00%> (-1.46%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `87.05% <0.00%> (-0.45%)` | :arrow_down: |
   | [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `89.07% <0.00%> (-0.28%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [df04c3a...6f15372](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] john-bodley commented on a change in pull request #14204: feat: improve engine spec discoverability

Posted by GitBox <gi...@apache.org>.
john-bodley commented on a change in pull request #14204:
URL: https://github.com/apache/superset/pull/14204#discussion_r619595903



##########
File path: superset/db_engine_specs/__init__.py
##########
@@ -28,28 +28,57 @@
 The general idea is to use static classes and an inheritance scheme.
 """
 import inspect
+import logging
 import pkgutil
 from importlib import import_module
 from pathlib import Path
-from typing import Dict, Type
+from typing import Any, Dict, List, Type
+
+from pkg_resources import iter_entry_points
 
 from superset.db_engine_specs.base import BaseEngineSpec
 
-engines: Dict[str, Type[BaseEngineSpec]] = {}
+logger = logging.getLogger(__name__)
+
+
+def is_engine_spec(attr: Any) -> bool:
+    return (
+        inspect.isclass(attr)
+        and issubclass(attr, BaseEngineSpec)
+        and attr != BaseEngineSpec
+    )
+
+
+def get_engine_specs() -> Dict[str, Type[BaseEngineSpec]]:
+    engine_specs: List[Type[BaseEngineSpec]] = []
+
+    # load standard engines
+    db_engine_spec_dir = str(Path(__file__).parent)
+    for module_info in pkgutil.iter_modules([db_engine_spec_dir], prefix="."):
+        module = import_module(module_info.name, package=__name__)
+        engine_specs.extend(
+            getattr(module, attr)
+            for attr in module.__dict__
+            if is_engine_spec(getattr(module, attr))
+        )
 
-for (_, name, _) in pkgutil.iter_modules([Path(__file__).parent]):  # type: ignore
-    imported_module = import_module("." + name, package=__name__)
+    # load additional engines from external modules
+    for ep in iter_entry_points("superset.db_engine_specs"):
+        try:
+            engine_spec = ep.load()
+        except Exception:  # pylint: disable=broad-except
+            logger.warning("Unable to load engine spec: %s", engine_spec)

Review comment:
       @betodealmeida there's a bug here. If line 68 throws an exception then `engine_spec` isn't defined. Also adding documentation as to how to define external modules via `entry_points` could be helpful.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] betodealmeida merged pull request #14204: feat: improve engine spec discoverability

Posted by GitBox <gi...@apache.org>.
betodealmeida merged pull request #14204:
URL: https://github.com/apache/superset/pull/14204


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] commented on pull request #14204: feat: improve engine spec discoverability

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #14204:
URL: https://github.com/apache/superset/pull/14204#issuecomment-821516820


   # [Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#14204](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6f15372) into [master](https://codecov.io/gh/apache/superset/commit/df04c3af212a18c00a0bc97f8500317551016ce9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (df04c3a) will **decrease** coverage by `0.37%`.
   > The diff coverage is `86.66%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/14204/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #14204      +/-   ##
   ==========================================
   - Coverage   79.24%   78.87%   -0.38%     
   ==========================================
     Files         945      945              
     Lines       47950    47924      -26     
     Branches     6069     6069              
   ==========================================
   - Hits        37998    37798     -200     
   - Misses       9817     9991     +174     
     Partials      135      135              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | mysql | `?` | |
   | postgres | `?` | |
   | presto | `?` | |
   | python | `80.28% <86.66%> (-0.70%)` | :arrow_down: |
   | sqlite | `80.28% <86.66%> (-0.01%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/\_\_init\_\_.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL19faW5pdF9fLnB5) | `88.23% <86.66%> (-11.77%)` | :arrow_down: |
   | [superset/databases/commands/create.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `31.37% <0.00%> (-60.79%)` | :arrow_down: |
   | [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [superset/models/sql\_types/base.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvbW9kZWxzL3NxbF90eXBlcy9iYXNlLnB5) | `52.63% <0.00%> (-31.58%)` | :arrow_down: |
   | [superset/views/database/mixins.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `60.34% <0.00%> (-22.42%)` | :arrow_down: |
   | [superset/databases/commands/update.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `81.79% <0.00%> (-8.16%)` | :arrow_down: |
   | [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `90.52% <0.00%> (-6.32%)` | :arrow_down: |
   | [superset/databases/dao.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2Rhby5weQ==) | `94.11% <0.00%> (-5.89%)` | :arrow_down: |
   | [superset/databases/schemas.py](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YWJhc2VzL3NjaGVtYXMucHk=) | `93.58% <0.00%> (-5.89%)` | :arrow_down: |
   | ... and [19 more](https://codecov.io/gh/apache/superset/pull/14204/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [df04c3a...6f15372](https://codecov.io/gh/apache/superset/pull/14204?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] john-bodley commented on a change in pull request #14204: feat: improve engine spec discoverability

Posted by GitBox <gi...@apache.org>.
john-bodley commented on a change in pull request #14204:
URL: https://github.com/apache/superset/pull/14204#discussion_r619595903



##########
File path: superset/db_engine_specs/__init__.py
##########
@@ -28,28 +28,57 @@
 The general idea is to use static classes and an inheritance scheme.
 """
 import inspect
+import logging
 import pkgutil
 from importlib import import_module
 from pathlib import Path
-from typing import Dict, Type
+from typing import Any, Dict, List, Type
+
+from pkg_resources import iter_entry_points
 
 from superset.db_engine_specs.base import BaseEngineSpec
 
-engines: Dict[str, Type[BaseEngineSpec]] = {}
+logger = logging.getLogger(__name__)
+
+
+def is_engine_spec(attr: Any) -> bool:
+    return (
+        inspect.isclass(attr)
+        and issubclass(attr, BaseEngineSpec)
+        and attr != BaseEngineSpec
+    )
+
+
+def get_engine_specs() -> Dict[str, Type[BaseEngineSpec]]:
+    engine_specs: List[Type[BaseEngineSpec]] = []
+
+    # load standard engines
+    db_engine_spec_dir = str(Path(__file__).parent)
+    for module_info in pkgutil.iter_modules([db_engine_spec_dir], prefix="."):
+        module = import_module(module_info.name, package=__name__)
+        engine_specs.extend(
+            getattr(module, attr)
+            for attr in module.__dict__
+            if is_engine_spec(getattr(module, attr))
+        )
 
-for (_, name, _) in pkgutil.iter_modules([Path(__file__).parent]):  # type: ignore
-    imported_module = import_module("." + name, package=__name__)
+    # load additional engines from external modules
+    for ep in iter_entry_points("superset.db_engine_specs"):
+        try:
+            engine_spec = ep.load()
+        except Exception:  # pylint: disable=broad-except
+            logger.warning("Unable to load engine spec: %s", engine_spec)

Review comment:
       @betodealmeida there's a bug here. If line 68 throws an exception then `engine_spec` isn't defined.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org