mage-ai 0.9.69__py3-none-any.whl → 0.9.71__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/ai/utils/xgboost.py +222 -0
- mage_ai/api/errors.py +37 -25
- mage_ai/api/operations/base.py +13 -1
- mage_ai/api/parsers/PipelineScheduleParser.py +1 -1
- mage_ai/api/policies/BackfillPolicy.py +1 -0
- mage_ai/api/policies/BlockOutputPolicy.py +40 -17
- mage_ai/api/policies/GlobalDataProductPolicy.py +91 -41
- mage_ai/api/policies/KernelPolicy.py +55 -32
- mage_ai/api/policies/KernelProcessPolicy.py +56 -0
- mage_ai/api/policies/OutputPolicy.py +73 -41
- mage_ai/api/policies/PipelinePolicy.py +206 -137
- mage_ai/api/policies/WorkspacePolicy.py +1 -0
- mage_ai/api/presenters/BackfillPresenter.py +1 -0
- mage_ai/api/presenters/BlockLayoutItemPresenter.py +9 -7
- mage_ai/api/presenters/BlockPresenter.py +1 -1
- mage_ai/api/presenters/GlobalDataProductPresenter.py +6 -1
- mage_ai/api/presenters/KernelPresenter.py +5 -26
- mage_ai/api/presenters/KernelProcessPresenter.py +28 -0
- mage_ai/api/presenters/PipelinePresenter.py +18 -5
- mage_ai/api/presenters/StatusPresenter.py +2 -0
- mage_ai/api/presenters/SyncPresenter.py +25 -0
- mage_ai/api/resources/AutocompleteItemResource.py +1 -1
- mage_ai/api/resources/BlockLayoutItemResource.py +90 -44
- mage_ai/api/resources/BlockOutputResource.py +42 -9
- mage_ai/api/resources/BlockResource.py +4 -3
- mage_ai/api/resources/BlockRunResource.py +27 -22
- mage_ai/api/resources/ClusterResource.py +4 -1
- mage_ai/api/resources/CustomTemplateResource.py +34 -14
- mage_ai/api/resources/DataProviderResource.py +1 -1
- mage_ai/api/resources/ExecutionStateResource.py +3 -1
- mage_ai/api/resources/FileContentResource.py +8 -2
- mage_ai/api/resources/FileResource.py +10 -4
- mage_ai/api/resources/FileVersionResource.py +3 -1
- mage_ai/api/resources/GitBranchResource.py +101 -31
- mage_ai/api/resources/GitCustomBranchResource.py +29 -1
- mage_ai/api/resources/GlobalDataProductResource.py +44 -7
- mage_ai/api/resources/GlobalHookResource.py +4 -1
- mage_ai/api/resources/IntegrationDestinationResource.py +6 -2
- mage_ai/api/resources/IntegrationSourceResource.py +8 -4
- mage_ai/api/resources/IntegrationSourceStreamResource.py +6 -2
- mage_ai/api/resources/KernelProcessResource.py +44 -0
- mage_ai/api/resources/KernelResource.py +25 -3
- mage_ai/api/resources/OauthResource.py +1 -1
- mage_ai/api/resources/OutputResource.py +33 -11
- mage_ai/api/resources/PageBlockLayoutResource.py +34 -23
- mage_ai/api/resources/PipelineInteractionResource.py +31 -15
- mage_ai/api/resources/PipelineResource.py +258 -125
- mage_ai/api/resources/PipelineRunResource.py +52 -7
- mage_ai/api/resources/PipelineScheduleResource.py +11 -2
- mage_ai/api/resources/PipelineTriggerResource.py +6 -1
- mage_ai/api/resources/ProjectResource.py +18 -7
- mage_ai/api/resources/PullRequestResource.py +6 -4
- mage_ai/api/resources/SecretResource.py +1 -1
- mage_ai/api/resources/SeedResource.py +8 -1
- mage_ai/api/resources/StatusResource.py +21 -6
- mage_ai/api/resources/SyncResource.py +6 -8
- mage_ai/api/resources/VariableResource.py +46 -26
- mage_ai/api/resources/VersionControlProjectResource.py +9 -2
- mage_ai/api/resources/WidgetResource.py +1 -1
- mage_ai/api/resources/WorkspaceResource.py +6 -5
- mage_ai/api/views.py +47 -40
- mage_ai/authentication/permissions/seed.py +16 -2
- mage_ai/authentication/providers/oidc.py +21 -1
- mage_ai/autocomplete/utils.py +13 -9
- mage_ai/cache/base.py +1 -1
- mage_ai/cache/block.py +18 -12
- mage_ai/cache/block_action_object/__init__.py +33 -5
- mage_ai/cache/file.py +22 -19
- mage_ai/cache/pipeline.py +18 -12
- mage_ai/cli/main.py +1 -0
- mage_ai/cluster_manager/aws/emr_cluster_manager.py +9 -5
- mage_ai/cluster_manager/config.py +2 -2
- mage_ai/cluster_manager/kubernetes/workload_manager.py +52 -1
- mage_ai/cluster_manager/manage.py +1 -1
- mage_ai/cluster_manager/workspace/base.py +7 -1
- mage_ai/cluster_manager/workspace/kubernetes.py +22 -1
- mage_ai/command_center/applications/factory.py +10 -7
- mage_ai/command_center/applications/utils.py +2 -2
- mage_ai/command_center/files/factory.py +17 -15
- mage_ai/command_center/presenters/text.py +1 -1
- mage_ai/command_center/utils.py +25 -13
- mage_ai/data/__init__.py +0 -0
- mage_ai/data/constants.py +45 -0
- mage_ai/data/models/__init__.py +0 -0
- mage_ai/data/models/base.py +119 -0
- mage_ai/data/models/constants.py +1 -0
- mage_ai/data/models/generator.py +115 -0
- mage_ai/data/models/manager.py +168 -0
- mage_ai/data/models/pyarrow/__init__.py +0 -0
- mage_ai/data/models/pyarrow/record_batch.py +55 -0
- mage_ai/data/models/pyarrow/shared.py +21 -0
- mage_ai/data/models/pyarrow/table.py +8 -0
- mage_ai/data/models/reader.py +103 -0
- mage_ai/data/models/utils.py +59 -0
- mage_ai/data/models/writer.py +91 -0
- mage_ai/data/tabular/__init__.py +0 -0
- mage_ai/data/tabular/constants.py +23 -0
- mage_ai/data/tabular/mocks.py +19 -0
- mage_ai/data/tabular/models.py +126 -0
- mage_ai/data/tabular/reader.py +602 -0
- mage_ai/data/tabular/utils.py +102 -0
- mage_ai/data/tabular/writer.py +266 -0
- mage_ai/data/variables/__init__.py +0 -0
- mage_ai/data/variables/wrapper.py +54 -0
- mage_ai/data_cleaner/analysis/charts.py +61 -39
- mage_ai/data_cleaner/column_types/column_type_detector.py +53 -31
- mage_ai/data_cleaner/estimators/encoders.py +5 -2
- mage_ai/data_integrations/utils/scheduler.py +16 -11
- mage_ai/data_preparation/decorators.py +1 -0
- mage_ai/data_preparation/executors/block_executor.py +237 -155
- mage_ai/data_preparation/executors/k8s_block_executor.py +30 -7
- mage_ai/data_preparation/executors/k8s_pipeline_executor.py +30 -7
- mage_ai/data_preparation/executors/streaming_pipeline_executor.py +2 -2
- mage_ai/data_preparation/git/__init__.py +77 -29
- mage_ai/data_preparation/git/api.py +69 -8
- mage_ai/data_preparation/git/utils.py +64 -34
- mage_ai/data_preparation/logging/logger_manager.py +4 -3
- mage_ai/data_preparation/models/block/__init__.py +1562 -879
- mage_ai/data_preparation/models/block/data_integration/mixins.py +4 -3
- mage_ai/data_preparation/models/block/dynamic/__init__.py +17 -6
- mage_ai/data_preparation/models/block/dynamic/child.py +41 -102
- mage_ai/data_preparation/models/block/dynamic/constants.py +1 -0
- mage_ai/data_preparation/models/block/dynamic/counter.py +296 -0
- mage_ai/data_preparation/models/block/dynamic/data.py +16 -0
- mage_ai/data_preparation/models/block/dynamic/factory.py +163 -0
- mage_ai/data_preparation/models/block/dynamic/models.py +19 -0
- mage_ai/data_preparation/models/block/dynamic/shared.py +92 -0
- mage_ai/data_preparation/models/block/dynamic/utils.py +295 -167
- mage_ai/data_preparation/models/block/dynamic/variables.py +384 -144
- mage_ai/data_preparation/models/block/dynamic/wrappers.py +77 -0
- mage_ai/data_preparation/models/block/extension/utils.py +10 -1
- mage_ai/data_preparation/models/block/global_data_product/__init__.py +35 -3
- mage_ai/data_preparation/models/block/integration/__init__.py +6 -2
- mage_ai/data_preparation/models/block/outputs.py +722 -0
- mage_ai/data_preparation/models/block/platform/mixins.py +7 -8
- mage_ai/data_preparation/models/block/r/__init__.py +56 -38
- mage_ai/data_preparation/models/block/remote/__init__.py +0 -0
- mage_ai/data_preparation/models/block/remote/models.py +58 -0
- mage_ai/data_preparation/models/block/settings/__init__.py +0 -0
- mage_ai/data_preparation/models/block/settings/dynamic/__init__.py +0 -0
- mage_ai/data_preparation/models/block/settings/dynamic/constants.py +7 -0
- mage_ai/data_preparation/models/block/settings/dynamic/mixins.py +118 -0
- mage_ai/data_preparation/models/block/settings/dynamic/models.py +31 -0
- mage_ai/data_preparation/models/block/settings/global_data_products/__init__.py +0 -0
- mage_ai/data_preparation/models/block/settings/global_data_products/mixins.py +20 -0
- mage_ai/data_preparation/models/block/settings/global_data_products/models.py +46 -0
- mage_ai/data_preparation/models/block/settings/variables/__init__.py +0 -0
- mage_ai/data_preparation/models/block/settings/variables/mixins.py +74 -0
- mage_ai/data_preparation/models/block/settings/variables/models.py +49 -0
- mage_ai/data_preparation/models/block/spark/mixins.py +2 -1
- mage_ai/data_preparation/models/block/sql/__init__.py +30 -5
- mage_ai/data_preparation/models/block/sql/utils/shared.py +21 -3
- mage_ai/data_preparation/models/block/utils.py +164 -69
- mage_ai/data_preparation/models/constants.py +21 -14
- mage_ai/data_preparation/models/custom_templates/custom_block_template.py +18 -13
- mage_ai/data_preparation/models/custom_templates/custom_pipeline_template.py +33 -16
- mage_ai/data_preparation/models/custom_templates/utils.py +1 -1
- mage_ai/data_preparation/models/file.py +41 -28
- mage_ai/data_preparation/models/global_data_product/__init__.py +100 -58
- mage_ai/data_preparation/models/global_hooks/models.py +1 -0
- mage_ai/data_preparation/models/interfaces.py +29 -0
- mage_ai/data_preparation/models/pipeline.py +374 -185
- mage_ai/data_preparation/models/pipelines/integration_pipeline.py +1 -2
- mage_ai/data_preparation/models/pipelines/seed.py +1 -1
- mage_ai/data_preparation/models/project/__init__.py +66 -18
- mage_ai/data_preparation/models/project/constants.py +2 -0
- mage_ai/data_preparation/models/triggers/__init__.py +124 -26
- mage_ai/data_preparation/models/utils.py +467 -17
- mage_ai/data_preparation/models/variable.py +1028 -137
- mage_ai/data_preparation/models/variables/__init__.py +0 -0
- mage_ai/data_preparation/models/variables/cache.py +149 -0
- mage_ai/data_preparation/models/variables/constants.py +72 -0
- mage_ai/data_preparation/models/variables/summarizer.py +336 -0
- mage_ai/data_preparation/models/variables/utils.py +77 -0
- mage_ai/data_preparation/models/widget/__init__.py +63 -41
- mage_ai/data_preparation/models/widget/charts.py +40 -27
- mage_ai/data_preparation/models/widget/constants.py +2 -0
- mage_ai/data_preparation/models/widget/utils.py +3 -3
- mage_ai/data_preparation/preferences.py +3 -3
- mage_ai/data_preparation/repo_manager.py +55 -21
- mage_ai/data_preparation/storage/base_storage.py +2 -2
- mage_ai/data_preparation/storage/gcs_storage.py +7 -4
- mage_ai/data_preparation/storage/local_storage.py +18 -9
- mage_ai/data_preparation/storage/s3_storage.py +5 -2
- mage_ai/data_preparation/templates/data_exporters/streaming/oracledb.yaml +8 -0
- mage_ai/data_preparation/variable_manager.py +281 -76
- mage_ai/io/base.py +3 -2
- mage_ai/io/bigquery.py +1 -0
- mage_ai/io/redshift.py +7 -5
- mage_ai/kernels/__init__.py +0 -0
- mage_ai/kernels/models.py +188 -0
- mage_ai/kernels/utils.py +169 -0
- mage_ai/orchestration/concurrency.py +6 -2
- mage_ai/orchestration/db/__init__.py +1 -0
- mage_ai/orchestration/db/migrations/versions/0227396a216c_add_userproject_table.py +38 -0
- mage_ai/orchestration/db/migrations/versions/42a14d6143f1_update_token_column_type.py +54 -0
- mage_ai/orchestration/db/models/dynamic/__init__.py +0 -0
- mage_ai/orchestration/db/models/dynamic/controller.py +67 -0
- mage_ai/orchestration/db/models/oauth.py +12 -18
- mage_ai/orchestration/db/models/projects.py +10 -0
- mage_ai/orchestration/db/models/schedules.py +225 -187
- mage_ai/orchestration/db/models/schedules_project_platform.py +18 -12
- mage_ai/orchestration/db/models/utils.py +46 -5
- mage_ai/orchestration/metrics/pipeline_run.py +8 -9
- mage_ai/orchestration/notification/sender.py +38 -15
- mage_ai/orchestration/pipeline_scheduler_original.py +64 -33
- mage_ai/orchestration/pipeline_scheduler_project_platform.py +1 -1
- mage_ai/orchestration/run_status_checker.py +11 -4
- mage_ai/orchestration/triggers/api.py +41 -2
- mage_ai/orchestration/triggers/global_data_product.py +9 -4
- mage_ai/orchestration/triggers/utils.py +10 -1
- mage_ai/orchestration/utils/resources.py +3 -0
- mage_ai/presenters/charts/data_sources/base.py +4 -2
- mage_ai/presenters/charts/data_sources/block.py +15 -9
- mage_ai/presenters/charts/data_sources/chart_code.py +8 -5
- mage_ai/presenters/charts/data_sources/constants.py +1 -0
- mage_ai/presenters/charts/data_sources/system_metrics.py +22 -0
- mage_ai/presenters/interactions/models.py +11 -7
- mage_ai/presenters/pages/loaders/pipelines.py +5 -3
- mage_ai/presenters/pages/models/page_components/pipeline_schedules.py +3 -1
- mage_ai/presenters/utils.py +2 -0
- mage_ai/server/api/blocks.py +2 -1
- mage_ai/server/api/downloads.py +9 -2
- mage_ai/server/api/runs.py +151 -0
- mage_ai/server/api/triggers.py +3 -1
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +8 -8
- mage_ai/server/frontend_dist/_next/static/UZLabyPgcxtZvp0O0EUUS/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1376-22de38b4ad008d8a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1557-25a7d985d5564fd3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1668-30b4619b9534519b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1799-c42db95a015689ee.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2996-2108b53b9d371d8d.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{3548-fa0792ddb88f4646.js → 3548-9d26185b3fb663b1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{3763-61b542dafdbf5754.js → 3763-40780c6d1e4b261d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3782-129dd2a2448a2e36.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3958-bcdfa414ccfa1eb2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/4168-97fd1578d1a38315.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/4982-fa5a238b139fbdd2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5699-176f445e1313f001.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7162-7dd03f0f605de721.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7779-68d2b72a90c5f925.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7966-5446a8e43711e2f9.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8023-6c2f172f48dcb99b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8095-c351b8a735d73e0c.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9624-8b8e100079ab69e1.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{main-77fe248a6fbd12d8.js → main-b99d4e30a88d9dc7.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-9fe2d9d07c94e968.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{block-layout-14f952f66964022f.js → block-layout-7f4b735c67115df5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/[...slug]-e7d48e6b0c3068ac.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products-b943f31f050fc3a4.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-4bfc84ff07d7656f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{overview-597b74828bf105db.js → overview-9f1ac4ec003884f3.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-3edc6270c5b0e962.js → frontend_dist/_next/static/chunks/pages/pipeline-runs-6d183f91a2ff6668.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-7e737f6fc7e83e9b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-38e1fbcfbfc1014e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-d94488e3f2eeef36.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-cc641a7fa8473796.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-a5c0362763a21fa8.js → block-runs-284309877f3c5a5a.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-26250e5335194ade.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-7acc7afc00df17c2.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-5f4c8128b2413fd8.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-4ebfc8e400315dda.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-e5e0150a256aadb3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-eb11c5390c982b49.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-1bdfda8edc9cf4a8.js → triggers-4612d15a65c35912.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/{profile-3f0df3decc856ee9.js → profile-3ae43c932537b254.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-b603d7fe4b175256.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js → frontend_dist/_next/static/chunks/pages/settings/platform/settings-319ddbabc239e91b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-47b64ced27c24985.js → [...slug]-5c360f72e4498855.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{permissions-e5a4d3d815cec25d.js → permissions-fb29fa6c2bd90bb0.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-3b76fa959ffa09d3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-379e1ee292504842.js → [...slug]-3b787b42f1093b1f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles-0b83fbdd39e85f5b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-a1e6950974d643a8.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/{[...slug]-2af9afbe727d88aa.js → [...slug]-0aa019d87db8b0b8.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-a4db8710f703c729.js → users-88c694d19207f2ec.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{triggers-9cba3211434a8966.js → triggers-a599c6ac89be8c8d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-31d0d50f7f30462b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{webpack-d079359c241db804.js → webpack-ac7fdc472bedf682.js} +1 -1
- mage_ai/server/frontend_dist/block-layout.html +3 -3
- mage_ai/server/frontend_dist/compute.html +6 -6
- mage_ai/server/frontend_dist/files.html +6 -6
- mage_ai/server/frontend_dist/global-data-products/[...slug].html +6 -6
- mage_ai/server/frontend_dist/global-data-products.html +6 -6
- mage_ai/server/frontend_dist/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist/global-hooks.html +6 -6
- mage_ai/server/frontend_dist/index.html +3 -3
- mage_ai/server/frontend_dist/manage/files.html +6 -6
- mage_ai/server/frontend_dist/manage/settings.html +6 -6
- mage_ai/server/frontend_dist/manage/users/[user].html +6 -6
- mage_ai/server/frontend_dist/manage/users/new.html +6 -6
- mage_ai/server/frontend_dist/manage/users.html +6 -6
- mage_ai/server/frontend_dist/manage.html +6 -6
- mage_ai/server/frontend_dist/oauth.html +5 -5
- mage_ai/server/frontend_dist/overview.html +6 -6
- mage_ai/server/frontend_dist/pipeline-runs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +3 -3
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +3 -3
- mage_ai/server/frontend_dist/pipelines.html +6 -6
- mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist/platform/global-hooks.html +6 -6
- mage_ai/server/frontend_dist/settings/account/profile.html +6 -6
- mage_ai/server/frontend_dist/settings/platform/preferences.html +6 -6
- mage_ai/server/frontend_dist/settings/platform/settings.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/permissions.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/roles.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/users.html +6 -6
- mage_ai/server/frontend_dist/settings.html +3 -3
- mage_ai/server/frontend_dist/sign-in.html +15 -15
- mage_ai/server/frontend_dist/templates/[...slug].html +6 -6
- mage_ai/server/frontend_dist/templates.html +6 -6
- mage_ai/server/frontend_dist/terminal.html +6 -6
- mage_ai/server/frontend_dist/test.html +3 -3
- mage_ai/server/frontend_dist/triggers.html +6 -6
- mage_ai/server/frontend_dist/version-control.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/404.html +8 -8
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1376-22de38b4ad008d8a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-25a7d985d5564fd3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1668-30b4619b9534519b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1799-c42db95a015689ee.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2996-2108b53b9d371d8d.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{3548-fa0792ddb88f4646.js → 3548-9d26185b3fb663b1.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{3763-61b542dafdbf5754.js → 3763-40780c6d1e4b261d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-129dd2a2448a2e36.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3958-bcdfa414ccfa1eb2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4168-97fd1578d1a38315.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4982-fa5a238b139fbdd2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-176f445e1313f001.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7162-7dd03f0f605de721.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7779-68d2b72a90c5f925.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-5446a8e43711e2f9.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8023-6c2f172f48dcb99b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8095-c351b8a735d73e0c.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-8b8e100079ab69e1.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{main-70b78159c2bb3fe1.js → main-384298e9133cec76.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-13a578bce3b7f30c.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{block-layout-14f952f66964022f.js → block-layout-7f4b735c67115df5.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/[...slug]-e7d48e6b0c3068ac.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products-b943f31f050fc3a4.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-4bfc84ff07d7656f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{overview-597b74828bf105db.js → overview-9f1ac4ec003884f3.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipeline-runs-3edc6270c5b0e962.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-6d183f91a2ff6668.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-7e737f6fc7e83e9b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-38e1fbcfbfc1014e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-d94488e3f2eeef36.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-cc641a7fa8473796.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-a5c0362763a21fa8.js → block-runs-284309877f3c5a5a.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-26250e5335194ade.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-7acc7afc00df17c2.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-5f4c8128b2413fd8.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-4ebfc8e400315dda.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-e5e0150a256aadb3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-eb11c5390c982b49.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-1bdfda8edc9cf4a8.js → triggers-4612d15a65c35912.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/{profile-3f0df3decc856ee9.js → profile-3ae43c932537b254.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-b603d7fe4b175256.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-319ddbabc239e91b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-47b64ced27c24985.js → [...slug]-5c360f72e4498855.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{permissions-e5a4d3d815cec25d.js → permissions-fb29fa6c2bd90bb0.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-3b76fa959ffa09d3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-379e1ee292504842.js → [...slug]-3b787b42f1093b1f.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles-0b83fbdd39e85f5b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-a1e6950974d643a8.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/{[...slug]-2af9afbe727d88aa.js → [...slug]-0aa019d87db8b0b8.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-a4db8710f703c729.js → users-88c694d19207f2ec.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{triggers-9cba3211434a8966.js → triggers-a599c6ac89be8c8d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-31d0d50f7f30462b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{webpack-68c003fb6a175cd7.js → webpack-481689d9989710cd.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/kcptwoOU-JJJg6Vwpkfmx/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/block-layout.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/compute.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/files.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-hooks.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/index.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/manage/files.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/oauth.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/overview.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +3 -3
- mage_ai/server/frontend_dist_base_path_template/pipelines.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/sign-in.html +15 -15
- mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/templates.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/terminal.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/test.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/triggers.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/version-control.html +6 -6
- mage_ai/server/kernel_output_parser.py +4 -1
- mage_ai/server/scheduler_manager.py +12 -1
- mage_ai/server/server.py +69 -42
- mage_ai/server/utils/custom_output.py +284 -0
- mage_ai/server/utils/execute_custom_code.py +245 -0
- mage_ai/server/utils/output_display.py +123 -289
- mage_ai/server/websocket_server.py +116 -69
- mage_ai/services/aws/ecs/ecs.py +1 -0
- mage_ai/services/k8s/config.py +27 -4
- mage_ai/services/k8s/job_manager.py +6 -1
- mage_ai/services/k8s/utils.py +97 -0
- mage_ai/services/ssh/aws/emr/utils.py +8 -8
- mage_ai/settings/keys/auth.py +1 -0
- mage_ai/settings/platform/__init__.py +159 -38
- mage_ai/settings/platform/constants.py +5 -0
- mage_ai/settings/platform/utils.py +53 -10
- mage_ai/settings/repo.py +26 -12
- mage_ai/settings/server.py +128 -37
- mage_ai/shared/array.py +24 -1
- mage_ai/shared/complex.py +45 -0
- mage_ai/shared/config.py +2 -1
- mage_ai/shared/custom_logger.py +11 -0
- mage_ai/shared/dates.py +10 -6
- mage_ai/shared/files.py +63 -8
- mage_ai/shared/hash.py +33 -9
- mage_ai/shared/io.py +9 -5
- mage_ai/shared/models.py +82 -24
- mage_ai/shared/outputs.py +87 -0
- mage_ai/shared/parsers.py +144 -13
- mage_ai/shared/path_fixer.py +11 -7
- mage_ai/shared/singletons/__init__.py +0 -0
- mage_ai/shared/singletons/base.py +47 -0
- mage_ai/shared/singletons/memory.py +38 -0
- mage_ai/shared/strings.py +34 -1
- mage_ai/shared/yaml.py +24 -0
- mage_ai/streaming/sinks/oracledb.py +57 -0
- mage_ai/streaming/sinks/sink_factory.py +4 -0
- mage_ai/system/__init__.py +0 -0
- mage_ai/system/constants.py +14 -0
- mage_ai/system/memory/__init__.py +0 -0
- mage_ai/system/memory/constants.py +1 -0
- mage_ai/system/memory/manager.py +174 -0
- mage_ai/system/memory/presenters.py +158 -0
- mage_ai/system/memory/process.py +216 -0
- mage_ai/system/memory/samples.py +13 -0
- mage_ai/system/memory/utils.py +656 -0
- mage_ai/system/memory/wrappers.py +177 -0
- mage_ai/system/models.py +58 -0
- mage_ai/system/storage/__init__.py +0 -0
- mage_ai/system/storage/utils.py +29 -0
- mage_ai/tests/api/endpoints/mixins.py +2 -2
- mage_ai/tests/api/endpoints/test_blocks.py +2 -1
- mage_ai/tests/api/endpoints/test_custom_designs.py +4 -4
- mage_ai/tests/api/endpoints/test_pipeline_runs.py +2 -2
- mage_ai/tests/api/endpoints/test_projects.py +2 -1
- mage_ai/tests/api/operations/base/mixins.py +1 -1
- mage_ai/tests/api/operations/base/test_base.py +27 -27
- mage_ai/tests/api/operations/base/test_base_with_user_authentication.py +27 -27
- mage_ai/tests/api/operations/base/test_base_with_user_permissions.py +23 -23
- mage_ai/tests/api/operations/test_syncs.py +6 -4
- mage_ai/tests/api/resources/test_pipeline_resource.py +11 -4
- mage_ai/tests/authentication/oauth/test_utils.py +1 -1
- mage_ai/tests/authentication/providers/test_oidc.py +59 -0
- mage_ai/tests/base_test.py +2 -2
- mage_ai/tests/data/__init__.py +0 -0
- mage_ai/tests/data/models/__init__.py +0 -0
- mage_ai/tests/data_preparation/executors/test_block_executor.py +23 -16
- mage_ai/tests/data_preparation/git/test_git.py +4 -1
- mage_ai/tests/data_preparation/models/block/dynamic/test_combos.py +305 -0
- mage_ai/tests/data_preparation/models/block/dynamic/test_counter.py +212 -0
- mage_ai/tests/data_preparation/models/block/dynamic/test_factory.py +360 -0
- mage_ai/tests/data_preparation/models/block/dynamic/test_variables.py +332 -0
- mage_ai/tests/data_preparation/models/block/hook/test_hook_block.py +2 -2
- mage_ai/tests/data_preparation/models/block/platform/test_mixins.py +1 -1
- mage_ai/tests/data_preparation/models/block/sql/utils/test_shared.py +26 -1
- mage_ai/tests/data_preparation/models/block/test_global_data_product.py +5 -2
- mage_ai/tests/data_preparation/models/custom_templates/test_utils.py +5 -4
- mage_ai/tests/data_preparation/models/global_hooks/test_hook.py +3 -0
- mage_ai/tests/data_preparation/models/global_hooks/test_predicates.py +9 -3
- mage_ai/tests/data_preparation/models/test_block.py +115 -120
- mage_ai/tests/data_preparation/models/test_blocks_helper.py +114 -0
- mage_ai/tests/data_preparation/models/test_global_data_product.py +41 -24
- mage_ai/tests/data_preparation/models/test_pipeline.py +9 -6
- mage_ai/tests/data_preparation/models/test_project.py +4 -1
- mage_ai/tests/data_preparation/models/test_utils.py +80 -0
- mage_ai/tests/data_preparation/models/test_variable.py +242 -69
- mage_ai/tests/data_preparation/models/variables/__init__.py +0 -0
- mage_ai/tests/data_preparation/models/variables/test_summarizer.py +481 -0
- mage_ai/tests/data_preparation/storage/shared/__init__.py +0 -0
- mage_ai/tests/data_preparation/test_repo_manager.py +6 -7
- mage_ai/tests/data_preparation/test_variable_manager.py +57 -48
- mage_ai/tests/factory.py +64 -43
- mage_ai/tests/orchestration/db/models/test_schedules.py +3 -3
- mage_ai/tests/orchestration/db/models/test_schedules_dynamic_blocks.py +279 -0
- mage_ai/tests/orchestration/test_pipeline_scheduler.py +1 -0
- mage_ai/tests/orchestration/triggers/test_global_data_product.py +141 -138
- mage_ai/tests/orchestration/triggers/test_utils.py +3 -2
- mage_ai/tests/server/test_server.py +19 -0
- mage_ai/tests/services/k8s/test_job_manager.py +27 -6
- mage_ai/tests/streaming/sinks/test_oracledb.py +38 -0
- mage_ai/tests/test_shared.py +61 -0
- mage_ai/usage_statistics/logger.py +7 -2
- mage_ai/utils/code.py +33 -19
- mage_ai/version_control/branch/utils.py +2 -1
- mage_ai/version_control/models.py +3 -2
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/METADATA +6 -3
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/RECORD +555 -454
- mage_ai/data_preparation/models/global_data_product/constants.py +0 -6
- mage_ai/server/frontend_dist/_next/static/_krrrgup_C-dPOpX36S8I/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1557-df144fbd8b2208c3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2631-b9f9bea3f1cf906d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3782-ef4cd4f0b52072d0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/4783-422429203610c318.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5699-6d708c6b2153ea08.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/635-0d6b7c8804bcd2dc.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7022-0d52dd8868621fb0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7361-8a23dd8360593e7a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7966-f07b2913f7326b50.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8095-bdce03896ef9639a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8146-6bed4e7401e067e6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9265-d2a1aaec75ec69b8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9440-4069842b90d4b801.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9624-59b2f803f9c88cd6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9832-67896490f6e8a014.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-d9c89527266296f7.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/[...slug]-591abd392dc50ed4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products-78e8e88f2a757a18.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-852d403c7bda21b3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-95ffcd3e2b27e567.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-1ed9045b2f1dfd65.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-f028ef3880ed856c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles-36fa165a48af586b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/KLL5mirre9d7_ZeEpaw3s/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-df144fbd8b2208c3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2631-b9f9bea3f1cf906d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-ef4cd4f0b52072d0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4783-422429203610c318.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-6d708c6b2153ea08.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/635-0d6b7c8804bcd2dc.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7022-0d52dd8868621fb0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-8a23dd8360593e7a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-f07b2913f7326b50.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8095-bdce03896ef9639a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8146-6bed4e7401e067e6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9265-d2a1aaec75ec69b8.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9440-4069842b90d4b801.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-59b2f803f9c88cd6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9832-67896490f6e8a014.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-d9c89527266296f7.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/[...slug]-591abd392dc50ed4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products-78e8e88f2a757a18.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-852d403c7bda21b3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-95ffcd3e2b27e567.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-1ed9045b2f1dfd65.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-f028ef3880ed856c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles-36fa165a48af586b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +0 -1
- mage_ai/shared/memory.py +0 -90
- mage_ai/tests/data_preparation/models/block/dynamic/test_dynamic_helpers.py +0 -48
- /mage_ai/{tests/data_preparation/shared → ai/utils}/__init__.py +0 -0
- /mage_ai/server/frontend_dist/_next/static/{_krrrgup_C-dPOpX36S8I → UZLabyPgcxtZvp0O0EUUS}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{KLL5mirre9d7_ZeEpaw3s → kcptwoOU-JJJg6Vwpkfmx}/_ssgManifest.js +0 -0
- /mage_ai/tests/data_preparation/{shared → storage/shared}/test_secrets.py +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
+
import base64
|
|
2
3
|
import json
|
|
3
4
|
import multiprocessing
|
|
4
5
|
import os
|
|
@@ -9,6 +10,7 @@ from datetime import datetime, timedelta
|
|
|
9
10
|
from distutils.file_util import copy_file
|
|
10
11
|
from typing import Dict, List
|
|
11
12
|
|
|
13
|
+
import simplejson
|
|
12
14
|
import tornado.websocket
|
|
13
15
|
from jupyter_client import KernelClient
|
|
14
16
|
|
|
@@ -127,8 +129,9 @@ def run_pipeline(
|
|
|
127
129
|
)
|
|
128
130
|
except Exception:
|
|
129
131
|
trace = traceback.format_exc().splitlines()
|
|
130
|
-
add_pipeline_message(
|
|
131
|
-
|
|
132
|
+
add_pipeline_message(
|
|
133
|
+
f'Pipeline {pipeline.uuid} execution failed with error:', metadata=metadata
|
|
134
|
+
)
|
|
132
135
|
add_pipeline_message(trace, execution_state='idle', metadata=metadata)
|
|
133
136
|
|
|
134
137
|
if pipeline.type == PipelineType.PYTHON:
|
|
@@ -186,45 +189,54 @@ class WebSocketServer(tornado.websocket.WebSocketHandler):
|
|
|
186
189
|
token = message.get('token')
|
|
187
190
|
|
|
188
191
|
pipeline_uuid = message.get('pipeline_uuid')
|
|
192
|
+
oauth_client, oauth_token, user = None, None, None
|
|
193
|
+
|
|
194
|
+
if api_key and token:
|
|
195
|
+
oauth_client = Oauth2Application.query.filter(
|
|
196
|
+
Oauth2Application.client_id == api_key,
|
|
197
|
+
).first()
|
|
198
|
+
if oauth_client:
|
|
199
|
+
oauth_token, _ = authenticate_client_and_token(oauth_client.id, token)
|
|
200
|
+
if oauth_token:
|
|
201
|
+
user = oauth_token.user
|
|
202
|
+
|
|
203
|
+
repo_path = get_repo_path(user=user)
|
|
189
204
|
pipeline = None
|
|
190
205
|
if pipeline_uuid:
|
|
191
206
|
pipeline = Pipeline.get(
|
|
192
207
|
pipeline_uuid,
|
|
193
|
-
repo_path=get_repo_path(),
|
|
194
208
|
all_projects=project_platform_activated(),
|
|
209
|
+
repo_path=repo_path,
|
|
210
|
+
use_repo_path=True,
|
|
195
211
|
)
|
|
196
212
|
|
|
197
213
|
if REQUIRE_USER_AUTHENTICATION or DISABLE_NOTEBOOK_EDIT_ACCESS:
|
|
198
214
|
valid = not REQUIRE_USER_AUTHENTICATION
|
|
199
215
|
|
|
200
|
-
if
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
valid = True
|
|
225
|
-
except ApiError as err:
|
|
226
|
-
print(f'[WARNING] WebSocketServer.on_message: {err}.')
|
|
227
|
-
valid = False
|
|
216
|
+
if oauth_client:
|
|
217
|
+
valid = (oauth_token is not None) and oauth_token.is_valid()
|
|
218
|
+
if valid and oauth_token and user:
|
|
219
|
+
try:
|
|
220
|
+
if pipeline_uuid:
|
|
221
|
+
await PipelineResource.policy_class()(
|
|
222
|
+
PipelineResource(
|
|
223
|
+
pipeline,
|
|
224
|
+
user,
|
|
225
|
+
),
|
|
226
|
+
user,
|
|
227
|
+
).authorize_action(action=OperationType.UPDATE)
|
|
228
|
+
else:
|
|
229
|
+
await ProjectResource.policy_class()(
|
|
230
|
+
ProjectResource(
|
|
231
|
+
{},
|
|
232
|
+
user,
|
|
233
|
+
),
|
|
234
|
+
user,
|
|
235
|
+
).authorize_action(action=OperationType.UPDATE)
|
|
236
|
+
valid = True
|
|
237
|
+
except ApiError as err:
|
|
238
|
+
print(f'[WARNING] WebSocketServer.on_message: {err}.')
|
|
239
|
+
valid = False
|
|
228
240
|
|
|
229
241
|
if not valid or DISABLE_NOTEBOOK_EDIT_ACCESS == 1:
|
|
230
242
|
return self.send_message(
|
|
@@ -300,14 +312,19 @@ class WebSocketServer(tornado.websocket.WebSocketHandler):
|
|
|
300
312
|
@classmethod
|
|
301
313
|
def send_message(cls, message: dict) -> None:
|
|
302
314
|
def should_filter_message(message):
|
|
303
|
-
if
|
|
304
|
-
|
|
315
|
+
if (
|
|
316
|
+
message.get('data') is None
|
|
317
|
+
and message.get('error') is None
|
|
318
|
+
and message.get('execution_state') is None
|
|
319
|
+
and message.get('type') is None
|
|
320
|
+
):
|
|
305
321
|
return True
|
|
306
322
|
|
|
307
323
|
try:
|
|
308
324
|
# Filter out messages meant for jupyter widgets that we can't render
|
|
309
|
-
if message.get('msg_type') == 'display_data' and
|
|
310
|
-
|
|
325
|
+
if message.get('msg_type') == 'display_data' and message.get('data')[0].startswith(
|
|
326
|
+
'FloatProgress'
|
|
327
|
+
):
|
|
311
328
|
return True
|
|
312
329
|
except IndexError:
|
|
313
330
|
pass
|
|
@@ -327,8 +344,12 @@ class WebSocketServer(tornado.websocket.WebSocketHandler):
|
|
|
327
344
|
msg_id = message.get('msg_id')
|
|
328
345
|
if msg_id is None:
|
|
329
346
|
return
|
|
330
|
-
if
|
|
331
|
-
|
|
347
|
+
if (
|
|
348
|
+
message.get('data') is None
|
|
349
|
+
and message.get('error') is None
|
|
350
|
+
and message.get('execution_state') is None
|
|
351
|
+
and message.get('type') is None
|
|
352
|
+
):
|
|
332
353
|
return
|
|
333
354
|
|
|
334
355
|
if should_filter_message(message):
|
|
@@ -337,8 +358,11 @@ class WebSocketServer(tornado.websocket.WebSocketHandler):
|
|
|
337
358
|
message = filter_out_sensitive_data(message)
|
|
338
359
|
|
|
339
360
|
execution_metadata = message.get('execution_metadata')
|
|
340
|
-
msg_id_value =
|
|
361
|
+
msg_id_value = (
|
|
362
|
+
execution_metadata
|
|
363
|
+
if execution_metadata is not None
|
|
341
364
|
else WebSocketServer.running_executions_mapping.get(msg_id, dict())
|
|
365
|
+
)
|
|
342
366
|
block_type = msg_id_value.get('block_type')
|
|
343
367
|
block_uuid = msg_id_value.get('block_uuid')
|
|
344
368
|
replicated_block = msg_id_value.get('replicated_block')
|
|
@@ -410,12 +434,12 @@ class WebSocketServer(tornado.websocket.WebSocketHandler):
|
|
|
410
434
|
if is_disable_pipeline_edit_access():
|
|
411
435
|
custom_code = block.content
|
|
412
436
|
|
|
413
|
-
reload_all_repo_modules(custom_code)
|
|
414
|
-
|
|
415
437
|
code = custom_code
|
|
416
438
|
|
|
417
439
|
client = self.init_kernel_client(kernel_name)
|
|
418
440
|
|
|
441
|
+
reload_all_repo_modules(custom_code, client)
|
|
442
|
+
|
|
419
443
|
value = dict(
|
|
420
444
|
block_type=block_type or block.type,
|
|
421
445
|
block_uuid=block_uuid,
|
|
@@ -441,26 +465,37 @@ class WebSocketServer(tornado.websocket.WebSocketHandler):
|
|
|
441
465
|
|
|
442
466
|
execution_uuid = None
|
|
443
467
|
# Need to cache everything here
|
|
444
|
-
if
|
|
445
|
-
|
|
446
|
-
|
|
468
|
+
if (
|
|
469
|
+
block.should_track_spark()
|
|
470
|
+
and ComputeServiceUUID.AWS_EMR == block.compute_service_uuid
|
|
471
|
+
):
|
|
447
472
|
execution_uuid = str(uuid.uuid4()).split('-')[0]
|
|
448
473
|
block.clear_spark_jobs_cache()
|
|
449
474
|
block.cache_spark_application()
|
|
450
475
|
block.set_spark_job_execution_start(execution_uuid=execution_uuid)
|
|
451
476
|
|
|
477
|
+
pipeline_config = pipeline.get_config_from_yaml()
|
|
478
|
+
repo_config = pipeline.repo_config.to_dict(remote=remote_execution)
|
|
479
|
+
|
|
452
480
|
code = add_execution_code(
|
|
453
481
|
pipeline_uuid,
|
|
454
482
|
block_uuid,
|
|
455
483
|
custom_code,
|
|
456
484
|
global_vars,
|
|
485
|
+
pipeline.repo_path,
|
|
457
486
|
block_type=block_type,
|
|
458
487
|
execution_uuid=execution_uuid,
|
|
459
488
|
extension_uuid=extension_uuid,
|
|
460
489
|
kernel_name=kernel_name,
|
|
461
490
|
output_messages_to_logs=output_messages_to_logs,
|
|
462
|
-
pipeline_config=
|
|
463
|
-
|
|
491
|
+
pipeline_config=pipeline_config,
|
|
492
|
+
pipeline_config_json_encoded=base64.b64encode(
|
|
493
|
+
simplejson.dumps(pipeline_config).encode()
|
|
494
|
+
).decode(),
|
|
495
|
+
repo_config=repo_config,
|
|
496
|
+
repo_config_json_encoded=base64.b64encode(
|
|
497
|
+
simplejson.dumps(repo_config).encode()
|
|
498
|
+
).decode(),
|
|
464
499
|
# repo_config=get_repo_config().to_dict(remote=remote_execution),
|
|
465
500
|
run_incomplete_upstream=run_incomplete_upstream,
|
|
466
501
|
# The UI can execute a block and send run_settings to control the behavior
|
|
@@ -486,13 +521,21 @@ db_connection.start_session()
|
|
|
486
521
|
"""
|
|
487
522
|
client.execute(initialize_db_connection)
|
|
488
523
|
|
|
489
|
-
msg_id = client.execute(
|
|
524
|
+
msg_id = client.execute(
|
|
525
|
+
add_internal_output_info(
|
|
526
|
+
block,
|
|
527
|
+
code,
|
|
528
|
+
extension_uuid=extension_uuid,
|
|
529
|
+
widget=widget,
|
|
530
|
+
)
|
|
531
|
+
)
|
|
490
532
|
|
|
491
533
|
WebSocketServer.running_executions_mapping[msg_id] = value
|
|
492
534
|
|
|
493
535
|
block_output_process_code = get_block_output_process_code(
|
|
494
536
|
pipeline_uuid,
|
|
495
537
|
block_uuid,
|
|
538
|
+
pipeline.repo_path,
|
|
496
539
|
block_type=block_type,
|
|
497
540
|
kernel_name=kernel_name,
|
|
498
541
|
)
|
|
@@ -505,14 +548,18 @@ db_connection.start_session()
|
|
|
505
548
|
if BlockType.CHART != downstream_block.type:
|
|
506
549
|
continue
|
|
507
550
|
|
|
508
|
-
await self.on_message(
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
551
|
+
await self.on_message(
|
|
552
|
+
json.dumps(
|
|
553
|
+
dict(
|
|
554
|
+
api_key=message.get('api_key'),
|
|
555
|
+
code=downstream_block.file.content(),
|
|
556
|
+
pipeline_uuid=pipeline_uuid,
|
|
557
|
+
token=message.get('token'),
|
|
558
|
+
type=downstream_block.type,
|
|
559
|
+
uuid=downstream_block.uuid,
|
|
560
|
+
)
|
|
561
|
+
)
|
|
562
|
+
)
|
|
516
563
|
|
|
517
564
|
def __execute_pipeline(
|
|
518
565
|
self,
|
|
@@ -525,6 +572,7 @@ db_connection.start_session()
|
|
|
525
572
|
if kernel_name == KernelName.PYSPARK:
|
|
526
573
|
code = get_pipeline_execution_code(
|
|
527
574
|
pipeline_uuid,
|
|
575
|
+
pipeline.repo_path,
|
|
528
576
|
global_vars=global_vars,
|
|
529
577
|
kernel_name=kernel_name,
|
|
530
578
|
pipeline_config=pipeline.to_dict(include_content=True),
|
|
@@ -534,9 +582,7 @@ db_connection.start_session()
|
|
|
534
582
|
client = self.init_kernel_client(kernel_name)
|
|
535
583
|
msg_id = client.execute(code)
|
|
536
584
|
|
|
537
|
-
WebSocketServer.running_executions_mapping[msg_id] = dict(
|
|
538
|
-
pipeline_uuid=pipeline_uuid
|
|
539
|
-
)
|
|
585
|
+
WebSocketServer.running_executions_mapping[msg_id] = dict(pipeline_uuid=pipeline_uuid)
|
|
540
586
|
else:
|
|
541
587
|
# TODO: save config for other kernel types.
|
|
542
588
|
def save_pipeline_config() -> str:
|
|
@@ -571,8 +617,7 @@ db_connection.start_session()
|
|
|
571
617
|
|
|
572
618
|
queue = multiprocessing.Queue()
|
|
573
619
|
proc = multiprocessing.Process(
|
|
574
|
-
target=run_pipeline,
|
|
575
|
-
args=(pipeline, config_copy_path, global_vars, queue)
|
|
620
|
+
target=run_pipeline, args=(pipeline, config_copy_path, global_vars, queue)
|
|
576
621
|
)
|
|
577
622
|
proc.start()
|
|
578
623
|
set_current_pipeline_process(proc)
|
|
@@ -590,8 +635,7 @@ db_connection.start_session()
|
|
|
590
635
|
metadata=metadata,
|
|
591
636
|
msg_type=msg.get('msg_type'),
|
|
592
637
|
)
|
|
593
|
-
if execution_state == 'idle' and
|
|
594
|
-
metadata.get('block_uuid') is None:
|
|
638
|
+
if execution_state == 'idle' and metadata.get('block_uuid') is None:
|
|
595
639
|
loop = False
|
|
596
640
|
break
|
|
597
641
|
await asyncio.sleep(0.5)
|
|
@@ -658,9 +702,9 @@ db_connection.start_session()
|
|
|
658
702
|
|
|
659
703
|
try:
|
|
660
704
|
if initial_idx and end_idx:
|
|
661
|
-
return error[:initial_idx - 1] + error[end_idx:]
|
|
705
|
+
return error[: initial_idx - 1] + error[end_idx:]
|
|
662
706
|
elif initial_idx and custom_block_end_idx:
|
|
663
|
-
return error[:initial_idx - 1] + error[custom_block_end_idx:]
|
|
707
|
+
return error[: initial_idx - 1] + error[custom_block_end_idx:]
|
|
664
708
|
except Exception:
|
|
665
709
|
pass
|
|
666
710
|
|
|
@@ -672,6 +716,7 @@ class StreamBlockOutputToQueue(object):
|
|
|
672
716
|
Fake file-like stream object that redirects block output to a queue
|
|
673
717
|
to be streamed to the websocket.
|
|
674
718
|
"""
|
|
719
|
+
|
|
675
720
|
def __init__(
|
|
676
721
|
self,
|
|
677
722
|
queue,
|
|
@@ -690,9 +735,11 @@ class StreamBlockOutputToQueue(object):
|
|
|
690
735
|
|
|
691
736
|
def write(self, buf):
|
|
692
737
|
for line in buf.rstrip().splitlines():
|
|
693
|
-
self.queue.put(
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
738
|
+
self.queue.put(
|
|
739
|
+
dict(
|
|
740
|
+
message=f'[{self.block_uuid}] {line.rstrip()}',
|
|
741
|
+
execution_state=self.execution_state,
|
|
742
|
+
metadata=self.metadata,
|
|
743
|
+
msg_type=self.msg_type,
|
|
744
|
+
)
|
|
745
|
+
)
|
mage_ai/services/aws/ecs/ecs.py
CHANGED
|
@@ -16,6 +16,7 @@ def run_task(
|
|
|
16
16
|
response = client.run_task(**ecs_config.get_task_config(command=command))
|
|
17
17
|
|
|
18
18
|
print(json.dumps(response, indent=4, default=str))
|
|
19
|
+
wait_for_completion = False if ecs_config.wait_timeout == -1 else wait_for_completion
|
|
19
20
|
|
|
20
21
|
if wait_for_completion:
|
|
21
22
|
arn = response['tasks'][0]['taskArn']
|
mage_ai/services/k8s/config.py
CHANGED
|
@@ -2,12 +2,13 @@ from dataclasses import dataclass
|
|
|
2
2
|
from typing import Dict
|
|
3
3
|
|
|
4
4
|
from kubernetes.client import (
|
|
5
|
-
V1Affinity,
|
|
6
5
|
V1Container,
|
|
7
6
|
V1EnvVar,
|
|
7
|
+
V1JobSpec,
|
|
8
8
|
V1LocalObjectReference,
|
|
9
9
|
V1ObjectMeta,
|
|
10
10
|
V1PodSpec,
|
|
11
|
+
V1PodTemplateSpec,
|
|
11
12
|
V1ResourceRequirements,
|
|
12
13
|
V1Toleration,
|
|
13
14
|
V1Volume,
|
|
@@ -15,8 +16,9 @@ from kubernetes.client import (
|
|
|
15
16
|
)
|
|
16
17
|
|
|
17
18
|
from mage_ai.services.k8s.constants import CONFIG_FILE, DEFAULT_NAMESPACE
|
|
19
|
+
from mage_ai.services.k8s.utils import parse_affinity_config
|
|
18
20
|
from mage_ai.shared.config import BaseConfig
|
|
19
|
-
from mage_ai.shared.hash import
|
|
21
|
+
from mage_ai.shared.hash import get_safe_value
|
|
20
22
|
|
|
21
23
|
# import traceback
|
|
22
24
|
|
|
@@ -43,8 +45,10 @@ class K8sExecutorConfig(BaseConfig):
|
|
|
43
45
|
metadata: Dict = None
|
|
44
46
|
container: Dict = None
|
|
45
47
|
pod: Dict = None
|
|
48
|
+
job: Dict = None
|
|
46
49
|
# parsed k8s objects
|
|
47
50
|
pod_config: V1PodSpec = None
|
|
51
|
+
job_config: V1JobSpec = None
|
|
48
52
|
meta: V1ObjectMeta = None
|
|
49
53
|
|
|
50
54
|
@classmethod
|
|
@@ -61,8 +65,8 @@ class K8sExecutorConfig(BaseConfig):
|
|
|
61
65
|
executor_config.pod.get('service_account_name') or DEFAULT_SERVICE_ACCOUNT_NAME
|
|
62
66
|
)
|
|
63
67
|
if executor_config.pod.get('affinity'):
|
|
64
|
-
affinity
|
|
65
|
-
|
|
68
|
+
# Convert the affinity to a V1Affinity object
|
|
69
|
+
affinity = parse_affinity_config(executor_config.pod['affinity'])
|
|
66
70
|
|
|
67
71
|
if executor_config.pod.get('tolerations'):
|
|
68
72
|
tolerations += [V1Toleration(**e) for e in executor_config.pod['tolerations']]
|
|
@@ -119,6 +123,25 @@ class K8sExecutorConfig(BaseConfig):
|
|
|
119
123
|
tolerations=tolerations,
|
|
120
124
|
volumes=volumes,
|
|
121
125
|
)
|
|
126
|
+
|
|
127
|
+
active_deadline_seconds = None
|
|
128
|
+
backoff_limit = 0
|
|
129
|
+
ttl_seconds_after_finished = None
|
|
130
|
+
|
|
131
|
+
if executor_config.job:
|
|
132
|
+
active_deadline_seconds = executor_config.job.get('active_deadline_seconds')
|
|
133
|
+
backoff_limit = executor_config.job.get('backoff_limit')
|
|
134
|
+
ttl_seconds_after_finished = executor_config.job.get('ttl_seconds_after_finished')
|
|
135
|
+
|
|
136
|
+
executor_config.job_config = V1JobSpec(
|
|
137
|
+
active_deadline_seconds=active_deadline_seconds,
|
|
138
|
+
backoff_limit=backoff_limit,
|
|
139
|
+
ttl_seconds_after_finished=ttl_seconds_after_finished,
|
|
140
|
+
template=V1PodTemplateSpec(
|
|
141
|
+
spec=executor_config.pod_config
|
|
142
|
+
)
|
|
143
|
+
)
|
|
144
|
+
|
|
122
145
|
return executor_config
|
|
123
146
|
|
|
124
147
|
@classmethod
|
|
@@ -137,7 +137,12 @@ class JobManager():
|
|
|
137
137
|
)
|
|
138
138
|
|
|
139
139
|
# Create the specification of deployment
|
|
140
|
-
spec = client.V1JobSpec(
|
|
140
|
+
spec = client.V1JobSpec(
|
|
141
|
+
template=template,
|
|
142
|
+
active_deadline_seconds=k8s_config.job_config.active_deadline_seconds,
|
|
143
|
+
backoff_limit=k8s_config.job_config.backoff_limit,
|
|
144
|
+
ttl_seconds_after_finished=k8s_config.job_config.ttl_seconds_after_finished)
|
|
145
|
+
|
|
141
146
|
# Instantiate the job object
|
|
142
147
|
job = client.V1Job(
|
|
143
148
|
api_version=self.api_version,
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
from kubernetes import client
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def parse_affinity_config(affinity_config):
|
|
5
|
+
if not affinity_config:
|
|
6
|
+
return None
|
|
7
|
+
|
|
8
|
+
affinity = client.V1Affinity(
|
|
9
|
+
node_affinity=parse_node_affinity(affinity_config.get('nodeAffinity')),
|
|
10
|
+
pod_affinity=parse_pod_affinity(affinity_config.get('podAffinity')),
|
|
11
|
+
pod_anti_affinity=parse_pod_anti_affinity(affinity_config.get('podAntiAffinity'))
|
|
12
|
+
)
|
|
13
|
+
return affinity
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def parse_node_affinity(node_affinity_config):
|
|
17
|
+
if not node_affinity_config:
|
|
18
|
+
return None
|
|
19
|
+
|
|
20
|
+
required_terms = node_affinity_config.get(
|
|
21
|
+
'requiredDuringSchedulingIgnoredDuringExecution', {}).get('nodeSelectorTerms', [])
|
|
22
|
+
node_selector_terms = []
|
|
23
|
+
for term in required_terms:
|
|
24
|
+
match_expressions = [client.V1NodeSelectorRequirement(
|
|
25
|
+
key=expr.get('key'),
|
|
26
|
+
operator=expr.get('operator'),
|
|
27
|
+
values=expr.get('values')
|
|
28
|
+
) for expr in term.get('matchExpressions', [])]
|
|
29
|
+
|
|
30
|
+
node_selector_terms.append(client.V1NodeSelectorTerm(match_expressions=match_expressions))
|
|
31
|
+
|
|
32
|
+
return client.V1NodeAffinity(
|
|
33
|
+
required_during_scheduling_ignored_during_execution=client.V1NodeSelector(
|
|
34
|
+
node_selector_terms=node_selector_terms)
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def parse_pod_affinity(pod_affinity_config):
|
|
39
|
+
if not pod_affinity_config:
|
|
40
|
+
return None
|
|
41
|
+
|
|
42
|
+
required_terms = pod_affinity_config.get('requiredDuringSchedulingIgnoredDuringExecution', [])
|
|
43
|
+
preferred_terms = pod_affinity_config.get('preferredDuringSchedulingIgnoredDuringExecution', [])
|
|
44
|
+
|
|
45
|
+
required_affinity = parse_affinity_term_list(required_terms)
|
|
46
|
+
preferred_affinity = parse_affinity_term_list(preferred_terms)
|
|
47
|
+
|
|
48
|
+
return client.V1PodAffinity(
|
|
49
|
+
required_during_scheduling_ignored_during_execution=required_affinity,
|
|
50
|
+
preferred_during_scheduling_ignored_during_execution=preferred_affinity
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def parse_pod_anti_affinity(pod_anti_affinity_config):
|
|
55
|
+
if not pod_anti_affinity_config:
|
|
56
|
+
return None
|
|
57
|
+
|
|
58
|
+
required_terms = pod_anti_affinity_config.get(
|
|
59
|
+
'requiredDuringSchedulingIgnoredDuringExecution', [])
|
|
60
|
+
preferred_terms = pod_anti_affinity_config.get(
|
|
61
|
+
'preferredDuringSchedulingIgnoredDuringExecution', [])
|
|
62
|
+
|
|
63
|
+
required_affinity = parse_affinity_term_list(required_terms)
|
|
64
|
+
preferred_affinity = parse_affinity_term_list(preferred_terms)
|
|
65
|
+
|
|
66
|
+
return client.V1PodAntiAffinity(
|
|
67
|
+
required_during_scheduling_ignored_during_execution=required_affinity,
|
|
68
|
+
preferred_during_scheduling_ignored_during_execution=preferred_affinity
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def parse_affinity_term_list(term_list):
|
|
73
|
+
if not term_list:
|
|
74
|
+
return None
|
|
75
|
+
|
|
76
|
+
affinity_term_list = []
|
|
77
|
+
for term in term_list:
|
|
78
|
+
label_selector = client.V1LabelSelector(
|
|
79
|
+
match_labels=term.get('labelSelector', {}).get('matchLabels', {}),
|
|
80
|
+
match_expressions=[client.V1LabelSelectorRequirement(
|
|
81
|
+
key=expr.get('key'),
|
|
82
|
+
operator=expr.get('operator'),
|
|
83
|
+
values=expr.get('values')
|
|
84
|
+
) for expr in term.get('labelSelector', {}).get('matchExpressions', [])]
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
topology_key = term.get('topologyKey')
|
|
88
|
+
|
|
89
|
+
affinity_term_list.append(client.V1WeightedPodAffinityTerm(
|
|
90
|
+
weight=term.get('weight'),
|
|
91
|
+
pod_affinity_term=client.V1PodAffinityTerm(
|
|
92
|
+
label_selector=label_selector,
|
|
93
|
+
topology_key=topology_key
|
|
94
|
+
)
|
|
95
|
+
))
|
|
96
|
+
|
|
97
|
+
return affinity_term_list
|
|
@@ -32,6 +32,14 @@ def should_tunnel(
|
|
|
32
32
|
if not project:
|
|
33
33
|
project = Project()
|
|
34
34
|
|
|
35
|
+
if not project.emr_config:
|
|
36
|
+
error_message = 'Project has incomplete configuration for AWS EMR.'
|
|
37
|
+
|
|
38
|
+
if raise_error:
|
|
39
|
+
raise Exception(error_message)
|
|
40
|
+
else:
|
|
41
|
+
return False
|
|
42
|
+
|
|
35
43
|
if not project.is_feature_enabled(FeatureUUID.COMPUTE_MANAGEMENT):
|
|
36
44
|
error_message = 'Compute management feature isn’t enabled. '\
|
|
37
45
|
'Turn the feature on in the project’s settings.'
|
|
@@ -53,14 +61,6 @@ def should_tunnel(
|
|
|
53
61
|
else:
|
|
54
62
|
return False
|
|
55
63
|
|
|
56
|
-
if not project.emr_config:
|
|
57
|
-
error_message = 'Project has incomplete configuration for AWS EMR.'
|
|
58
|
-
|
|
59
|
-
if raise_error:
|
|
60
|
-
raise Exception(error_message)
|
|
61
|
-
else:
|
|
62
|
-
return False
|
|
63
|
-
|
|
64
64
|
ec2_key_name = project.emr_config.get('ec2_key_name')
|
|
65
65
|
ec2_key_path = project.emr_config.get('ec2_key_path')
|
|
66
66
|
|
mage_ai/settings/keys/auth.py
CHANGED