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

fix(cache): respect default cache timeout on v1 chart data requests #21441

Merged
merged 4 commits into from
Sep 13, 2022

Conversation

villebro
Copy link
Member

@villebro villebro commented Sep 12, 2022

SUMMARY

Currently the default timeout set in the cache config is not respected in v1 chart data requests. Notice specifically how the following lines in viz.py are missing in query_context_processor.py:

superset/superset/viz.py

Lines 434 to 435 in 79cb268

if config["DATA_CACHE_CONFIG"].get("CACHE_DEFAULT_TIMEOUT") is not None:
return config["DATA_CACHE_CONFIG"]["CACHE_DEFAULT_TIMEOUT"]

In addition, custom_cache_timeout was missing from the chart data request schema, making it impossible to override the defaults. This PR fixes both errors and adds tests to cover default timeout, cache config timeout and custom timeout.

Finally, it appears we've been running the unit tests every time we run integration tests (this can be confirmed by looking at integration CI workflows which execute unit tests after integration tests). This changes the integration test script so that only the integration tests are executed.

See CI output after (1732 items):

Running tests ============================= test session starts ============================== platform linux -- Python 3.8.13, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 rootdir: /home/runner/work/superset/superset, configfile: pytest.ini plugins: pyfakefs-4.5.6, cov-2.12.1, mock-3.6.1 collected 1732 items

tests/integration_tests/access_tests.py ..................... [ 1%]
tests/integration_tests/base_api_tests.py ...... [ 1%]
tests/integration_tests/cache_tests.py .. [ 1%]
tests/integration_tests/celery_tests.py ................... [ 2%]
tests/integration_tests/cli_tests.py ............. [ 3%]
tests/integration_tests/commands_test.py .... [ 3%]
tests/integration_tests/core_tests.py .................................. [ 5%]
.................................. [ 7%]
tests/integration_tests/dashboard_tests.py .................. [ 8%]
tests/integration_tests/datasource_tests.py ....................... [ 10%]
tests/integration_tests/dict_import_export_tests.py ....... [ 10%]
tests/integration_tests/dynamic_plugins_tests.py .. [ 10%]
tests/integration_tests/email_tests.py ........... [ 11%]
tests/integration_tests/event_logger_tests.py ........ [ 11%]
tests/integration_tests/form_tests.py .. [ 11%]
tests/integration_tests/import_export_tests.py ss.............. [ 12%]
tests/integration_tests/log_api_tests.py ...... [ 13%]
tests/integration_tests/log_model_view_tests.py .. [ 13%]
tests/integration_tests/logging_configurator_tests.py . [ 13%]
tests/integration_tests/model_tests.py ....................... [ 14%]
tests/integration_tests/query_context_tests.py ......................... [ 15%]
... [ 16%]
tests/integration_tests/result_set_tests.py ............... [ 17%]
tests/integration_tests/security_tests.py .............................. [ 18%]
................................. [ 20%]
tests/integration_tests/sql_validator_tests.py ............ [ 21%]
tests/integration_tests/sqla_models_tests.py ........................... [ 22%]
. [ 22%]
tests/integration_tests/sqllab_tests.py ................................ [ 24%]
..... [ 25%]
tests/integration_tests/stats_logger_tests.py .. [ 25%]
tests/integration_tests/strategy_tests.py .. [ 25%]
tests/integration_tests/tagging_tests.py .. [ 25%]
tests/integration_tests/test_jinja_context.py ................... [ 26%]
tests/integration_tests/thumbnails_tests.py s........s...... [ 27%]
tests/integration_tests/utils_tests.py ................................. [ 29%]
.................. [ 30%]
tests/integration_tests/viz_tests.py ................................... [ 32%]
...................... [ 33%]
tests/integration_tests/advanced_data_type/api_tests.py ..... [ 34%]
tests/integration_tests/annotation_layers/api_tests.py ................. [ 34%]
................. [ 35%]
tests/integration_tests/async_events/api_tests.py ..... [ 36%]
tests/integration_tests/available_domains/api_tests.py . [ 36%]
tests/integration_tests/cachekeys/api_tests.py ..... [ 36%]
tests/integration_tests/charts/api_tests.py ............................ [ 38%]
............................ [ 39%]
. [ 94%]
tests/integration_tests/security/analytics_db_safety_tests.py .. [ 94%]
tests/integration_tests/security/api_tests.py ....... [ 95%]
tests/integration_tests/security/guest_token_security_tests.py ......... [ 95%]
............. [ 96%]
tests/integration_tests/security/migrate_roles_tests.py ......... [ 97%]
tests/integration_tests/security/row_level_security_tests.py ........... [ 97%]
... [ 97%]
tests/integration_tests/sql_lab/test_execute_sql_statements.py . [ 98%]
tests/integration_tests/tasks/async_queries_tests.py ...... [ 98%]
tests/integration_tests/users/api_tests.py ..... [ 98%]
tests/integration_tests/utils/cache_manager_tests.py .... [ 98%]
tests/integration_tests/utils/core_tests.py ... [ 99%]
tests/integration_tests/utils/csv_tests.py .. [ 99%]
tests/integration_tests/utils/decorators_tests.py .. [ 99%]
tests/integration_tests/utils/encrypt_tests.py .. [ 99%]
tests/integration_tests/utils/hashing_tests.py .... [ 99%]
tests/integration_tests/utils/machine_auth_tests.py ... [ 99%]
tests/integration_tests/utils/public_interfaces_test.py s.. [100%]

