mage-ai 0.9.70__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/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 -138
- 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 +46 -9
- 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/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 +250 -123
- mage_ai/api/resources/PipelineRunResource.py +11 -3
- mage_ai/api/resources/PipelineScheduleResource.py +7 -2
- mage_ai/api/resources/PipelineTriggerResource.py +6 -1
- mage_ai/api/resources/ProjectResource.py +18 -7
- 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 +1 -1
- 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 +32 -4
- 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/manage.py +1 -1
- mage_ai/cluster_manager/workspace/base.py +1 -1
- mage_ai/command_center/applications/factory.py +10 -7
- mage_ai/command_center/files/factory.py +17 -15
- 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/streaming_pipeline_executor.py +1 -1
- mage_ai/data_preparation/git/__init__.py +27 -7
- mage_ai/data_preparation/git/api.py +7 -1
- mage_ai/data_preparation/git/utils.py +22 -16
- mage_ai/data_preparation/logging/logger_manager.py +4 -3
- mage_ai/data_preparation/models/block/__init__.py +1542 -878
- 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 +291 -168
- 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 +10 -1
- 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/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 +127 -70
- mage_ai/data_preparation/models/constants.py +19 -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 +88 -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 +365 -180
- 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 +120 -24
- 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 +6 -3
- 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/models/dynamic/__init__.py +0 -0
- mage_ai/orchestration/db/models/dynamic/controller.py +67 -0
- mage_ai/orchestration/db/models/oauth.py +2 -9
- mage_ai/orchestration/db/models/projects.py +10 -0
- mage_ai/orchestration/db/models/schedules.py +204 -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 +1 -0
- mage_ai/orchestration/pipeline_scheduler_original.py +32 -8
- 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 +12 -1
- 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 +5 -1
- mage_ai/server/api/triggers.py +3 -1
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +5 -5
- 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-b3502f3f1aa92ac7.js → 1557-25a7d985d5564fd3.js} +1 -1
- 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_base_path_template/_next/static/chunks/3763-61b542dafdbf5754.js → frontend_dist/_next/static/chunks/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/{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_base_path_template/_next/static/chunks/pages/overview-597b74828bf105db.js → frontend_dist/_next/static/chunks/pages/overview-9f1ac4ec003884f3.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-7181b086c93784d2.js → [...slug]-7e737f6fc7e83e9b.js} +1 -1
- 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/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-32985f3f7c7dd3ab.js → frontend_dist/_next/static/chunks/pages/settings/platform/preferences-b603d7fe4b175256.js} +1 -1
- 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/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 +12 -12
- 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 +5 -5
- 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-b3502f3f1aa92ac7.js → 1557-25a7d985d5564fd3.js} +1 -1
- 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/_next/static/chunks/3763-61b542dafdbf5754.js → frontend_dist_base_path_template/_next/static/chunks/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/{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/_next/static/chunks/pages/overview-597b74828bf105db.js → frontend_dist_base_path_template/_next/static/chunks/pages/overview-9f1ac4ec003884f3.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-7181b086c93784d2.js → [...slug]-7e737f6fc7e83e9b.js} +1 -1
- 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/settings/account/{profile-3f0df3decc856ee9.js → profile-3ae43c932537b254.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/platform/preferences-32985f3f7c7dd3ab.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-b603d7fe4b175256.js} +1 -1
- 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/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 +12 -12
- 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 +9 -0
- mage_ai/server/server.py +35 -31
- 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/k8s/config.py +23 -0
- mage_ai/services/k8s/job_manager.py +6 -1
- 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 +141 -15
- 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/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 +9 -2
- 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 +3 -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 +3 -2
- mage_ai/tests/orchestration/triggers/test_utils.py +3 -2
- mage_ai/tests/services/k8s/test_job_manager.py +18 -0
- 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-0.9.70.dist-info → mage_ai-0.9.71.dist-info}/METADATA +5 -2
- {mage_ai-0.9.70.dist-info → mage_ai-0.9.71.dist-info}/RECORD +513 -417
- mage_ai/data_preparation/models/global_data_product/constants.py +0 -6
- mage_ai/server/frontend_dist/_next/static/RhDiJSkcjCsh4xxX4BFBk/_buildManifest.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-b9b85ba10667e654.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/9832-67896490f6e8a014.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-2a69553d8c6eeb53.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/pipelines/[pipeline]/dashboard-95ffcd3e2b27e567.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-b645a6d13ab9fe3a.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/settings/workspace/preferences-349af617d05f001b.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-60d01d3887e31136.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-3433c8b22e8342aa.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/TdpLLFome13qvM0gXvpHs/_buildManifest.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-b9b85ba10667e654.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/9832-67896490f6e8a014.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-2a69553d8c6eeb53.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/pipelines/[pipeline]/dashboard-95ffcd3e2b27e567.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-b645a6d13ab9fe3a.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/settings/workspace/preferences-349af617d05f001b.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-60d01d3887e31136.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-3433c8b22e8342aa.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/{RhDiJSkcjCsh4xxX4BFBk → UZLabyPgcxtZvp0O0EUUS}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{TdpLLFome13qvM0gXvpHs → kcptwoOU-JJJg6Vwpkfmx}/_ssgManifest.js +0 -0
- /mage_ai/tests/data_preparation/{shared → storage/shared}/test_secrets.py +0 -0
- {mage_ai-0.9.70.dist-info → mage_ai-0.9.71.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.70.dist-info → mage_ai-0.9.71.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.70.dist-info → mage_ai-0.9.71.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.70.dist-info → mage_ai-0.9.71.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
from unittest.mock import patch
|
|
2
|
+
|
|
3
|
+
from mage_ai.data_preparation.models.block.settings.dynamic.constants import ModeType
|
|
4
|
+
from mage_ai.orchestration.db.models.schedules import BlockRun
|
|
5
|
+
from mage_ai.tests.data_preparation.models.test_blocks_helper import (
|
|
6
|
+
BlockHelperTest,
|
|
7
|
+
load_dataframe,
|
|
8
|
+
load_dynamic_block_child_data,
|
|
9
|
+
passthrough,
|
|
10
|
+
)
|
|
11
|
+
from mage_ai.tests.factory import create_pipeline_run
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class PipelineRunWithDynamicBlocksTests(BlockHelperTest):
|
|
15
|
+
def setUp(self):
|
|
16
|
+
super().setUp()
|
|
17
|
+
|
|
18
|
+
def tearDown(self):
|
|
19
|
+
BlockRun.query.delete()
|
|
20
|
+
self.pipeline.delete()
|
|
21
|
+
super().tearDown()
|
|
22
|
+
|
|
23
|
+
@patch.multiple('mage_ai.settings.server', DYNAMIC_BLOCKS_V2=True)
|
|
24
|
+
def test_executable_block_runs(self):
|
|
25
|
+
"""
|
|
26
|
+
Combinations of upstream blocks:
|
|
27
|
+
- Basic
|
|
28
|
+
- Dynamic
|
|
29
|
+
- Dynamic child
|
|
30
|
+
- Dynamic duo
|
|
31
|
+
- Reduce output
|
|
32
|
+
|
|
33
|
+
Base structure: 14 blocks
|
|
34
|
+
block1
|
|
35
|
+
| dynamic1
|
|
36
|
+
| |---dynamic1_child1a
|
|
37
|
+
| | |---dynamic1_child1a_reduce1a
|
|
38
|
+
| |---|---dynamic1_child1a_dynamic
|
|
39
|
+
| | | |---end1
|
|
40
|
+
|---|---dynamic1_child2a
|
|
41
|
+
|---dynamic1_child1a_child2a_reduce2a (also depends on dynamic1_child1a)
|
|
42
|
+
|---end2 (also depends on dynamic1_child1a_reduce1a)
|
|
43
|
+
|
|
44
|
+
block2
|
|
45
|
+
|---end3
|
|
46
|
+
|---end4 (also depends on block1)
|
|
47
|
+
|---dynamic2
|
|
48
|
+
| |-dynamic2_child1b
|
|
49
|
+
| | |---dynamic2_child1b_reduce1b
|
|
50
|
+
|-------dynamic2_child1b_dynamic
|
|
51
|
+
|---dynamic2_child2b
|
|
52
|
+
| |-|---dynamic2_child1b_child2b_reduce2b
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
# Basic blocks
|
|
56
|
+
block1 = self.create_block('block1', func=load_dataframe)
|
|
57
|
+
self.pipeline.add_block(block1)
|
|
58
|
+
block2 = self.create_block('block2', func=load_dataframe)
|
|
59
|
+
self.pipeline.add_block(block2)
|
|
60
|
+
|
|
61
|
+
# Dynamic blocks
|
|
62
|
+
dynamic1 = self.create_block(
|
|
63
|
+
'dynamic1',
|
|
64
|
+
func=load_dynamic_block_child_data,
|
|
65
|
+
configuration=dict(
|
|
66
|
+
dynamic=dict(parent=True, modes=[dict(type=ModeType.STREAM.value)]),
|
|
67
|
+
),
|
|
68
|
+
)
|
|
69
|
+
self.pipeline.add_block(dynamic1)
|
|
70
|
+
|
|
71
|
+
dynamic2 = self.create_block(
|
|
72
|
+
'dynamic2',
|
|
73
|
+
func=load_dynamic_block_child_data,
|
|
74
|
+
configuration=dict(
|
|
75
|
+
dynamic=dict(parent=True, modes=[dict(type=ModeType.STREAM.value)]),
|
|
76
|
+
),
|
|
77
|
+
)
|
|
78
|
+
self.pipeline.add_block(dynamic2, upstream_block_uuids=[block2.uuid])
|
|
79
|
+
|
|
80
|
+
# Dynamic children
|
|
81
|
+
dynamic1_child1a = self.create_block('dynamic1_child1a', func=passthrough)
|
|
82
|
+
self.pipeline.add_block(dynamic1_child1a, upstream_block_uuids=[dynamic1.uuid])
|
|
83
|
+
|
|
84
|
+
dynamic1_child2a = self.create_block('dynamic1_child2a', func=passthrough)
|
|
85
|
+
self.pipeline.add_block(
|
|
86
|
+
dynamic1_child2a, upstream_block_uuids=[dynamic1.uuid, block1.uuid]
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
dynamic2_child1b = self.create_block('dynamic2_child1b', func=passthrough)
|
|
90
|
+
self.pipeline.add_block(dynamic2_child1b, upstream_block_uuids=[dynamic2.uuid])
|
|
91
|
+
|
|
92
|
+
dynamic2_child2b = self.create_block('dynamic2_child2b', func=passthrough)
|
|
93
|
+
self.pipeline.add_block(dynamic2_child2b, upstream_block_uuids=[dynamic2.uuid])
|
|
94
|
+
|
|
95
|
+
# Dynamic duo
|
|
96
|
+
dynamic1_child1a_dynamic = self.create_block('dynamic1_child1a_dynamic', func=passthrough)
|
|
97
|
+
self.pipeline.add_block(
|
|
98
|
+
dynamic1_child1a_dynamic, upstream_block_uuids=[dynamic1_child1a.uuid, dynamic1.uuid]
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
dynamic2_child1b_dynamic = self.create_block('dynamic2_child1b_dynamic', func=passthrough)
|
|
102
|
+
self.pipeline.add_block(
|
|
103
|
+
dynamic2_child1b_dynamic, upstream_block_uuids=[dynamic2_child1b.uuid, dynamic2.uuid]
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
# Reduce outputs
|
|
107
|
+
# # Reduce output from dynamic1 children
|
|
108
|
+
dynamic1_child1a_reduce1a = self.create_block(
|
|
109
|
+
'dynamic1_child1a_reduce1a',
|
|
110
|
+
func=passthrough,
|
|
111
|
+
configuration=dict(dynamic=dict(reduce_output=True)),
|
|
112
|
+
)
|
|
113
|
+
self.pipeline.add_block(
|
|
114
|
+
dynamic1_child1a_reduce1a, upstream_block_uuids=[dynamic1_child1a.uuid]
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
dynamic1_child1a_child2a_reduce2a = self.create_block(
|
|
118
|
+
'dynamic1_child1a_child2a_reduce2a',
|
|
119
|
+
func=passthrough,
|
|
120
|
+
configuration=dict(dynamic=dict(reduce_output=True)),
|
|
121
|
+
)
|
|
122
|
+
self.pipeline.add_block(
|
|
123
|
+
dynamic1_child1a_child2a_reduce2a,
|
|
124
|
+
upstream_block_uuids=[dynamic1_child1a.uuid, dynamic1_child2a.uuid],
|
|
125
|
+
)
|
|
126
|
+
# Reduce output from dynamic2 children
|
|
127
|
+
dynamic2_child1b_reduce1b = self.create_block(
|
|
128
|
+
'dynamic2_child1b_reduce1b',
|
|
129
|
+
func=passthrough,
|
|
130
|
+
configuration=dict(dynamic=dict(reduce_output=True)),
|
|
131
|
+
)
|
|
132
|
+
self.pipeline.add_block(
|
|
133
|
+
dynamic2_child1b_reduce1b, upstream_block_uuids=[dynamic2_child1b.uuid]
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
dynamic2_child1b_child2b_reduce2b = self.create_block(
|
|
137
|
+
'dynamic2_child1b_child2b_reduce2b',
|
|
138
|
+
func=passthrough,
|
|
139
|
+
configuration=dict(dynamic=dict(reduce_output=True)),
|
|
140
|
+
)
|
|
141
|
+
self.pipeline.add_block(
|
|
142
|
+
dynamic2_child1b_child2b_reduce2b,
|
|
143
|
+
upstream_block_uuids=[dynamic2_child1b.uuid, dynamic2_child2b.uuid],
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
# Final blocks
|
|
147
|
+
end1 = self.create_block('end1', func=passthrough)
|
|
148
|
+
self.pipeline.add_block(end1, upstream_block_uuids=[dynamic1_child1a_reduce1a.uuid])
|
|
149
|
+
|
|
150
|
+
end2 = self.create_block('end2', func=passthrough)
|
|
151
|
+
self.pipeline.add_block(
|
|
152
|
+
end2,
|
|
153
|
+
upstream_block_uuids=[
|
|
154
|
+
dynamic1_child1a_reduce1a.uuid,
|
|
155
|
+
dynamic1_child1a_child2a_reduce2a.uuid,
|
|
156
|
+
],
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
end3 = self.create_block('end3', func=passthrough)
|
|
160
|
+
self.pipeline.add_block(end3, upstream_block_uuids=[block2.uuid])
|
|
161
|
+
|
|
162
|
+
end4 = self.create_block('end4', func=passthrough)
|
|
163
|
+
self.pipeline.add_block(end4, upstream_block_uuids=[block1.uuid, block2.uuid])
|
|
164
|
+
|
|
165
|
+
pipeline_run = create_pipeline_run(pipeline_uuid=self.pipeline.uuid)
|
|
166
|
+
|
|
167
|
+
def get_run(block, block_runs=pipeline_run.block_runs):
|
|
168
|
+
return next(br for br in block_runs if br.block_uuid == block.uuid)
|
|
169
|
+
|
|
170
|
+
def complete(blocks):
|
|
171
|
+
updates(blocks, BlockRun.BlockRunStatus.COMPLETED)
|
|
172
|
+
|
|
173
|
+
def running(blocks):
|
|
174
|
+
updates(blocks, BlockRun.BlockRunStatus.RUNNING)
|
|
175
|
+
|
|
176
|
+
def updates(blocks, status):
|
|
177
|
+
for block in blocks:
|
|
178
|
+
get_run(block).update(status=status)
|
|
179
|
+
|
|
180
|
+
def test_status(blocks, status=BlockRun.BlockRunStatus.COMPLETED):
|
|
181
|
+
for block in blocks:
|
|
182
|
+
self.assertEqual(get_run(block).status, status)
|
|
183
|
+
|
|
184
|
+
def test_runs(blocks, cls=self, pipeline_run=pipeline_run):
|
|
185
|
+
cls.assertEqual(
|
|
186
|
+
[br.block_uuid for br in pipeline_run.executable_block_runs()],
|
|
187
|
+
[b.uuid for b in blocks],
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
test_runs([block1, block2, dynamic1])
|
|
191
|
+
|
|
192
|
+
complete([block2])
|
|
193
|
+
running([dynamic1])
|
|
194
|
+
|
|
195
|
+
# If a block run is running,
|
|
196
|
+
# it’s no longer considered an executable block run to be scheduled.
|
|
197
|
+
test_runs([block1, dynamic2, dynamic1_child1a, end3])
|
|
198
|
+
|
|
199
|
+
complete([block1])
|
|
200
|
+
test_runs([dynamic2, dynamic1_child1a, dynamic1_child2a, end3, end4])
|
|
201
|
+
|
|
202
|
+
running([dynamic2, end3, end4])
|
|
203
|
+
test_runs([dynamic1_child1a, dynamic1_child2a, dynamic2_child1b, dynamic2_child2b])
|
|
204
|
+
|
|
205
|
+
running([dynamic1_child1a])
|
|
206
|
+
test_runs([
|
|
207
|
+
dynamic1_child2a,
|
|
208
|
+
dynamic2_child1b,
|
|
209
|
+
dynamic2_child2b,
|
|
210
|
+
dynamic1_child1a_dynamic,
|
|
211
|
+
dynamic1_child1a_reduce1a,
|
|
212
|
+
])
|
|
213
|
+
|
|
214
|
+
running([dynamic1_child2a])
|
|
215
|
+
test_runs([
|
|
216
|
+
dynamic2_child1b,
|
|
217
|
+
dynamic2_child2b,
|
|
218
|
+
dynamic1_child1a_dynamic,
|
|
219
|
+
dynamic1_child1a_reduce1a,
|
|
220
|
+
dynamic1_child1a_child2a_reduce2a,
|
|
221
|
+
])
|
|
222
|
+
|
|
223
|
+
running([dynamic1_child1a_reduce1a])
|
|
224
|
+
test_runs([
|
|
225
|
+
dynamic2_child1b,
|
|
226
|
+
dynamic2_child2b,
|
|
227
|
+
dynamic1_child1a_dynamic,
|
|
228
|
+
dynamic1_child1a_child2a_reduce2a,
|
|
229
|
+
])
|
|
230
|
+
|
|
231
|
+
complete([dynamic1_child1a_reduce1a])
|
|
232
|
+
test_runs([
|
|
233
|
+
dynamic2_child1b,
|
|
234
|
+
dynamic2_child2b,
|
|
235
|
+
dynamic1_child1a_dynamic,
|
|
236
|
+
dynamic1_child1a_child2a_reduce2a,
|
|
237
|
+
end1,
|
|
238
|
+
])
|
|
239
|
+
|
|
240
|
+
running([dynamic1_child1a_child2a_reduce2a])
|
|
241
|
+
test_runs([
|
|
242
|
+
dynamic2_child1b,
|
|
243
|
+
dynamic2_child2b,
|
|
244
|
+
dynamic1_child1a_dynamic,
|
|
245
|
+
end1,
|
|
246
|
+
])
|
|
247
|
+
|
|
248
|
+
complete([dynamic1_child1a_child2a_reduce2a])
|
|
249
|
+
test_runs([
|
|
250
|
+
dynamic2_child1b,
|
|
251
|
+
dynamic2_child2b,
|
|
252
|
+
dynamic1_child1a_dynamic,
|
|
253
|
+
end1,
|
|
254
|
+
end2,
|
|
255
|
+
])
|
|
256
|
+
|
|
257
|
+
complete([
|
|
258
|
+
dynamic2_child1b,
|
|
259
|
+
dynamic2_child2b,
|
|
260
|
+
dynamic1_child1a_dynamic,
|
|
261
|
+
end1,
|
|
262
|
+
end2,
|
|
263
|
+
])
|
|
264
|
+
test_runs([
|
|
265
|
+
dynamic2_child1b_dynamic,
|
|
266
|
+
dynamic2_child1b_reduce1b,
|
|
267
|
+
dynamic2_child1b_child2b_reduce2b,
|
|
268
|
+
])
|
|
269
|
+
|
|
270
|
+
running([
|
|
271
|
+
dynamic2_child1b_dynamic,
|
|
272
|
+
dynamic2_child1b_reduce1b,
|
|
273
|
+
dynamic2_child1b_child2b_reduce2b,
|
|
274
|
+
])
|
|
275
|
+
|
|
276
|
+
self.assertEqual(len(pipeline_run.executable_block_runs()), 0)
|
|
277
|
+
|
|
278
|
+
self.assertEqual(len(self.pipeline.blocks_by_uuid), len(pipeline_run.block_runs))
|
|
279
|
+
self.assertEqual(len(self.pipeline.blocks_by_uuid), 18)
|
|
@@ -33,7 +33,7 @@ class TriggerGlobalDataProductTest(DBTestCase):
|
|
|
33
33
|
self.pipeline.add_block(
|
|
34
34
|
Block('data_exporter', 'data_exporter', BlockType.DATA_EXPORTER))
|
|
35
35
|
except Exception:
|
|
36
|
-
self.pipeline = Pipeline.get('test_pipeline')
|
|
36
|
+
self.pipeline = Pipeline.get('test_pipeline', repo_path=self.repo_path)
|
|
37
37
|
|
|
38
38
|
self.global_data_product = GlobalDataProduct(
|
|
39
39
|
object_type='pipeline',
|
|
@@ -55,6 +55,7 @@ class TriggerGlobalDataProductTest(DBTestCase):
|
|
|
55
55
|
week_of_month=8,
|
|
56
56
|
week_of_year=9,
|
|
57
57
|
),
|
|
58
|
+
repo_path=self.repo_path,
|
|
58
59
|
settings=dict(
|
|
59
60
|
data_exporter={},
|
|
60
61
|
data_loader=dict(partitions=1),
|
|
@@ -67,7 +68,7 @@ class TriggerGlobalDataProductTest(DBTestCase):
|
|
|
67
68
|
self.repo_path,
|
|
68
69
|
'global_data_products.yaml',
|
|
69
70
|
)
|
|
70
|
-
self.global_data_product.save(
|
|
71
|
+
self.global_data_product.save()
|
|
71
72
|
|
|
72
73
|
PipelineRun.query.filter(
|
|
73
74
|
PipelineRun.id.in_([pr.id for pr in self.global_data_product.pipeline_runs()]),
|
|
@@ -29,7 +29,7 @@ class TriggerUtilsTest(DBTestCase):
|
|
|
29
29
|
self.pipeline.add_block(
|
|
30
30
|
Block('data_exporter', 'data_exporter', BlockType.DATA_EXPORTER))
|
|
31
31
|
except Exception:
|
|
32
|
-
self.pipeline = Pipeline.get('test_pipeline')
|
|
32
|
+
self.pipeline = Pipeline.get('test_pipeline', repo_path=self.repo_path)
|
|
33
33
|
|
|
34
34
|
self.global_data_product = GlobalDataProduct(
|
|
35
35
|
object_type='pipeline',
|
|
@@ -51,6 +51,7 @@ class TriggerUtilsTest(DBTestCase):
|
|
|
51
51
|
week_of_month=8,
|
|
52
52
|
week_of_year=9,
|
|
53
53
|
),
|
|
54
|
+
repo_path=self.repo_path,
|
|
54
55
|
settings=dict(
|
|
55
56
|
data_exporter={},
|
|
56
57
|
data_loader=dict(partitions=1),
|
|
@@ -64,7 +65,7 @@ class TriggerUtilsTest(DBTestCase):
|
|
|
64
65
|
self.repo_path,
|
|
65
66
|
'global_data_products.yaml',
|
|
66
67
|
)
|
|
67
|
-
self.global_data_product.save(
|
|
68
|
+
self.global_data_product.save()
|
|
68
69
|
|
|
69
70
|
def tearDown(self):
|
|
70
71
|
super().tearDown()
|
|
@@ -7,6 +7,7 @@ from kubernetes.client import (
|
|
|
7
7
|
V1Container,
|
|
8
8
|
V1EnvFromSource,
|
|
9
9
|
V1EnvVar,
|
|
10
|
+
V1JobSpec,
|
|
10
11
|
V1NodeAffinity,
|
|
11
12
|
V1NodeSelector,
|
|
12
13
|
V1NodeSelectorRequirement,
|
|
@@ -58,6 +59,10 @@ MOCK_POD_CONFIG = V1Pod(
|
|
|
58
59
|
volumes=[],
|
|
59
60
|
)
|
|
60
61
|
)
|
|
62
|
+
MOCK_JOB_CONFIG = V1JobSpec(template=MOCK_POD_CONFIG,
|
|
63
|
+
active_deadline_seconds=120,
|
|
64
|
+
backoff_limit=5,
|
|
65
|
+
ttl_seconds_after_finished=86400)
|
|
61
66
|
|
|
62
67
|
|
|
63
68
|
class TestK8sUtilities(TestCase):
|
|
@@ -227,7 +232,9 @@ class JobManagerTests(TestCase):
|
|
|
227
232
|
)
|
|
228
233
|
mock_client.V1JobSpec.assert_called_once_with(
|
|
229
234
|
template=mock_v1_pod_template_spec,
|
|
235
|
+
active_deadline_seconds=None,
|
|
230
236
|
backoff_limit=0,
|
|
237
|
+
ttl_seconds_after_finished=None
|
|
231
238
|
)
|
|
232
239
|
mock_client.V1Job.assert_called_once_with(
|
|
233
240
|
api_version='batch/v1',
|
|
@@ -255,6 +262,7 @@ class JobManagerTests(TestCase):
|
|
|
255
262
|
'env': [dict(name='spark_host', value='127.0.0.1')],
|
|
256
263
|
'resources': dict(limits={'cpu': '1000m'}, requests={'cpu': '500m'}),
|
|
257
264
|
}
|
|
265
|
+
k8s_config.job_config = MOCK_JOB_CONFIG
|
|
258
266
|
|
|
259
267
|
# Call the method to create the job object
|
|
260
268
|
command = "echo 'hello world'"
|
|
@@ -355,6 +363,11 @@ class JobManagerTests(TestCase):
|
|
|
355
363
|
},
|
|
356
364
|
],
|
|
357
365
|
},
|
|
366
|
+
'job': {
|
|
367
|
+
'active_deadline_seconds': 0,
|
|
368
|
+
'backoff_limit': 3,
|
|
369
|
+
'ttl_seconds_after_finished': 100
|
|
370
|
+
}
|
|
358
371
|
}
|
|
359
372
|
mock_getenv.return_value = 'pod_name'
|
|
360
373
|
|
|
@@ -428,6 +441,11 @@ class JobManagerTests(TestCase):
|
|
|
428
441
|
)
|
|
429
442
|
)
|
|
430
443
|
|
|
444
|
+
# Job
|
|
445
|
+
self.assertEqual(job.spec.active_deadline_seconds, 0)
|
|
446
|
+
self.assertEqual(job.spec.backoff_limit, 3)
|
|
447
|
+
self.assertEqual(job.spec.ttl_seconds_after_finished, 100)
|
|
448
|
+
|
|
431
449
|
@patch('mage_ai.services.k8s.job_manager.client')
|
|
432
450
|
@patch('mage_ai.services.k8s.job_manager.config')
|
|
433
451
|
def test_create_job(self, mock_config, mock_client):
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from unittest.mock import patch
|
|
2
|
+
|
|
3
|
+
from mage_ai.streaming.sinks.oracledb import OracleDbSink
|
|
4
|
+
from mage_ai.tests.base_test import TestCase
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class OracleDbTests(TestCase):
|
|
8
|
+
def test_init(self):
|
|
9
|
+
with patch.object(OracleDbSink, 'init_client') as mock_init_client:
|
|
10
|
+
OracleDbSink(dict(
|
|
11
|
+
connector_type='oracledb',
|
|
12
|
+
user='test',
|
|
13
|
+
password='123456',
|
|
14
|
+
host='oracle-test',
|
|
15
|
+
port=1521,
|
|
16
|
+
table='test_table',
|
|
17
|
+
service_name='test_service',
|
|
18
|
+
mode='thin',
|
|
19
|
+
))
|
|
20
|
+
mock_init_client.assert_called_once()
|
|
21
|
+
|
|
22
|
+
def test_init_invalid_config(self):
|
|
23
|
+
with patch.object(OracleDbSink, 'init_client') as mock_init_client:
|
|
24
|
+
with self.assertRaises(Exception) as context:
|
|
25
|
+
OracleDbSink(dict(
|
|
26
|
+
connector_type='oracledb',
|
|
27
|
+
user='test',
|
|
28
|
+
password='123456',
|
|
29
|
+
host='oracle-test',
|
|
30
|
+
port=1521,
|
|
31
|
+
table='test_table',
|
|
32
|
+
mode='thin',
|
|
33
|
+
))
|
|
34
|
+
self.assertTrue(
|
|
35
|
+
'__init__() missing 1 required positional argument: \'service_name\''
|
|
36
|
+
in str(context.exception),
|
|
37
|
+
)
|
|
38
|
+
self.assertEqual(mock_init_client.call_count, 0)
|
mage_ai/tests/test_shared.py
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
from scipy.sparse import csr_matrix
|
|
2
|
+
|
|
3
|
+
from mage_ai.data.models.generator import DataGenerator
|
|
4
|
+
from mage_ai.data.tabular.mocks import create_dataframe
|
|
1
5
|
from mage_ai.data_cleaner.shared.utils import wrap_column_name
|
|
2
6
|
from mage_ai.tests.base_test import TestCase
|
|
3
7
|
|
|
@@ -22,3 +26,60 @@ class SharedTests(TestCase):
|
|
|
22
26
|
]
|
|
23
27
|
for name, expected_name in zip(column_names, expected_names):
|
|
24
28
|
self.assertEqual(wrap_column_name(name), expected_name)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def build_pandas(*args, **kwargs):
|
|
32
|
+
return create_dataframe(n_rows=1_000, use_pandas=True)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def build_pandas_series(*args, **kwargs):
|
|
36
|
+
df = create_dataframe(n_rows=2_000, use_pandas=True)
|
|
37
|
+
return df[df.columns[0]]
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def build_polars(*args, **kwargs):
|
|
41
|
+
return create_dataframe(n_rows=3_000)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def build_polars_series(*args, **kwargs):
|
|
45
|
+
df = create_dataframe(n_rows=4_000)
|
|
46
|
+
return df[df.columns[0]]
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def build_iterable(*args, **kwargs):
|
|
50
|
+
return [i for i in range(5_000)]
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def build_matrix_sparse(*args, **kwargs):
|
|
54
|
+
row_count = 6000
|
|
55
|
+
|
|
56
|
+
data = []
|
|
57
|
+
rows = []
|
|
58
|
+
cols = []
|
|
59
|
+
|
|
60
|
+
for i in range(int(row_count / 2)):
|
|
61
|
+
# Replicate the 3x3 pattern for each block of 2 rows
|
|
62
|
+
data.extend([1, 2, 1, 2, 3, 2]) # Replicated entries for simplicity
|
|
63
|
+
rows.extend([
|
|
64
|
+
i * 2,
|
|
65
|
+
i * 2,
|
|
66
|
+
i * 2 + 1,
|
|
67
|
+
i * 2 + 1,
|
|
68
|
+
i * 2 + 1,
|
|
69
|
+
i * 2 + 1,
|
|
70
|
+
]) # Repeat every two rows
|
|
71
|
+
cols.extend([0, 2, 2, 0, 1, 2]) # Columns indices are consistent with your pattern
|
|
72
|
+
|
|
73
|
+
# Create the CSR matrix with specified shape
|
|
74
|
+
return csr_matrix((data, (rows, cols)), shape=(row_count, 3))
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def build_list_complex(*args, **kwargs):
|
|
78
|
+
return [DataGenerator([i for i in range(100)]) for i in range(100)] + [
|
|
79
|
+
build_pandas(),
|
|
80
|
+
build_pandas_series(),
|
|
81
|
+
build_polars(),
|
|
82
|
+
build_polars_series(),
|
|
83
|
+
build_iterable(),
|
|
84
|
+
build_matrix_sparse(),
|
|
85
|
+
]
|
|
@@ -45,8 +45,13 @@ from mage_ai.usage_statistics.utils import build_event_data_for_chart
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
class UsageStatisticLogger():
|
|
48
|
-
def __init__(
|
|
49
|
-
self
|
|
48
|
+
def __init__(
|
|
49
|
+
self,
|
|
50
|
+
context_data: Dict = None,
|
|
51
|
+
project=None,
|
|
52
|
+
repo_path: str = None,
|
|
53
|
+
):
|
|
54
|
+
self.project = project or Project(context_data=context_data, repo_path=repo_path)
|
|
50
55
|
|
|
51
56
|
async def block_create(
|
|
52
57
|
self,
|
mage_ai/utils/code.py
CHANGED
|
@@ -2,12 +2,14 @@ import importlib
|
|
|
2
2
|
import re
|
|
3
3
|
from typing import Tuple
|
|
4
4
|
|
|
5
|
+
from jupyter_client import KernelClient
|
|
6
|
+
|
|
5
7
|
from mage_ai.autocomplete.utils import extract_all_imports
|
|
6
8
|
from mage_ai.settings.repo import get_repo_path
|
|
7
9
|
|
|
8
10
|
|
|
9
|
-
def reload_all_repo_modules(content: str) -> None:
|
|
10
|
-
parts = get_repo_path().split('/')
|
|
11
|
+
def reload_all_repo_modules(content: str, client: KernelClient) -> None:
|
|
12
|
+
parts = get_repo_path(root_project=True).split('/')
|
|
11
13
|
project_name = parts[-1]
|
|
12
14
|
|
|
13
15
|
for line in extract_all_imports(content):
|
|
@@ -21,6 +23,12 @@ def reload_all_repo_modules(content: str) -> None:
|
|
|
21
23
|
m1, m2 = matches[0]
|
|
22
24
|
try:
|
|
23
25
|
importlib.reload(importlib.import_module(m1 or m2))
|
|
26
|
+
client.execute(
|
|
27
|
+
f"""
|
|
28
|
+
import importlib
|
|
29
|
+
importlib.reload(importlib.import_module("{m1}" or "{m2}"))
|
|
30
|
+
"""
|
|
31
|
+
)
|
|
24
32
|
except Exception:
|
|
25
33
|
pass
|
|
26
34
|
|
|
@@ -35,34 +43,40 @@ def extract_decorated_function(code: str, decorated_function_name: str) -> Tuple
|
|
|
35
43
|
number_of_lines = len(lines)
|
|
36
44
|
|
|
37
45
|
for idx, line in enumerate(lines):
|
|
38
|
-
if line and
|
|
39
|
-
span_current_start is not None and \
|
|
40
|
-
span_current_def is not None:
|
|
46
|
+
if line and span_current_start is not None and span_current_def is not None:
|
|
41
47
|
|
|
42
48
|
if line.startswith('@') or line.startswith('def '):
|
|
43
|
-
spans.append(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
spans.append(
|
|
50
|
+
(
|
|
51
|
+
span_current_start,
|
|
52
|
+
idx - 1,
|
|
53
|
+
)
|
|
54
|
+
)
|
|
47
55
|
span_current_start = None
|
|
48
56
|
span_current_def = None
|
|
49
57
|
|
|
50
|
-
if
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
58
|
+
if (
|
|
59
|
+
line
|
|
60
|
+
and span_current_start is not None
|
|
61
|
+
and span_current_def is None
|
|
62
|
+
and line.startswith('def ')
|
|
63
|
+
):
|
|
54
64
|
|
|
55
65
|
span_current_def = idx
|
|
56
66
|
|
|
57
|
-
if
|
|
58
|
-
|
|
59
|
-
|
|
67
|
+
if (
|
|
68
|
+
line
|
|
69
|
+
and span_current_start is None
|
|
70
|
+
and line.startswith(f'@{decorated_function_name}')
|
|
71
|
+
):
|
|
60
72
|
|
|
61
73
|
span_current_start = idx
|
|
62
74
|
|
|
63
|
-
if
|
|
64
|
-
|
|
65
|
-
|
|
75
|
+
if (
|
|
76
|
+
span_current_start is not None
|
|
77
|
+
and span_current_def is not None
|
|
78
|
+
and idx == number_of_lines - 1
|
|
79
|
+
):
|
|
66
80
|
|
|
67
81
|
spans.append((span_current_start, idx))
|
|
68
82
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mage-ai
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.71
|
|
4
4
|
Summary: Mage is a tool for building and deploying data pipelines.
|
|
5
5
|
Home-page: https://github.com/mage-ai/mage-ai
|
|
6
6
|
Author: Mage
|
|
@@ -14,6 +14,7 @@ License-File: LICENSE
|
|
|
14
14
|
Requires-Dist: Faker ==4.14.0
|
|
15
15
|
Requires-Dist: GitPython ==3.1.41
|
|
16
16
|
Requires-Dist: Jinja2 ==3.1.3
|
|
17
|
+
Requires-Dist: Pillow ==10.3.0
|
|
17
18
|
Requires-Dist: PyGithub ==1.59.0
|
|
18
19
|
Requires-Dist: PyJWT ==2.6.0
|
|
19
20
|
Requires-Dist: aiofiles ==22.1.0
|
|
@@ -35,14 +36,16 @@ Requires-Dist: jupyter-server-proxy ==3.2.3
|
|
|
35
36
|
Requires-Dist: jupyter-server ==1.23.5
|
|
36
37
|
Requires-Dist: jupyter-client ==7.4.4
|
|
37
38
|
Requires-Dist: ldap3 ==2.9.1
|
|
39
|
+
Requires-Dist: memory-profiler
|
|
38
40
|
Requires-Dist: newrelic ==8.8.0
|
|
39
41
|
Requires-Dist: numpy >=1.22.0
|
|
40
42
|
Requires-Dist: pandas >=1.3.0
|
|
41
43
|
Requires-Dist: polars <0.19.2,>=0.18.0
|
|
42
44
|
Requires-Dist: protobuf ~=4.21.12
|
|
45
|
+
Requires-Dist: psutil ==5.9.8
|
|
43
46
|
Requires-Dist: pyarrow ==14.0.1
|
|
44
47
|
Requires-Dist: python-dateutil ==2.8.2
|
|
45
|
-
Requires-Dist: pytz
|
|
48
|
+
Requires-Dist: pytz >=2022.2.1
|
|
46
49
|
Requires-Dist: pyyaml ~=6.0
|
|
47
50
|
Requires-Dist: redis ~=5.0.1
|
|
48
51
|
Requires-Dist: requests ~=2.31.0
|