mage-ai 0.9.75__py3-none-any.whl → 0.9.77__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mage-ai might be problematic. Click here for more details.
- mage_ai/api/policies/PipelineSchedulePolicy.py +1 -0
- mage_ai/api/presenters/PipelineSchedulePresenter.py +11 -2
- mage_ai/api/resources/GitFileResource.py +8 -0
- mage_ai/api/resources/PipelineScheduleResource.py +11 -3
- mage_ai/api/resources/PipelineTriggerResource.py +3 -1
- mage_ai/api/resources/SessionResource.py +2 -2
- mage_ai/api/resources/SyncResource.py +1 -1
- mage_ai/api/resources/UserResource.py +1 -1
- mage_ai/cli/main.py +6 -1
- mage_ai/data_integrations/destinations/constants.py +2 -0
- mage_ai/data_integrations/sources/constants.py +2 -0
- mage_ai/data_preparation/executors/block_executor.py +8 -3
- mage_ai/data_preparation/executors/pipeline_executor.py +35 -19
- mage_ai/data_preparation/models/block/__init__.py +29 -23
- mage_ai/data_preparation/models/block/dbt/dbt_adapter.py +20 -8
- mage_ai/data_preparation/models/block/dynamic/constants.py +0 -1
- mage_ai/data_preparation/models/block/dynamic/counter.py +1 -3
- mage_ai/data_preparation/models/block/outputs.py +1 -1
- mage_ai/data_preparation/models/block/r/__init__.py +16 -5
- mage_ai/data_preparation/models/block/sql/__init__.py +2 -0
- mage_ai/data_preparation/models/block/sql/mssql.py +8 -0
- mage_ai/data_preparation/models/block/sql/utils/shared.py +6 -2
- mage_ai/data_preparation/models/constants.py +3 -0
- mage_ai/data_preparation/models/pipeline.py +1 -1
- mage_ai/data_preparation/storage/local_storage.py +4 -1
- mage_ai/data_preparation/templates/constants.py +7 -0
- mage_ai/data_preparation/templates/data_loaders/airtable.py +28 -0
- mage_ai/data_preparation/templates/repo/io_config.yaml +2 -0
- mage_ai/io/airtable.py +104 -0
- mage_ai/io/base.py +1 -0
- mage_ai/io/bigquery.py +36 -0
- mage_ai/io/config.py +6 -0
- mage_ai/io/mssql.py +21 -9
- mage_ai/io/mysql.py +6 -1
- mage_ai/io/postgres.py +3 -0
- mage_ai/io/redshift.py +13 -0
- mage_ai/io/sql.py +1 -0
- mage_ai/orchestration/db/__init__.py +20 -0
- mage_ai/orchestration/db/migrations/versions/39d36f1dab73_create_genericjob.py +47 -0
- mage_ai/orchestration/db/models/oauth.py +2 -1
- mage_ai/orchestration/db/models/schedules.py +107 -5
- mage_ai/orchestration/db/models/secrets.py +11 -1
- mage_ai/orchestration/job_manager.py +19 -0
- mage_ai/orchestration/metrics/pipeline_run.py +1 -1
- mage_ai/orchestration/notification/sender.py +2 -2
- mage_ai/orchestration/pipeline_scheduler_original.py +150 -6
- mage_ai/orchestration/pipeline_scheduler_project_platform.py +4 -5
- mage_ai/orchestration/queue/config.py +11 -1
- mage_ai/orchestration/queue/process_queue.py +2 -0
- mage_ai/orchestration/utils/distributed_lock.py +8 -1
- mage_ai/server/api/base.py +41 -0
- mage_ai/server/api/constants.py +1 -0
- mage_ai/server/api/triggers.py +9 -0
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/frontend_dist/_next/static/chunks/449-5e2253c6aba42557.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-782dd4a6b13e1c42.js +2 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-5db54821a3059c69.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-f65416f6dbe30ad3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-03d9bca3bc5e6088.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-d25d07db166cbb04.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-fa61dc6c1370e6a5.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{webpack-0bc44da590c7cf85.js → webpack-b9a067f3bd0a3a05.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/{38-PtskJFUTYUpRhT1qF_ → qR0jauUABqPaFMjUsYeoG}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist/block-layout.html +2 -2
- mage_ai/server/frontend_dist/compute.html +2 -2
- mage_ai/server/frontend_dist/files.html +2 -2
- mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
- mage_ai/server/frontend_dist/global-data-products.html +2 -2
- mage_ai/server/frontend_dist/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist/global-hooks.html +2 -2
- mage_ai/server/frontend_dist/index.html +2 -2
- mage_ai/server/frontend_dist/manage/files.html +2 -2
- mage_ai/server/frontend_dist/manage/overview.html +2 -2
- mage_ai/server/frontend_dist/manage/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist/manage/settings.html +2 -2
- mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist/manage/users.html +2 -2
- mage_ai/server/frontend_dist/manage.html +2 -2
- mage_ai/server/frontend_dist/oauth.html +3 -3
- mage_ai/server/frontend_dist/overview.html +2 -2
- mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist/pipelines.html +2 -2
- mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist/platform/global-hooks.html +2 -2
- mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist/settings/platform/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/platform/settings.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/permissions.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/roles.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist/settings.html +2 -2
- mage_ai/server/frontend_dist/sign-in.html +5 -5
- mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
- mage_ai/server/frontend_dist/templates.html +2 -2
- mage_ai/server/frontend_dist/terminal.html +2 -2
- mage_ai/server/frontend_dist/test.html +2 -2
- mage_ai/server/frontend_dist/triggers.html +2 -2
- mage_ai/server/frontend_dist/v2/canvas.html +2 -2
- mage_ai/server/frontend_dist/v2.html +2 -2
- mage_ai/server/frontend_dist/version-control.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/449-5e2253c6aba42557.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-ee5e328aaf51c698.js +2 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-5db54821a3059c69.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-f65416f6dbe30ad3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-03d9bca3bc5e6088.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-d25d07db166cbb04.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users-fa61dc6c1370e6a5.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{webpack-12ad70eb5c31aa92.js → webpack-5f4be622608d9267.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/{dxnSzgIvSG4Ke5LM-tPQX → iCySon3_GCldnbC5U7C-s}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/compute.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/files.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-hooks.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/files.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/overview.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/oauth.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/overview.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/sign-in.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/templates.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/terminal.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/test.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/triggers.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/v2/canvas.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/v2.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/version-control.html +2 -2
- mage_ai/server/scheduler_manager.py +2 -0
- mage_ai/server/terminal_server.py +3 -0
- mage_ai/settings/server.py +4 -0
- mage_ai/streaming/sources/kafka.py +2 -1
- mage_ai/tests/data_preparation/executors/test_block_executor.py +3 -3
- mage_ai/tests/data_preparation/models/block/dynamic/test_counter.py +1 -3
- mage_ai/tests/data_preparation/models/test_variable.py +2 -0
- mage_ai/tests/io/create_table/test_postgresql.py +3 -2
- mage_ai/tests/orchestration/notification/test_sender.py +5 -1
- mage_ai/tests/streaming/sources/test_kafka.py +2 -2
- mage_ai/usage_statistics/logger.py +99 -15
- mage_ai-0.9.77.dist-info/METADATA +356 -0
- {mage_ai-0.9.75.dist-info → mage_ai-0.9.77.dist-info}/RECORD +211 -208
- {mage_ai-0.9.75.dist-info → mage_ai-0.9.77.dist-info}/WHEEL +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/449-f689774546860ca4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-13bf3b7dcef50c29.js +0 -2
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-b99379d0aa6a8c25.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-e51cd04bd4d1fffe.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-0abf8a1b7243f93b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-38187954b6ec4b40.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-3ee783f5139c76a1.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/449-f689774546860ca4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-0392ef723ea2c6f8.js +0 -2
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-b99379d0aa6a8c25.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-e51cd04bd4d1fffe.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-0abf8a1b7243f93b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-38187954b6ec4b40.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users-3ee783f5139c76a1.js +0 -1
- mage_ai-0.9.75.dist-info/METADATA +0 -377
- /mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-13bf3b7dcef50c29.js.LICENSE.txt → _app-782dd4a6b13e1c42.js.LICENSE.txt} +0 -0
- /mage_ai/server/frontend_dist/_next/static/{38-PtskJFUTYUpRhT1qF_ → qR0jauUABqPaFMjUsYeoG}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{_app-0392ef723ea2c6f8.js.LICENSE.txt → _app-ee5e328aaf51c698.js.LICENSE.txt} +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{dxnSzgIvSG4Ke5LM-tPQX → iCySon3_GCldnbC5U7C-s}/_ssgManifest.js +0 -0
- {mage_ai-0.9.75.dist-info → mage_ai-0.9.77.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.75.dist-info → mage_ai-0.9.77.dist-info/licenses}/LICENSE +0 -0
- {mage_ai-0.9.75.dist-info → mage_ai-0.9.77.dist-info}/top_level.txt +0 -0
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
})();
|
|
30
|
-
</script><link rel="preload" href="/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_/_next/static/css/18782af6d2c4e826.css" as="style"/><link rel="stylesheet" href="/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_/_next/static/css/18782af6d2c4e826.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_/_next/static/chunks/webpack-
|
|
30
|
+
</script><link rel="preload" href="/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_/_next/static/css/18782af6d2c4e826.css" as="style"/><link rel="stylesheet" href="/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_/_next/static/css/18782af6d2c4e826.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_/_next/static/chunks/webpack-5f4be622608d9267.js" defer=""></script><script src="/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_/_next/static/chunks/framework-ea07653270784974.js" defer=""></script><script src="/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_/_next/static/chunks/main-342bedfde9cd81cf.js" defer=""></script><script src="/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_/_next/static/chunks/pages/_app-ee5e328aaf51c698.js" defer=""></script><script src="/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_/_next/static/chunks/449-5e2253c6aba42557.js" defer=""></script><script src="/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_/_next/static/chunks/pages/version-control-573f0225d7a703ed.js" defer=""></script><script src="/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_/_next/static/iCySon3_GCldnbC5U7C-s/_buildManifest.js" defer=""></script><script src="/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_/_next/static/iCySon3_GCldnbC5U7C-s/_ssgManifest.js" defer=""></script><style data-styled="" data-styled-version="5.3.11">html{-webkit-box-sizing:border-box;box-sizing:border-box;-ms-overflow-style:scrollbar;}/*!sc*/
|
|
31
31
|
*,*::before,*::after{-webkit-box-sizing:inherit;box-sizing:inherit;}/*!sc*/
|
|
32
32
|
data-styled.g4[id="sc-global-czSCUT1"]{content:"sc-global-czSCUT1,"}/*!sc*/
|
|
33
33
|
.esCWvc{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}/*!sc*/
|
|
@@ -50,4 +50,4 @@ data-styled.g242[id="indexstyle__VerticalNavigationStyleComponent-sc-ecogjt-1"]{
|
|
|
50
50
|
.dionUf .Toastify__toast--success{background:#00A81A !important;color:#FFFFFF !important;}/*!sc*/
|
|
51
51
|
.dionUf .Toastify__toast--warning{background:#DD9900 !important;color:#FFFFFF !important;}/*!sc*/
|
|
52
52
|
data-styled.g279[id="ToastWrapper-sc-1a33ph1-0"]{content:"dionUf,"}/*!sc*/
|
|
53
|
-
</style></head><body><div id="__next"><div class="" style="position:fixed;top:0;left:0;height:2px;background:transparent;z-index:99999999999;width:100%"><div class="" style="height:100%;background:#FF144D;transition:all 500ms ease;width:0%"><div style="box-shadow:0 0 10px #FF144D, 0 0 10px #FF144D;width:5%;opacity:1;position:absolute;height:100%;transition:all 500ms ease;transform:rotate(3deg) translate(0px, -4px);left:-10rem"></div></div></div><div class="indexstyle__HeaderStyle-sc-1bk8irg-0 bVoYMS"></div><div class="indexstyle__ContainerStyle-sc-ecogjt-0 jrjFfx"><div class="indexstyle__VerticalNavigationStyleComponent-sc-ecogjt-1 drmgmw"><div class="Spacing__SpacingStyle-sc-1mpmtgj-0 kgseVY"></div></div><div class="Flex-sc-sgfnl9-0 esCWvc"></div></div><div id="command-center-root"></div><div></div><div></div><div></div><div class="ToastWrapper-sc-1a33ph1-0 dionUf"><div class="Toastify"></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"auth":{"decodedToken":{"expires":0,"token":null}}},"currentTheme":{"accent":{"alert":"#F6540B","blue":"#4877FF","blueLight":"rgba(72, 119, 255, 0.5)","contentDefaultTransparent":"rgba(174, 174, 174, 0.5)","cyan":"#65E3FF","cyanLight":"rgba(101, 227, 255, 0.3)","cyanTransparent":"rgba(101, 227, 255, 0.12)","dbt":"#fc6949","dbtDark":"rgba(252, 105, 73, 0.3)","dbtLight":"rgba(252, 105, 73, 0.5)","info":"#00ABFF","infoTransparent":"rgba(0, 171, 255, 0.5)","negative":"#FF1E59","negativeTransparent":"rgba(255, 30, 89, 0.3)","pink":"#FF4FF8","pinkLight":"rgb(255, 79, 248, 0.5)","positive":"#00A81A","primaryTransparent":"rgba(155, 108, 167, 0.5)","purple":"#7D55EC","purpleLight":"rgba(125, 85, 236, 0.5)","rose":"#D1A2AB","roseLight":"rgba(209, 162, 171, 0.5)","sky":"#6AA1E0","skyLight":"rgba(106, 161, 224, 0.5)","teal":"#00B4CC","tealLight":"rgba(0, 180, 204, 0.5)","warning":"#DD9900","warningTransparent":"rgba(221, 153, 0, 0.5)","yellow":"#FFCC19","yellowLight":"rgba(255, 204, 25, 0.5)"},"background":{"blackTransparent":"rgba(0, 0, 0, 0.6)","blackTransparentDark":"rgba(0, 0, 0, 0.8)","chartBlock":"#2E3036","codeArea":"#1E1F24","codeTextarea":"#000000","content":"#1B1C20","danger":"#FFD0DB","dark":"#B1B8C3","dashboard":"#18181C","dashboardTransparent":"rgba(24, 24, 28, 0.1)","header":"#1B1B1B","menu":"#0F4CFF","muted":"#F9FAFC","navigation":"#EDEDED","output":"#2E3036","page":"#1E1F24","panel":"#232429","panelTransparent":"rgba(35, 36, 41, 0.7)","popup":"#27292E","row":"#2C2C2C","row2":"#51535C","scrollbarThumb":"rgba(100, 100, 100, 0.5)","scrollbarThumbHover":"rgba(255, 255, 255, 0.3)","scrollbarTrack":"#2E3036","success":"#8ADE00","successLight":"rgb(138, 222, 0, 0.3)","table":"#292A2F","tag":"#3A4550"},"borders":{"button":"#454850","contrast":"#FFFFFF","danger":"#FF144D","dark":"#000000","darkLight":"#2E3036","info":"#FFCC19","light":"#2F3034","medium":"#1C1C1C","medium2":"#141414","success":"#2FCB52"},"brand":{"earth100":"#C6EEDB","earth200":"#9DDFBF","earth300":"#6BBF96","earth400":"#37A46F","earth400Transparent":"rgba(55, 164, 111, 0.4)","earth500":"#00954C","energy100":"#FFF4BA","energy200":"#FFED92","energy300":"#FFE662","energy400":"#FFDA19","energy400Transparent":"rgba(255, 218, 25, 0.04)","energy500":"#F6C000","fire100":"#FFD7E0","fire200":"#FFA3B9","fire300":"#FF547D","fire400":"#FF144D","fire400Transparent":"rgba(255, 20, 77, 0.4)","fire500":"#EB0032","stone100":"#F3E6D7","stone200":"#E3D4C2","stone400":"#BFA78B","stone500":"#AF8859","water100":"#BDCEFF","water200":"#81A1FF","water300":"#517DFF","water400":"#2A60FE","water400Transparent":"rgba(42, 96, 254, 0.4)","water500":"#0F4CFF","wind100":"#EEEAFF","wind200":"#CCC1F4","wind300":"#A698DD","wind400":"#6B50D7","wind400SuperTransparent":"rgba(107, 80, 215, 0.12)","wind400Transparent":"rgba(107, 80, 215, 0.4)","wind500":"#4E32BC"},"chart":{"backgroundPrimary":"#7D55EC","backgroundSecondary":"#FF144D","backgroundTertiary":"#86E2FF","button1":"#4877FF","button2":"#FFCC19","button3":"#8ADE00","button4":"#FF4FF8","button5":"#B98D95","lines":"#9B6CA7","primary":"#6B50D7","secondary":"#FF144D","tertiary":"#2A60FE"},"content":{"active":"#FFFFFF","default":"#AEAEAE","disabled":"rgba(255, 255, 255, 0.3)","inverted":"#2C2C2C","muted":"#787A85"},"elevation":{"visualizationAccent":"#996CFF","visualizationAccentAlt":"#C1ACF7"},"feature":{"active":"rgba(250, 248, 254, 0.14)","disabled":"rgba(201, 206, 218, 0.12)"},"icons":{"neutral":"#787878"},"interactive":{"activeBorder":"#060606","blackBackgroundTransparent":"rgba(0, 0, 0, 0.5)","checked":"#060606","dangerBorder":"#FF144D","defaultBackground":"#36383F","defaultBackgroundTransparent":"rgba(54, 56, 63, 0.5)","defaultBorder":"#ffffff1a","disabledBorder":"#B1B8C3","focusBackground":"#B1B8C3","focusBorder":"#86E2FF","hoverBackground":"#4E4E4E","hoverBackgroundTransparent":"rgba(78, 78, 78, 0.5)","hoverBlackBackgroundTransparent":"rgba(0, 0, 0, 0.7)","hoverBorder":"#B9BFCA","hoverOverlay":"rgba(255, 255, 255, 0.1)","linkPrimary":"#1752FF","linkPrimaryHover":"#4877FF","linkPrimaryLight":"#5982ff","linkSecondary":"#6B50D7","linkSecondaryDisabled":"#C4B9EF","linkText":"#6AA1E0","linkTextLight":"#9ECBFF","purple":"#885EFF","rowHoverBackground":"rgba(0, 0, 0, 0.1)","transparent":"rgba(255, 255, 255, 0)"},"loader":{"color":"#EB0032","colorInverted":"#8ADE00"},"logo":{"color":"#FFFFFF"},"monotone":{"black":"#060606","blackTransparent":"rgba(0, 0, 0, 0.6)","gray":"#B1B8C3","grey100":"#F2F2F2","grey200":"#D5D7DC","grey300":"#B4B8C0","grey400":"#70747C","grey500":"#51535C","purple":"#6B50D7","white":"#FFFFFF","whiteTransparent":"rgba(255, 255, 255, 0.6)"},"neutral":{"n100":"#E7E8EA","n200":"#D8DADE","n300":"#CBCCD0","n400":"#BCBEC4","n500":"#AEB0B6"},"progress":{"negative":"#FF144D","positive":"#6B50D7"},"shadow":{"base":"12px 40px 120px rgba(0, 0, 0, 0.3)","frame":"0px 10px 40px rgba(0, 0, 0, 0.26)","menu":"4px 10px 20px rgba(6, 6, 6, 0.12)","popup":"10px 20px 40px rgba(0, 0, 0, 0.2)","small":"0px, 4px, rgba(0, 0, 0, 0.25)","window":"0px 10px 60px rgba(0, 0, 0, 0.7)"},"status":{"negative":"#FF144D","positive":"#24B400"},"text":{"fileBrowser":"#787A85"}}},"page":"/version-control","query":{},"buildId":"
|
|
53
|
+
</style></head><body><div id="__next"><div class="" style="position:fixed;top:0;left:0;height:2px;background:transparent;z-index:99999999999;width:100%"><div class="" style="height:100%;background:#FF144D;transition:all 500ms ease;width:0%"><div style="box-shadow:0 0 10px #FF144D, 0 0 10px #FF144D;width:5%;opacity:1;position:absolute;height:100%;transition:all 500ms ease;transform:rotate(3deg) translate(0px, -4px);left:-10rem"></div></div></div><div class="indexstyle__HeaderStyle-sc-1bk8irg-0 bVoYMS"></div><div class="indexstyle__ContainerStyle-sc-ecogjt-0 jrjFfx"><div class="indexstyle__VerticalNavigationStyleComponent-sc-ecogjt-1 drmgmw"><div class="Spacing__SpacingStyle-sc-1mpmtgj-0 kgseVY"></div></div><div class="Flex-sc-sgfnl9-0 esCWvc"></div></div><div id="command-center-root"></div><div></div><div></div><div></div><div class="ToastWrapper-sc-1a33ph1-0 dionUf"><div class="Toastify"></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"auth":{"decodedToken":{"expires":0,"token":null}}},"currentTheme":{"accent":{"alert":"#F6540B","blue":"#4877FF","blueLight":"rgba(72, 119, 255, 0.5)","contentDefaultTransparent":"rgba(174, 174, 174, 0.5)","cyan":"#65E3FF","cyanLight":"rgba(101, 227, 255, 0.3)","cyanTransparent":"rgba(101, 227, 255, 0.12)","dbt":"#fc6949","dbtDark":"rgba(252, 105, 73, 0.3)","dbtLight":"rgba(252, 105, 73, 0.5)","info":"#00ABFF","infoTransparent":"rgba(0, 171, 255, 0.5)","negative":"#FF1E59","negativeTransparent":"rgba(255, 30, 89, 0.3)","pink":"#FF4FF8","pinkLight":"rgb(255, 79, 248, 0.5)","positive":"#00A81A","primaryTransparent":"rgba(155, 108, 167, 0.5)","purple":"#7D55EC","purpleLight":"rgba(125, 85, 236, 0.5)","rose":"#D1A2AB","roseLight":"rgba(209, 162, 171, 0.5)","sky":"#6AA1E0","skyLight":"rgba(106, 161, 224, 0.5)","teal":"#00B4CC","tealLight":"rgba(0, 180, 204, 0.5)","warning":"#DD9900","warningTransparent":"rgba(221, 153, 0, 0.5)","yellow":"#FFCC19","yellowLight":"rgba(255, 204, 25, 0.5)"},"background":{"blackTransparent":"rgba(0, 0, 0, 0.6)","blackTransparentDark":"rgba(0, 0, 0, 0.8)","chartBlock":"#2E3036","codeArea":"#1E1F24","codeTextarea":"#000000","content":"#1B1C20","danger":"#FFD0DB","dark":"#B1B8C3","dashboard":"#18181C","dashboardTransparent":"rgba(24, 24, 28, 0.1)","header":"#1B1B1B","menu":"#0F4CFF","muted":"#F9FAFC","navigation":"#EDEDED","output":"#2E3036","page":"#1E1F24","panel":"#232429","panelTransparent":"rgba(35, 36, 41, 0.7)","popup":"#27292E","row":"#2C2C2C","row2":"#51535C","scrollbarThumb":"rgba(100, 100, 100, 0.5)","scrollbarThumbHover":"rgba(255, 255, 255, 0.3)","scrollbarTrack":"#2E3036","success":"#8ADE00","successLight":"rgb(138, 222, 0, 0.3)","table":"#292A2F","tag":"#3A4550"},"borders":{"button":"#454850","contrast":"#FFFFFF","danger":"#FF144D","dark":"#000000","darkLight":"#2E3036","info":"#FFCC19","light":"#2F3034","medium":"#1C1C1C","medium2":"#141414","success":"#2FCB52"},"brand":{"earth100":"#C6EEDB","earth200":"#9DDFBF","earth300":"#6BBF96","earth400":"#37A46F","earth400Transparent":"rgba(55, 164, 111, 0.4)","earth500":"#00954C","energy100":"#FFF4BA","energy200":"#FFED92","energy300":"#FFE662","energy400":"#FFDA19","energy400Transparent":"rgba(255, 218, 25, 0.04)","energy500":"#F6C000","fire100":"#FFD7E0","fire200":"#FFA3B9","fire300":"#FF547D","fire400":"#FF144D","fire400Transparent":"rgba(255, 20, 77, 0.4)","fire500":"#EB0032","stone100":"#F3E6D7","stone200":"#E3D4C2","stone400":"#BFA78B","stone500":"#AF8859","water100":"#BDCEFF","water200":"#81A1FF","water300":"#517DFF","water400":"#2A60FE","water400Transparent":"rgba(42, 96, 254, 0.4)","water500":"#0F4CFF","wind100":"#EEEAFF","wind200":"#CCC1F4","wind300":"#A698DD","wind400":"#6B50D7","wind400SuperTransparent":"rgba(107, 80, 215, 0.12)","wind400Transparent":"rgba(107, 80, 215, 0.4)","wind500":"#4E32BC"},"chart":{"backgroundPrimary":"#7D55EC","backgroundSecondary":"#FF144D","backgroundTertiary":"#86E2FF","button1":"#4877FF","button2":"#FFCC19","button3":"#8ADE00","button4":"#FF4FF8","button5":"#B98D95","lines":"#9B6CA7","primary":"#6B50D7","secondary":"#FF144D","tertiary":"#2A60FE"},"content":{"active":"#FFFFFF","default":"#AEAEAE","disabled":"rgba(255, 255, 255, 0.3)","inverted":"#2C2C2C","muted":"#787A85"},"elevation":{"visualizationAccent":"#996CFF","visualizationAccentAlt":"#C1ACF7"},"feature":{"active":"rgba(250, 248, 254, 0.14)","disabled":"rgba(201, 206, 218, 0.12)"},"icons":{"neutral":"#787878"},"interactive":{"activeBorder":"#060606","blackBackgroundTransparent":"rgba(0, 0, 0, 0.5)","checked":"#060606","dangerBorder":"#FF144D","defaultBackground":"#36383F","defaultBackgroundTransparent":"rgba(54, 56, 63, 0.5)","defaultBorder":"#ffffff1a","disabledBorder":"#B1B8C3","focusBackground":"#B1B8C3","focusBorder":"#86E2FF","hoverBackground":"#4E4E4E","hoverBackgroundTransparent":"rgba(78, 78, 78, 0.5)","hoverBlackBackgroundTransparent":"rgba(0, 0, 0, 0.7)","hoverBorder":"#B9BFCA","hoverOverlay":"rgba(255, 255, 255, 0.1)","linkPrimary":"#1752FF","linkPrimaryHover":"#4877FF","linkPrimaryLight":"#5982ff","linkSecondary":"#6B50D7","linkSecondaryDisabled":"#C4B9EF","linkText":"#6AA1E0","linkTextLight":"#9ECBFF","purple":"#885EFF","rowHoverBackground":"rgba(0, 0, 0, 0.1)","transparent":"rgba(255, 255, 255, 0)"},"loader":{"color":"#EB0032","colorInverted":"#8ADE00"},"logo":{"color":"#FFFFFF"},"monotone":{"black":"#060606","blackTransparent":"rgba(0, 0, 0, 0.6)","gray":"#B1B8C3","grey100":"#F2F2F2","grey200":"#D5D7DC","grey300":"#B4B8C0","grey400":"#70747C","grey500":"#51535C","purple":"#6B50D7","white":"#FFFFFF","whiteTransparent":"rgba(255, 255, 255, 0.6)"},"neutral":{"n100":"#E7E8EA","n200":"#D8DADE","n300":"#CBCCD0","n400":"#BCBEC4","n500":"#AEB0B6"},"progress":{"negative":"#FF144D","positive":"#6B50D7"},"shadow":{"base":"12px 40px 120px rgba(0, 0, 0, 0.3)","frame":"0px 10px 40px rgba(0, 0, 0, 0.26)","menu":"4px 10px 20px rgba(6, 6, 6, 0.12)","popup":"10px 20px 40px rgba(0, 0, 0, 0.2)","small":"0px, 4px, rgba(0, 0, 0, 0.25)","window":"0px 10px 60px rgba(0, 0, 0, 0.7)"},"status":{"negative":"#FF144D","positive":"#24B400"},"text":{"fileBrowser":"#787A85"}}},"page":"/version-control","query":{},"buildId":"iCySon3_GCldnbC5U7C-s","assetPrefix":"/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_","nextExport":true,"isFallback":false,"gip":true,"appGip":true,"scriptLoader":[]}</script></body></html>
|
|
@@ -12,6 +12,7 @@ from mage_ai.server.logger import Logger
|
|
|
12
12
|
from mage_ai.services.newrelic import initialize_new_relic
|
|
13
13
|
from mage_ai.settings import (
|
|
14
14
|
SENTRY_DSN,
|
|
15
|
+
SENTRY_SERVER_NAME,
|
|
15
16
|
SENTRY_TRACES_SAMPLE_RATE,
|
|
16
17
|
SERVER_LOGGING_FORMAT,
|
|
17
18
|
SERVER_VERBOSITY,
|
|
@@ -35,6 +36,7 @@ def run_scheduler():
|
|
|
35
36
|
sentry_sdk.init(
|
|
36
37
|
sentry_dsn,
|
|
37
38
|
traces_sample_rate=SENTRY_TRACES_SAMPLE_RATE,
|
|
39
|
+
server_name=SENTRY_SERVER_NAME,
|
|
38
40
|
)
|
|
39
41
|
(enable_new_relic, application) = initialize_new_relic()
|
|
40
42
|
try:
|
|
@@ -126,6 +126,9 @@ class TerminalWebsocketServer(terminado.TermSocket):
|
|
|
126
126
|
Entity.PROJECT,
|
|
127
127
|
get_project_uuid(),
|
|
128
128
|
)
|
|
129
|
+
else:
|
|
130
|
+
# If the user is deleted, set valid to False
|
|
131
|
+
valid = False
|
|
129
132
|
if not valid or is_disable_pipeline_edit_access():
|
|
130
133
|
return self.send_json_message(
|
|
131
134
|
['stdout', f'{command[1]}\nUnauthorized access to the terminal.'])
|
mage_ai/settings/server.py
CHANGED
|
@@ -121,6 +121,8 @@ CONCURRENCY_CONFIG_PIPELINE_RUN_LIMIT = get_int_value(
|
|
|
121
121
|
)
|
|
122
122
|
DISABLE_AUTO_BROWSER_OPEN = get_bool_value(os.getenv('DISABLE_AUTO_BROWSER_OPEN', 'False'))
|
|
123
123
|
DISABLE_AUTORELOAD = get_bool_value(os.getenv('DISABLE_AUTORELOAD', 'False'))
|
|
124
|
+
HIDE_API_TRIGGER_TOKEN = get_bool_value(os.getenv('HIDE_API_TRIGGER_TOKEN', 'False'))
|
|
125
|
+
|
|
124
126
|
# The hostname in Kubernetes or AWS ECS
|
|
125
127
|
HOSTNAME = os.getenv('HOSTNAME')
|
|
126
128
|
INITIAL_METADATA = os.getenv('INITIAL_METADATA')
|
|
@@ -152,6 +154,7 @@ USE_UNIQUE_TERMINAL = os.getenv('USE_UNIQUE_TERMINAL', None)
|
|
|
152
154
|
# Sentry Configuration
|
|
153
155
|
SENTRY_DSN = os.getenv('SENTRY_DSN')
|
|
154
156
|
SENTRY_TRACES_SAMPLE_RATE = os.getenv('SENTRY_TRACES_SAMPLE_RATE', 1.0)
|
|
157
|
+
SENTRY_SERVER_NAME = os.getenv('SENTRY_SERVER_NAME', None)
|
|
155
158
|
|
|
156
159
|
# New Relic Configuration
|
|
157
160
|
ENABLE_NEW_RELIC = os.getenv('ENABLE_NEW_RELIC', False)
|
|
@@ -263,6 +266,7 @@ MAGE_SETTINGS_ENVIRONMENT_VARIABLES = [
|
|
|
263
266
|
'USE_UNIQUE_TERMINAL',
|
|
264
267
|
'SENTRY_DSN',
|
|
265
268
|
'SENTRY_TRACES_SAMPLE_RATE',
|
|
269
|
+
'SENTRY_SERVER_NAME',
|
|
266
270
|
'MAGE_PUBLIC_HOST',
|
|
267
271
|
'SCHEDULER_TRIGGER_INTERVAL',
|
|
268
272
|
'REQUIRE_USER_PERMISSIONS',
|
|
@@ -91,7 +91,7 @@ class KafkaSource(BaseSource):
|
|
|
91
91
|
api_version=self.config.api_version,
|
|
92
92
|
auto_offset_reset=self.config.auto_offset_reset,
|
|
93
93
|
max_partition_fetch_bytes=self.config.max_partition_fetch_bytes,
|
|
94
|
-
enable_auto_commit=
|
|
94
|
+
enable_auto_commit=False,
|
|
95
95
|
)
|
|
96
96
|
if self.config.security_protocol == SecurityProtocol.SSL:
|
|
97
97
|
consumer_kwargs['security_protocol'] = SecurityProtocol.SSL
|
|
@@ -270,6 +270,7 @@ class KafkaSource(BaseSource):
|
|
|
270
270
|
message_values.append(message)
|
|
271
271
|
if len(message_values) > 0:
|
|
272
272
|
handler(message_values)
|
|
273
|
+
self.consumer.commit()
|
|
273
274
|
|
|
274
275
|
def test_connection(self):
|
|
275
276
|
self.consumer._client.check_version(timeout=5)
|
|
@@ -98,7 +98,7 @@ class BlockExecutorTest(BaseApiTestCase):
|
|
|
98
98
|
self.block_executor._execute_conditional = MagicMock(return_value=True)
|
|
99
99
|
self.block_executor._execute = MagicMock(return_value={'result': 'success'})
|
|
100
100
|
# self.block.run_tests = MagicMock()
|
|
101
|
-
self.block_executor.
|
|
101
|
+
self.block_executor.execute_callback = MagicMock()
|
|
102
102
|
|
|
103
103
|
result = self.block_executor.execute(
|
|
104
104
|
analyze_outputs=analyze_outputs,
|
|
@@ -167,7 +167,7 @@ class BlockExecutorTest(BaseApiTestCase):
|
|
|
167
167
|
# update_tests=False,
|
|
168
168
|
# dynamic_block_uuid=dynamic_block_uuid,
|
|
169
169
|
# )
|
|
170
|
-
self.block_executor.
|
|
170
|
+
self.block_executor.execute_callback.assert_called_with(
|
|
171
171
|
'on_success',
|
|
172
172
|
block_run_id=None,
|
|
173
173
|
callback_kwargs=dict(retry=dict(attempts=1)),
|
|
@@ -245,7 +245,7 @@ class BlockExecutorTest(BaseApiTestCase):
|
|
|
245
245
|
self.block.callback_blocks = [MagicMock(), MagicMock()]
|
|
246
246
|
self.block.callback_block = MagicMock()
|
|
247
247
|
|
|
248
|
-
self.block_executor.
|
|
248
|
+
self.block_executor.execute_callback(
|
|
249
249
|
callback='on_success',
|
|
250
250
|
global_vars=dict(retry=dict(attempts=1)),
|
|
251
251
|
logging_tags={},
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from unittest.mock import patch
|
|
3
3
|
|
|
4
|
-
from mage_ai.data_preparation.models.block.dynamic.constants import (
|
|
5
|
-
CHILD_DATA_VARIABLE_UUID,
|
|
6
|
-
)
|
|
7
4
|
from mage_ai.data_preparation.models.block.dynamic.counter import (
|
|
8
5
|
DynamicBlockItemCounter,
|
|
9
6
|
DynamicChildItemCounter,
|
|
10
7
|
DynamicDuoItemCounter,
|
|
11
8
|
)
|
|
9
|
+
from mage_ai.data_preparation.models.constants import CHILD_DATA_VARIABLE_UUID
|
|
12
10
|
from mage_ai.data_preparation.models.variables.constants import (
|
|
13
11
|
VariableAggregateDataTypeFilename,
|
|
14
12
|
)
|
|
@@ -180,6 +180,7 @@ class VariableTest(DBTestCase):
|
|
|
180
180
|
[1, 'test'],
|
|
181
181
|
[2, 'test2'],
|
|
182
182
|
],
|
|
183
|
+
orient="row",
|
|
183
184
|
schema=['col1', 'col2'],
|
|
184
185
|
)
|
|
185
186
|
df2 = pl.DataFrame(
|
|
@@ -187,6 +188,7 @@ class VariableTest(DBTestCase):
|
|
|
187
188
|
[1, 'test', 3.123, 41414123123124],
|
|
188
189
|
[2, 'test2', 4.321, 12111111],
|
|
189
190
|
],
|
|
191
|
+
orient="row",
|
|
190
192
|
schema=['col1', 'col2', 'col3', 'col4'],
|
|
191
193
|
)
|
|
192
194
|
df2 = df2.cast({'col4': pl.Int64})
|
|
@@ -33,14 +33,14 @@ class TestTablePostgres(DBTestCase):
|
|
|
33
33
|
test_cases = [
|
|
34
34
|
[],
|
|
35
35
|
[123],
|
|
36
|
-
[['
|
|
36
|
+
[['àabc', 'deèéf']],
|
|
37
37
|
[['08:00', '12:00'], ['15:00', '20:00']],
|
|
38
38
|
[['08:00', '12:00'], []],
|
|
39
39
|
]
|
|
40
40
|
expected = [
|
|
41
41
|
'{}',
|
|
42
42
|
'{123}',
|
|
43
|
-
'{{"
|
|
43
|
+
'{{"àabc", "deèéf"}}',
|
|
44
44
|
'{{"08:00", "12:00"}, {"15:00", "20:00"}}',
|
|
45
45
|
'{{"08:00", "12:00"}, {}}',
|
|
46
46
|
]
|
|
@@ -49,6 +49,7 @@ class TestTablePostgres(DBTestCase):
|
|
|
49
49
|
simplejson.dumps(
|
|
50
50
|
val,
|
|
51
51
|
default=encode_complex,
|
|
52
|
+
ensure_ascii=False,
|
|
52
53
|
ignore_nan=True,
|
|
53
54
|
)
|
|
54
55
|
)
|
|
@@ -112,9 +112,11 @@ class NotificationSenderTests(DBTestCase):
|
|
|
112
112
|
f'`{pipeline_run.pipeline_schedule.name}` '
|
|
113
113
|
f'at execution time `{pipeline_run.execution_date}`. Error: None'
|
|
114
114
|
)
|
|
115
|
+
title = 'Failed to run Mage pipeline test_pipeline'
|
|
115
116
|
mock_send_teams_message.assert_called_once_with(
|
|
116
117
|
notification_config.teams_config,
|
|
117
118
|
message,
|
|
119
|
+
title
|
|
118
120
|
)
|
|
119
121
|
|
|
120
122
|
@patch('mage_ai.orchestration.notification.sender.send_teams_message')
|
|
@@ -131,9 +133,11 @@ class NotificationSenderTests(DBTestCase):
|
|
|
131
133
|
f'`{pipeline_run.pipeline_schedule.name}` '
|
|
132
134
|
f'at execution time `{pipeline_run.execution_date}`.'
|
|
133
135
|
)
|
|
136
|
+
title = 'Successfully ran Pipeline test_pipeline'
|
|
134
137
|
mock_send_teams_message.assert_called_once_with(
|
|
135
138
|
notification_config.teams_config,
|
|
136
139
|
message,
|
|
140
|
+
title
|
|
137
141
|
)
|
|
138
142
|
|
|
139
143
|
@patch('mage_ai.orchestration.notification.sender.send_teams_message')
|
|
@@ -162,4 +166,4 @@ class NotificationSenderTests(DBTestCase):
|
|
|
162
166
|
notification_config.opsgenie_config,
|
|
163
167
|
message=ANY,
|
|
164
168
|
description=ANY,
|
|
165
|
-
)
|
|
169
|
+
)
|
|
@@ -33,7 +33,7 @@ class KafkaTests(TestCase):
|
|
|
33
33
|
api_version='0.10.2',
|
|
34
34
|
auto_offset_reset='latest',
|
|
35
35
|
max_partition_fetch_bytes=1048576,
|
|
36
|
-
enable_auto_commit=
|
|
36
|
+
enable_auto_commit=False,
|
|
37
37
|
)
|
|
38
38
|
|
|
39
39
|
def test_init_client_with_topics(self):
|
|
@@ -56,7 +56,7 @@ class KafkaTests(TestCase):
|
|
|
56
56
|
api_version='0.10.2',
|
|
57
57
|
auto_offset_reset='latest',
|
|
58
58
|
max_partition_fetch_bytes=1048576,
|
|
59
|
-
enable_auto_commit=
|
|
59
|
+
enable_auto_commit=False,
|
|
60
60
|
)
|
|
61
61
|
|
|
62
62
|
def test_init_client_with_missing_topic_or_topics(self):
|
|
@@ -7,6 +7,7 @@ from typing import Callable, Dict, List, Union
|
|
|
7
7
|
|
|
8
8
|
import aiohttp
|
|
9
9
|
import pytz
|
|
10
|
+
import requests
|
|
10
11
|
|
|
11
12
|
from mage_ai.api.operations.constants import OperationType
|
|
12
13
|
from mage_ai.cache.block_action_object.constants import (
|
|
@@ -43,6 +44,8 @@ from mage_ai.usage_statistics.constants import (
|
|
|
43
44
|
)
|
|
44
45
|
from mage_ai.usage_statistics.utils import build_event_data_for_chart
|
|
45
46
|
|
|
47
|
+
AMPLITUDE_API_KEY = 'KwnbpKJNe6gOjC2X5ilxafFvxbNppiIfGejB2hlY'
|
|
48
|
+
|
|
46
49
|
|
|
47
50
|
class UsageStatisticLogger():
|
|
48
51
|
def __init__(
|
|
@@ -229,6 +232,17 @@ class UsageStatisticLogger():
|
|
|
229
232
|
),
|
|
230
233
|
)
|
|
231
234
|
|
|
235
|
+
def pipeline_runs_impression_sync(self, count_func: Callable) -> bool:
|
|
236
|
+
if not self.help_improve_mage:
|
|
237
|
+
return False
|
|
238
|
+
return self.__send_message_sync(
|
|
239
|
+
dict(
|
|
240
|
+
object=EventObjectType.PIPELINE_RUN,
|
|
241
|
+
action=EventActionType.IMPRESSION,
|
|
242
|
+
pipeline_runs=count_func(),
|
|
243
|
+
),
|
|
244
|
+
)
|
|
245
|
+
|
|
232
246
|
@safe_db_query
|
|
233
247
|
async def pipeline_runs_impression(self, count_func: Callable) -> bool:
|
|
234
248
|
if not self.help_improve_mage:
|
|
@@ -301,19 +315,7 @@ class UsageStatisticLogger():
|
|
|
301
315
|
)
|
|
302
316
|
|
|
303
317
|
@safe_db_query
|
|
304
|
-
|
|
305
|
-
"""
|
|
306
|
-
Write "pipeline_run_ended" event to Amplitude for the given PipelineRun.
|
|
307
|
-
|
|
308
|
-
Args:
|
|
309
|
-
pipeline_run (PipelineRun): pipeline run to use to populate the event
|
|
310
|
-
|
|
311
|
-
Returns:
|
|
312
|
-
bool: True if event was successfully uploaded
|
|
313
|
-
"""
|
|
314
|
-
if not self.help_improve_mage:
|
|
315
|
-
return False
|
|
316
|
-
|
|
318
|
+
def pipeline_run_ended_data(self, pipeline_run: PipelineRun):
|
|
317
319
|
pipeline = pipeline_run.pipeline
|
|
318
320
|
|
|
319
321
|
if pipeline.type == PipelineType.INTEGRATION:
|
|
@@ -333,7 +335,7 @@ class UsageStatisticLogger():
|
|
|
333
335
|
|
|
334
336
|
encoded_pipeline_uuid = pipeline.uuid.encode('utf-8')
|
|
335
337
|
pipeline_schedule = pipeline_run.pipeline_schedule
|
|
336
|
-
|
|
338
|
+
return dict(
|
|
337
339
|
landing_time_enabled=1 if pipeline_schedule.landing_time_enabled() else 0,
|
|
338
340
|
num_pipeline_blocks=len(block_configs),
|
|
339
341
|
pipeline_run_uuid=pipeline_run.id,
|
|
@@ -346,11 +348,48 @@ class UsageStatisticLogger():
|
|
|
346
348
|
unique_languages=list(set([b.get('language') for b in block_configs])),
|
|
347
349
|
)
|
|
348
350
|
|
|
351
|
+
@safe_db_query
|
|
352
|
+
async def pipeline_run_ended(self, pipeline_run: PipelineRun) -> bool:
|
|
353
|
+
"""
|
|
354
|
+
Write "pipeline_run_ended" event to Amplitude for the given PipelineRun.
|
|
355
|
+
|
|
356
|
+
Args:
|
|
357
|
+
pipeline_run (PipelineRun): pipeline run to use to populate the event
|
|
358
|
+
|
|
359
|
+
Returns:
|
|
360
|
+
bool: True if event was successfully uploaded
|
|
361
|
+
"""
|
|
362
|
+
if not self.help_improve_mage:
|
|
363
|
+
return False
|
|
364
|
+
|
|
365
|
+
data = self.pipeline_run_ended_data(pipeline_run)
|
|
366
|
+
|
|
349
367
|
return await self.__send_message(
|
|
350
368
|
data,
|
|
351
369
|
event_name=EventNameType.PIPELINE_RUN_ENDED,
|
|
352
370
|
)
|
|
353
371
|
|
|
372
|
+
@safe_db_query
|
|
373
|
+
def pipeline_run_ended_sync(self, pipeline_run: PipelineRun) -> bool:
|
|
374
|
+
"""
|
|
375
|
+
Write "pipeline_run_ended" event to Amplitude for the given PipelineRun.
|
|
376
|
+
|
|
377
|
+
Args:
|
|
378
|
+
pipeline_run (PipelineRun): pipeline run to use to populate the event
|
|
379
|
+
|
|
380
|
+
Returns:
|
|
381
|
+
bool: True if event was successfully uploaded
|
|
382
|
+
"""
|
|
383
|
+
if not self.help_improve_mage:
|
|
384
|
+
return False
|
|
385
|
+
|
|
386
|
+
data = self.pipeline_run_ended_data(pipeline_run)
|
|
387
|
+
|
|
388
|
+
return self.__send_message_sync(
|
|
389
|
+
data,
|
|
390
|
+
event_name=EventNameType.PIPELINE_RUN_ENDED,
|
|
391
|
+
)
|
|
392
|
+
|
|
354
393
|
@safe_db_query
|
|
355
394
|
async def block_run_ended(self, block_run: BlockRun) -> bool:
|
|
356
395
|
if not self.help_improve_mage:
|
|
@@ -452,7 +491,7 @@ class UsageStatisticLogger():
|
|
|
452
491
|
async with session.post(
|
|
453
492
|
API_ENDPOINT,
|
|
454
493
|
json=dict(
|
|
455
|
-
api_key=
|
|
494
|
+
api_key=AMPLITUDE_API_KEY,
|
|
456
495
|
event_name=event_name,
|
|
457
496
|
usage_statistics=data_to_send,
|
|
458
497
|
),
|
|
@@ -467,6 +506,51 @@ class UsageStatisticLogger():
|
|
|
467
506
|
print(f'[Statistics] Message: {err}')
|
|
468
507
|
return False
|
|
469
508
|
|
|
509
|
+
def __send_message_sync(
|
|
510
|
+
self,
|
|
511
|
+
data: Dict,
|
|
512
|
+
event_name: EventNameType = EventNameType.USAGE_STATISTIC_CREATE,
|
|
513
|
+
override_validation: bool = False,
|
|
514
|
+
project_uuid: str = None,
|
|
515
|
+
) -> bool:
|
|
516
|
+
if not override_validation:
|
|
517
|
+
if is_test():
|
|
518
|
+
return False
|
|
519
|
+
|
|
520
|
+
if not self.help_improve_mage:
|
|
521
|
+
return False
|
|
522
|
+
|
|
523
|
+
if data is None:
|
|
524
|
+
data = {}
|
|
525
|
+
|
|
526
|
+
data_to_send = merge_dict(
|
|
527
|
+
self.__shared_metadata(),
|
|
528
|
+
data,
|
|
529
|
+
)
|
|
530
|
+
|
|
531
|
+
if project_uuid and not data_to_send.get('project_uuid'):
|
|
532
|
+
data_to_send['project_uuid'] = project_uuid
|
|
533
|
+
|
|
534
|
+
try:
|
|
535
|
+
response = requests.post(
|
|
536
|
+
API_ENDPOINT,
|
|
537
|
+
json={
|
|
538
|
+
'api_key': AMPLITUDE_API_KEY,
|
|
539
|
+
'event_name': event_name,
|
|
540
|
+
'usage_statistics': data_to_send,
|
|
541
|
+
},
|
|
542
|
+
timeout=3
|
|
543
|
+
)
|
|
544
|
+
response.raise_for_status()
|
|
545
|
+
response_json = response.json()
|
|
546
|
+
if response_json.get('success'):
|
|
547
|
+
if is_debug():
|
|
548
|
+
print(json.dumps(data_to_send, indent=2))
|
|
549
|
+
return True
|
|
550
|
+
except Exception as err:
|
|
551
|
+
print(f'[Statistics] Message: {err}')
|
|
552
|
+
return False
|
|
553
|
+
|
|
470
554
|
def __shared_metadata(self) -> Dict:
|
|
471
555
|
return dict(
|
|
472
556
|
environment=get_env(),
|