vs before this PR (2252 items; note that unit tests are 520 tests, which is precisely the difference):

============================= test session starts ============================== platform linux -- Python 3.8.13, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 rootdir: /home/runner/work/superset/superset, configfile: pytest.ini, testpaths: tests plugins: pyfakefs-4.5.6, cov-2.12.1, mock-3.6.1 collected 2250 items

tests/example_data/data_generator/tests/test_string_generator.py . [ 0%]
tests/integration_tests/access_tests.py ..................... [ 0%]
tests/integration_tests/base_api_tests.py ...... [ 1%]
tests/integration_tests/cache_tests.py .. [ 1%]
tests/integration_tests/celery_tests.py ................... [ 2%]
tests/integration_tests/cli_tests.py ............. [ 2%]
tests/integration_tests/commands_test.py .... [ 2%]
tests/integration_tests/core_tests.py .................................. [ 4%]
.................................. [ 5%]
tests/integration_tests/dashboard_tests.py .................. [ 6%]
tests/integration_tests/datasource_tests.py ....................... [ 7%]
tests/integration_tests/dict_import_export_tests.py ....... [ 8%]
tests/integration_tests/dynamic_plugins_tests.py .. [ 8%]
tests/integration_tests/email_tests.py ........... [ 8%]
tests/integration_tests/event_logger_tests.py ........ [ 9%]
tests/integration_tests/form_tests.py .. [ 9%]
tests/integration_tests/import_export_tests.py ss.............. [ 9%]
tests/integration_tests/log_api_tests.py ...... [ 10%]
tests/integration_tests/log_model_view_tests.py .. [ 10%]
tests/integration_tests/logging_configurator_tests.py . [ 10%]
tests/integration_tests/model_tests.py ....................... [ 11%]
tests/integration_tests/query_context_tests.py ......................... [ 12%]
... [ 12%]
tests/integration_tests/result_set_tests.py ............... [ 13%]
tests/integration_tests/security_tests.py .............................. [ 14%]
................................. [ 15%]
tests/integration_tests/sql_validator_tests.py ............ [ 16%]
tests/integration_tests/sqla_models_tests.py ........................... [ 17%]
. [ 17%]
tests/integration_tests/sqllab_tests.py ................................ [ 19%]
..... [ 19%]
tests/integration_tests/stats_logger_tests.py .. [ 19%]
tests/integration_tests/strategy_tests.py .. [ 19%]
tests/integration_tests/tagging_tests.py .. [ 19%]
tests/integration_tests/test_jinja_context.py ................... [ 20%]
tests/integration_tests/thumbnails_tests.py s........s...... [ 21%]
tests/integration_tests/utils_tests.py ................................. [ 22%]
.................. [ 23%]
tests/integration_tests/viz_tests.py ................................... [ 25%]
...................... [ 26%]
tests/integration_tests/advanced_data_type/api_tests.py ..... [ 26%]
tests/integration_tests/annotation_layers/api_tests.py ................. [ 26%]
................. [ 27%]
tests/integration_tests/async_events/api_tests.py ..... [ 27%]
tests/integration_tests/available_domains/api_tests.py . [ 28%]
tests/integration_tests/cachekeys/api_tests.py ..... [ 28%]
tests/integration_tests/charts/api_tests.py ............................ [ 29%]
............................ [ 30%]
tests/integration_tests/charts/commands_tests.py ............ [ 31%]
tests/integration_tests/charts/schema_tests.py ... [ 31%]
tests/integration_tests/charts/data/api_tests.py .......ss.............. [ 32%]
...................... [ 33%]
tests/integration_tests/css_templates/api_tests.py ................ [ 34%]
tests/integration_tests/dashboards/api_tests.py ........................ [ 35%]
................................................. [ 37%]
tests/integration_tests/dashboards/commands_tests.py .......... [ 37%]
tests/integration_tests/dashboards/dao_tests.py .. [ 37%]
tests/integration_tests/dashboards/filter_sets/create_api_tests.py ..... [ 38%]
....................... [ 39%]
tests/integration_tests/dashboards/filter_sets/delete_api_tests.py ..... [ 39%]
..... [ 39%]
tests/integration_tests/dashboards/filter_sets/get_api_tests.py ...... [ 39%]
tests/integration_tests/dashboards/filter_sets/update_api_tests.py ..... [ 40%]
.................. [ 40%]
tests/integration_tests/dashboards/filter_state/api_tests.py ........... [ 41%]
........... [ 41%]
tests/integration_tests/dashboards/permalink/api_tests.py .... [ 42%]
tests/integration_tests/dashboards/security/security_dataset_tests.py .. [ 42%]
..... [ 42%]
tests/integration_tests/dashboards/security/security_rbac_tests.py ..... [ 42%]
......... [ 42%]
tests/integration_tests/databases/api_tests.py ......................... [ 44%]
....................................................... [ 46%]
tests/integration_tests/databases/commands_tests.py ..s................. [ 47%]
... [ 47%]
tests/integration_tests/datasets/api_tests.py .........s................ [ 48%]
........s..............s......................... [ 50%]
tests/integration_tests/datasets/commands_tests.py ........... [ 51%]
tests/integration_tests/datasets/model_tests.py ... [ 51%]
tests/integration_tests/db_engine_specs/ascend_tests.py . [ 51%]
tests/integration_tests/db_engine_specs/base_engine_spec_tests.py ...... [ 51%]
......................... [ 52%]
tests/integration_tests/db_engine_specs/bigquery_tests.py .......... [ 53%]
tests/integration_tests/db_engine_specs/clickhouse_tests.py .. [ 53%]
tests/integration_tests/db_engine_specs/crate_tests.py .... [ 53%]
tests/integration_tests/db_engine_specs/dremio_tests.py . [ 53%]
tests/integration_tests/db_engine_specs/drill_tests.py . [ 53%]
tests/integration_tests/db_engine_specs/druid_tests.py .... [ 53%]
tests/integration_tests/db_engine_specs/elasticsearch_tests.py ...... [ 54%]
tests/integration_tests/db_engine_specs/firebird_tests.py ........ [ 54%]
tests/integration_tests/db_engine_specs/firebolt_tests.py .. [ 54%]
tests/integration_tests/db_engine_specs/gsheets_tests.py . [ 54%]
tests/integration_tests/db_engine_specs/hana_tests.py . [ 54%]
tests/integration_tests/db_engine_specs/hive_tests.py .................. [ 55%]
........... [ 55%]
tests/integration_tests/db_engine_specs/impala_tests.py . [ 56%]
tests/integration_tests/db_engine_specs/kylin_tests.py . [ 56%]
tests/integration_tests/db_engine_specs/mysql_tests.py ......... [ 56%]
tests/integration_tests/db_engine_specs/oracle_tests.py .......... [ 56%]
tests/integration_tests/db_engine_specs/pinot_tests.py ...... [ 57%]
tests/integration_tests/db_engine_specs/postgres_tests.py .............. [ 57%]
....... [ 58%]
tests/integration_tests/db_engine_specs/presto_tests.py ................ [ 58%]
........................... [ 60%]
tests/integration_tests/db_engine_specs/redshift_tests.py . [ 60%]
tests/integration_tests/db_engine_specs/trino_tests.py ........ [ 60%]
tests/integration_tests/embedded/api_tests.py .. [ 60%]
tests/integration_tests/embedded/dao_tests.py .. [ 60%]
tests/integration_tests/explore/api_tests.py ......... [ 60%]
tests/integration_tests/explore/form_data/api_tests.py ................. [ 61%]
........ [ 62%]
tests/integration_tests/explore/form_data/commands_tests.py ........ [ 62%]
tests/integration_tests/explore/permalink/api_tests.py ..... [ 62%]
tests/integration_tests/explore/permalink/commands_tests.py ... [ 62%]
tests/integration_tests/extensions/metastore_cache_test.py .. [ 62%]
tests/integration_tests/importexport/commands_tests.py . [ 62%]
tests/integration_tests/key_value/commands/create_test.py .. [ 63%]
tests/integration_tests/key_value/commands/delete_test.py ... [ 63%]
tests/integration_tests/key_value/commands/get_test.py ..... [ 63%]
tests/integration_tests/key_value/commands/update_test.py ... [ 63%]
tests/integration_tests/key_value/commands/upsert_test.py ... [ 63%]
tests/integration_tests/migrations/06e1e70058c7_migrate_legacy_area__tests.py . [ 63%]
[ 63%]
tests/integration_tests/migrations/ad07e4fdbaba_rm_time_range_endpoints_from_qc_3__test.py . [ 63%]
. [ 63%]
tests/integration_tests/migrations/c747c78868b6_migrating_legacy_treemap__tests.py . [ 63%]
[ 63%]
tests/integration_tests/migrations/f1410ed7ec95_migrate_native_filters_to_new_schema__tests.py . [ 63%]
. [ 63%]
tests/integration_tests/migrations/fb13d49b72f9_better_filters__tests.py . [ 63%]
[ 63%]
tests/integration_tests/migrations/fc3a3a8ff221_migrate_filter_sets_to_new_format__tests.py . [ 64%]
.. [ 64%]
tests/integration_tests/queries/api_tests.py .......... [ 64%]
tests/integration_tests/queries/saved_queries/api_tests.py ............. [ 65%]
................... [ 65%]
tests/integration_tests/queries/saved_queries/commands_tests.py ........ [ 66%]
[ 66%]
tests/integration_tests/reports/alert_tests.py .... [ 66%]
tests/integration_tests/reports/api_tests.py ........................... [ 67%]
............. [ 68%]
tests/integration_tests/reports/commands_tests.py ...................... [ 69%]
........................................................................ [ 72%]
.. [ 72%]
tests/integration_tests/reports/scheduler_tests.py ..... [ 72%]
tests/integration_tests/reports/commands/create_dashboard_report_tests.py . [ 72%]
. [ 72%]
tests/integration_tests/reports/commands/execute_dashboard_report_tests.py . [ 72%]
. [ 72%]
tests/integration_tests/security/analytics_db_safety_tests.py .. [ 73%]
tests/integration_tests/security/api_tests.py ....... [ 73%]
tests/integration_tests/security/guest_token_security_tests.py ......... [ 73%]
............. [ 74%]
tests/integration_tests/security/migrate_roles_tests.py ......... [ 74%]
tests/integration_tests/security/row_level_security_tests.py ........... [ 75%]
... [ 75%]
tests/integration_tests/sql_lab/test_execute_sql_statements.py . [ 75%]
tests/integration_tests/tasks/async_queries_tests.py ...... [ 75%]
tests/integration_tests/users/api_tests.py ..... [ 75%]
tests/integration_tests/utils/cache_manager_tests.py .... [ 76%]
tests/integration_tests/utils/core_tests.py ... [ 76%]
tests/integration_tests/utils/csv_tests.py .. [ 76%]
tests/integration_tests/utils/decorators_tests.py .. [ 76%]
tests/integration_tests/utils/encrypt_tests.py .. [ 76%]
tests/integration_tests/utils/hashing_tests.py .... [ 76%]
tests/integration_tests/utils/machine_auth_tests.py ... [ 76%]
tests/integration_tests/utils/public_interfaces_test.py s.. [ 76%]
tests/unit_tests/config_test.py ...... [ 77%]
tests/unit_tests/core_tests.py ............. [ 77%]
tests/unit_tests/dataframe_test.py .... [ 77%]
tests/unit_tests/extension_tests.py .. [ 78%]
tests/unit_tests/feature_flag_test.py ... [ 78%]
tests/unit_tests/jinja_context_test.py .. [ 78%]
tests/unit_tests/memoized_tests.py ... [ 78%]
tests/unit_tests/result_set_test.py . [ 78%]
tests/unit_tests/sql_lab_test.py ... [ 78%]
tests/unit_tests/sql_parse_tests.py ............s....................... [ 80%]
....................................................... [ 82%]
tests/unit_tests/test_jinja_context.py ................... [ 83%]
tests/unit_tests/advanced_data_type/types_tests.py ..................... [ 84%]
..... [ 84%]
tests/unit_tests/annotation_layers/schema_tests.py .................... [ 85%]
tests/unit_tests/charts/test_post_processing.py ................. [ 86%]
tests/unit_tests/charts/commands/importers/v1/import_test.py .. [ 86%]
tests/unit_tests/charts/dao/dao_tests.py .. [ 86%]
tests/unit_tests/columns/test_models.py . [ 86%]
tests/unit_tests/commands/export_test.py . [ 86%]
tests/unit_tests/common/test_dataframe_utils.py . [ 86%]
tests/unit_tests/common/test_query_object_factory.py ... [ 86%]
tests/unit_tests/dao/queries_test.py . [ 86%]
tests/unit_tests/dashboards/commands/importers/v1/import_test.py .. [ 86%]
tests/unit_tests/dashboards/commands/importers/v1/utils_test.py .. [ 86%]
tests/unit_tests/databases/api_test.py ..s [ 87%]
tests/unit_tests/databases/schema_tests.py ..... [ 87%]
tests/unit_tests/databases/utils_test.py .. [ 87%]
tests/unit_tests/databases/commands/importers/v1/import_test.py .. [ 87%]
tests/unit_tests/datasets/test_models.py ............. [ 88%]
tests/unit_tests/datasets/commands/export_test.py . [ 88%]
tests/unit_tests/datasets/commands/importers/v1/import_test.py .... [ 88%]
tests/unit_tests/datasets/dao/dao_tests.py .. [ 88%]
tests/unit_tests/datasource/dao_tests.py ........ [ 88%]
tests/unit_tests/db_engine_specs/test_athena.py ... [ 88%]
tests/unit_tests/db_engine_specs/test_base.py ...... [ 89%]
tests/unit_tests/db_engine_specs/test_bigquery.py .... [ 89%]
tests/unit_tests/db_engine_specs/test_drill.py .... [ 89%]
tests/unit_tests/db_engine_specs/test_gsheets.py .... [ 89%]
tests/unit_tests/db_engine_specs/test_kusto.py ...................... [ 90%]
tests/unit_tests/db_engine_specs/test_mssql.py ......................... [ 91%]
...... [ 91%]
tests/unit_tests/db_engine_specs/test_presto.py ..... [ 92%]
tests/unit_tests/db_engine_specs/test_snowflake.py ........ [ 92%]
tests/unit_tests/db_engine_specs/test_sqlite.py ........................ [ 93%]
..... [ 93%]
tests/unit_tests/db_engine_specs/test_teradata.py ....... [ 94%]
tests/unit_tests/db_engine_specs/test_trino.py .. [ 94%]
tests/unit_tests/explore/api_test.py . [ 94%]
tests/unit_tests/explore/utils_test.py .............. [ 94%]
tests/unit_tests/importexport/api_test.py ...... [ 95%]
tests/unit_tests/key_value/utils_test.py .... [ 95%]
tests/unit_tests/models/core_test.py .. [ 95%]
tests/unit_tests/notifications/email_tests.py . [ 95%]
tests/unit_tests/pandas_postprocessing/test_aggregate.py . [ 95%]
tests/unit_tests/pandas_postprocessing/test_boxplot.py ..... [ 95%]
tests/unit_tests/pandas_postprocessing/test_compare.py ...... [ 96%]
tests/unit_tests/pandas_postprocessing/test_contribution.py . [ 96%]
tests/unit_tests/pandas_postprocessing/test_cum.py .... [ 96%]
tests/unit_tests/pandas_postprocessing/test_diff.py . [ 96%]
tests/unit_tests/pandas_postprocessing/test_flatten.py ........ [ 96%]
tests/unit_tests/pandas_postprocessing/test_geography.py ... [ 96%]
tests/unit_tests/pandas_postprocessing/test_pivot.py ....... [ 97%]
tests/unit_tests/pandas_postprocessing/test_prophet.py ss..... [ 97%]
tests/unit_tests/pandas_postprocessing/test_rename.py ......... [ 97%]
tests/unit_tests/pandas_postprocessing/test_resample.py ...... [ 98%]
tests/unit_tests/pandas_postprocessing/test_rolling.py ..... [ 98%]
tests/unit_tests/pandas_postprocessing/test_select.py . [ 98%]
tests/unit_tests/pandas_postprocessing/test_sort.py . [ 98%]
tests/unit_tests/pandas_postprocessing/test_utils.py . [ 98%]
tests/unit_tests/tables/test_models.py . [ 98%]
tests/unit_tests/tasks/test_cron_util.py ......................... [ 99%]
tests/unit_tests/utils/cache_test.py . [ 99%]
tests/unit_tests/utils/date_parser_tests.py ....... [ 99%]
tests/unit_tests/utils/urls_tests.py .. [100%]

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • 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

@villebro villebro force-pushed the villebro/data-cache-config branch 2 times, most recently from 3cd5a1a to 1c43b47 Compare September 12, 2022 20:20
@codecov
Copy link

codecov bot commented Sep 12, 2022

Codecov Report

Merging #21441 (0637a16) into master (9c285da) will decrease coverage by 1.33%.
The diff coverage is 100.00%.

❗ Current head 0637a16 differs from pull request most recent head 9511f9c. Consider uploading reports for the commit 9511f9c to get more accurate results

@@            Coverage Diff             @@
##           master   #21441      +/-   ##
==========================================
- Coverage   66.53%   65.20%   -1.34%     
==========================================
  Files        1791     1791              
  Lines       68599    68602       +3     
  Branches     7320     7320              
==========================================
- Hits        45645    44731     -914     
- Misses      21064    21981     +917     
  Partials     1890     1890              
Flag Coverage Δ
hive 52.93% <100.00%> (+<0.01%) ⬆️
mysql 78.07% <100.00%> (-2.71%) ⬇️
postgres 78.14% <100.00%> (-2.69%) ⬇️
presto ?
python 78.49% <100.00%> (-2.77%) ⬇️
sqlite 76.63% <100.00%> (?)
unit ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset/charts/schemas.py 99.35% <100.00%> (+<0.01%) ⬆️
superset/common/query_context_processor.py 88.79% <100.00%> (+0.09%) ⬆️
superset/tables/schemas.py 0.00% <0.00%> (-100.00%) ⬇️
superset/columns/schemas.py 0.00% <0.00%> (-100.00%) ⬇️
...set/advanced_data_type/plugins/internet_address.py 16.32% <0.00%> (-79.60%) ⬇️
superset/utils/pandas_postprocessing/boxplot.py 20.51% <0.00%> (-79.49%) ⬇️
superset/charts/post_processing.py 11.76% <0.00%> (-77.95%) ⬇️
...perset/advanced_data_type/plugins/internet_port.py 18.75% <0.00%> (-77.09%) ⬇️
superset/utils/pandas_postprocessing/rolling.py 21.87% <0.00%> (-68.75%) ⬇️
...perset/utils/pandas_postprocessing/contribution.py 34.61% <0.00%> (-65.39%) ⬇️
... and 55 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the comprehensive tests.

tests/integration_tests/charts/data/api_tests.py Outdated Show resolved Hide resolved
tests/integration_tests/charts/data/api_tests.py Outdated Show resolved Hide resolved
@@ -32,4 +32,4 @@ superset init

echo "Running tests"

pytest --durations-min=2 --maxfail=1 --cov-report= --cov=superset "$@"
pytest --durations-min=2 --maxfail=1 --cov-report= --cov=superset ./tests/integration_tests "$@"
Copy link
Member

Choose a reason for hiding this comment

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

assuming we were running unittests twice

@villebro villebro merged commit 05b97ff into apache:master Sep 13, 2022
@mayurnewase
Copy link
Contributor

mayurnewase commented Sep 29, 2022

hi @villebro have 1 question.

is this still in development to use custom_cache_timeout in charts/data api?

recently I have seen a problem its not respecting cache timeout setup in chart properties (I created ticket #21635 )

so to fix it, should we send chart's timeout from frontend inside form_data to chart.data api in custom_cache_timeout or pass full slice to QueryContext and check timeouts in query_context.get_cache_timeout() function in order custom_cache_timeout > chart_cache_timeout > datasource_cache_timeout > database_cache_timeout

@villebro villebro deleted the villebro/data-cache-config branch September 29, 2022 05:51
@mistercrunch mistercrunch added 🍒 2.0.1 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M v2.0 v2.0.1 🍒 2.0.1 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants