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
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import shutil
|
|
3
|
-
import yaml
|
|
4
3
|
from dataclasses import dataclass, field
|
|
5
|
-
from
|
|
4
|
+
from typing import Dict, List
|
|
5
|
+
|
|
6
|
+
import yaml
|
|
7
|
+
|
|
6
8
|
from mage_ai.data_preparation.models.custom_templates.constants import (
|
|
7
9
|
DIRECTORY_FOR_PIPELINE_TEMPLATES,
|
|
8
10
|
METADATA_FILENAME_WITH_EXTENSION,
|
|
9
11
|
)
|
|
10
|
-
from mage_ai.data_preparation.models.custom_templates.utils import
|
|
12
|
+
from mage_ai.data_preparation.models.custom_templates.utils import (
|
|
13
|
+
custom_templates_directory,
|
|
14
|
+
)
|
|
15
|
+
from mage_ai.data_preparation.models.pipeline import Pipeline
|
|
11
16
|
from mage_ai.data_preparation.models.triggers import (
|
|
12
17
|
TRIGGER_FILE_NAME,
|
|
13
18
|
Trigger,
|
|
@@ -16,12 +21,10 @@ from mage_ai.data_preparation.models.triggers import (
|
|
|
16
21
|
load_trigger_configs,
|
|
17
22
|
)
|
|
18
23
|
from mage_ai.orchestration.db.models.schedules import PipelineSchedule
|
|
19
|
-
from mage_ai.settings.repo import get_repo_path
|
|
20
24
|
from mage_ai.shared.config import BaseConfig
|
|
21
25
|
from mage_ai.shared.hash import merge_dict
|
|
22
26
|
from mage_ai.shared.io import safe_write
|
|
23
27
|
from mage_ai.shared.utils import clean_name
|
|
24
|
-
from typing import Dict, List
|
|
25
28
|
|
|
26
29
|
|
|
27
30
|
@dataclass
|
|
@@ -29,12 +32,13 @@ class CustomPipelineTemplate(BaseConfig):
|
|
|
29
32
|
description: str = None
|
|
30
33
|
name: str = None
|
|
31
34
|
pipeline: Dict = field(default_factory=dict)
|
|
35
|
+
repo_path: str = None
|
|
32
36
|
tags: List = field(default_factory=list)
|
|
33
37
|
template_uuid: str = None
|
|
34
38
|
user: Dict = field(default_factory=dict)
|
|
35
39
|
|
|
36
40
|
@classmethod
|
|
37
|
-
def load(self, template_uuid: str = None, uuid: str = None):
|
|
41
|
+
def load(self, repo_path: str, template_uuid: str = None, uuid: str = None):
|
|
38
42
|
uuid_use = uuid
|
|
39
43
|
template_uuid_use = template_uuid
|
|
40
44
|
|
|
@@ -50,12 +54,13 @@ class CustomPipelineTemplate(BaseConfig):
|
|
|
50
54
|
|
|
51
55
|
try:
|
|
52
56
|
config_path_metadata = os.path.join(
|
|
53
|
-
|
|
57
|
+
repo_path,
|
|
54
58
|
uuid_use,
|
|
55
59
|
METADATA_FILENAME_WITH_EXTENSION,
|
|
56
60
|
)
|
|
57
61
|
custom_template = super().load(config_path_metadata)
|
|
58
62
|
custom_template.template_uuid = template_uuid_use
|
|
63
|
+
custom_template.repo_path = repo_path
|
|
59
64
|
|
|
60
65
|
return custom_template
|
|
61
66
|
except Exception as err:
|
|
@@ -78,6 +83,7 @@ class CustomPipelineTemplate(BaseConfig):
|
|
|
78
83
|
description=description,
|
|
79
84
|
name=name,
|
|
80
85
|
pipeline=pipeline_dict,
|
|
86
|
+
repo_path=pipeline.repo_path,
|
|
81
87
|
template_uuid=clean_name(template_uuid, [os.sep]) if template_uuid else template_uuid,
|
|
82
88
|
)
|
|
83
89
|
|
|
@@ -118,7 +124,7 @@ class CustomPipelineTemplate(BaseConfig):
|
|
|
118
124
|
@property
|
|
119
125
|
def metadata_file_path(self) -> str:
|
|
120
126
|
return os.path.join(
|
|
121
|
-
|
|
127
|
+
self.repo_path,
|
|
122
128
|
self.uuid,
|
|
123
129
|
METADATA_FILENAME_WITH_EXTENSION,
|
|
124
130
|
)
|
|
@@ -126,16 +132,24 @@ class CustomPipelineTemplate(BaseConfig):
|
|
|
126
132
|
@property
|
|
127
133
|
def triggers_file_path(self) -> str:
|
|
128
134
|
return os.path.join(
|
|
129
|
-
|
|
135
|
+
self.repo_path,
|
|
130
136
|
self.uuid,
|
|
131
137
|
TRIGGER_FILE_NAME,
|
|
132
138
|
)
|
|
133
139
|
|
|
134
140
|
def build_pipeline(self) -> Pipeline:
|
|
135
|
-
return Pipeline(
|
|
141
|
+
return Pipeline(
|
|
142
|
+
clean_name(self.template_uuid),
|
|
143
|
+
config=self.pipeline,
|
|
144
|
+
repo_path=self.repo_path,
|
|
145
|
+
)
|
|
136
146
|
|
|
137
147
|
def create_pipeline(self, name: str) -> Pipeline:
|
|
138
|
-
pipeline = Pipeline(
|
|
148
|
+
pipeline = Pipeline(
|
|
149
|
+
clean_name(name),
|
|
150
|
+
repo_path=self.repo_path,
|
|
151
|
+
config=self.pipeline,
|
|
152
|
+
)
|
|
139
153
|
os.makedirs(os.path.dirname(pipeline.config_path), exist_ok=True)
|
|
140
154
|
pipeline.save()
|
|
141
155
|
|
|
@@ -151,10 +165,13 @@ class CustomPipelineTemplate(BaseConfig):
|
|
|
151
165
|
return pipeline
|
|
152
166
|
|
|
153
167
|
def to_dict(self) -> Dict:
|
|
154
|
-
return merge_dict(
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
168
|
+
return merge_dict(
|
|
169
|
+
self.to_dict_base(),
|
|
170
|
+
dict(
|
|
171
|
+
template_uuid=self.template_uuid,
|
|
172
|
+
uuid=self.uuid,
|
|
173
|
+
),
|
|
174
|
+
)
|
|
158
175
|
|
|
159
176
|
def to_dict_base(self) -> Dict:
|
|
160
177
|
return dict(
|
|
@@ -178,4 +195,4 @@ class CustomPipelineTemplate(BaseConfig):
|
|
|
178
195
|
safe_write(file_path, content)
|
|
179
196
|
|
|
180
197
|
def delete(self) -> None:
|
|
181
|
-
shutil.rmtree(os.path.join(
|
|
198
|
+
shutil.rmtree(os.path.join(self.repo_path, self.uuid))
|
|
@@ -71,7 +71,7 @@ def group_and_hydrate_files(
|
|
|
71
71
|
custom_templates = []
|
|
72
72
|
|
|
73
73
|
for template_uuid, _ in groups.items():
|
|
74
|
-
custom_template = custom_template_class.load(template_uuid=template_uuid)
|
|
74
|
+
custom_template = custom_template_class.load(get_repo_path(), template_uuid=template_uuid)
|
|
75
75
|
if custom_template:
|
|
76
76
|
custom_templates.append(custom_template)
|
|
77
77
|
|
|
@@ -145,6 +145,7 @@ class File:
|
|
|
145
145
|
file_selector = None
|
|
146
146
|
|
|
147
147
|
if exclude_pattern is not None or pattern is not None:
|
|
148
|
+
|
|
148
149
|
def __select(x: Dict, check_file_path=check_file_path, pattern=pattern):
|
|
149
150
|
filename = x.get('path') if check_file_path else x.get('name')
|
|
150
151
|
checks = []
|
|
@@ -157,6 +158,7 @@ class File:
|
|
|
157
158
|
file_selector = __select
|
|
158
159
|
|
|
159
160
|
if exclude_dir_pattern is not None:
|
|
161
|
+
|
|
160
162
|
def __select(x: Dict, pattern=pattern):
|
|
161
163
|
filename = x.get('name')
|
|
162
164
|
checks = []
|
|
@@ -169,6 +171,7 @@ class File:
|
|
|
169
171
|
pipeline_count_mapping = None
|
|
170
172
|
if include_pipeline_count:
|
|
171
173
|
from mage_ai.cache.block import BlockCache
|
|
174
|
+
|
|
172
175
|
pipeline_count_mapping = BlockCache().get_pipeline_count_mapping()
|
|
173
176
|
|
|
174
177
|
return traverse(
|
|
@@ -200,7 +203,7 @@ class File:
|
|
|
200
203
|
if dir_path.startswith(PIPELINES_FOLDER_PREFIX) and filename == 'triggers.yaml':
|
|
201
204
|
from mage_ai.data_preparation.models.triggers import load_trigger_configs
|
|
202
205
|
|
|
203
|
-
pipeline_uuid = dir_path[len(PIPELINES_FOLDER_PREFIX):]
|
|
206
|
+
pipeline_uuid = dir_path[len(PIPELINES_FOLDER_PREFIX) :]
|
|
204
207
|
load_trigger_configs(content, pipeline_uuid=pipeline_uuid, raise_exception=True)
|
|
205
208
|
|
|
206
209
|
@classmethod
|
|
@@ -239,8 +242,9 @@ class File:
|
|
|
239
242
|
number_of_file_versions = len(file_versions)
|
|
240
243
|
|
|
241
244
|
if number_of_file_versions >= MAX_NUMBER_OF_FILE_VERSIONS:
|
|
242
|
-
number_of_file_versions_to_delete = 1 +
|
|
243
|
-
|
|
245
|
+
number_of_file_versions_to_delete = 1 + (
|
|
246
|
+
number_of_file_versions - MAX_NUMBER_OF_FILE_VERSIONS
|
|
247
|
+
)
|
|
244
248
|
for fn in sorted(file_versions)[:number_of_file_versions_to_delete]:
|
|
245
249
|
fn_path = os.path.join(file_path_versions_dir, fn)
|
|
246
250
|
os.remove(fn_path)
|
|
@@ -339,8 +343,9 @@ class File:
|
|
|
339
343
|
file_content = fp.read()
|
|
340
344
|
return file_content
|
|
341
345
|
except FileNotFoundError as err:
|
|
342
|
-
print('
|
|
343
|
-
|
|
346
|
+
print(f'[ERROR] File.content: {err}')
|
|
347
|
+
if is_debug():
|
|
348
|
+
raise err
|
|
344
349
|
return ''
|
|
345
350
|
|
|
346
351
|
async def content_async(self):
|
|
@@ -370,11 +375,14 @@ class File:
|
|
|
370
375
|
os.path.join(self.repo_path, ''),
|
|
371
376
|
'',
|
|
372
377
|
)
|
|
373
|
-
return [
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
+
return [
|
|
379
|
+
File(
|
|
380
|
+
v,
|
|
381
|
+
file_path_versions_dir_without_repo,
|
|
382
|
+
self.repo_path,
|
|
383
|
+
)
|
|
384
|
+
for v in sorted(file_versions, reverse=True)
|
|
385
|
+
]
|
|
378
386
|
|
|
379
387
|
def update_content(self, content: str):
|
|
380
388
|
self.write(
|
|
@@ -464,8 +472,7 @@ def ensure_file_is_in_project(file_path: str) -> None:
|
|
|
464
472
|
full_file_path = get_absolute_path(file_path)
|
|
465
473
|
full_repo_path = get_absolute_path(get_repo_path(file_path=file_path))
|
|
466
474
|
if full_repo_path != os.path.commonpath([full_file_path, full_repo_path]):
|
|
467
|
-
raise FileNotInProjectError(
|
|
468
|
-
f'File at path: {file_path} is not in the project directory.')
|
|
475
|
+
raise FileNotInProjectError(f'File at path: {file_path} is not in the project directory.')
|
|
469
476
|
|
|
470
477
|
|
|
471
478
|
def traverse(
|
|
@@ -508,17 +515,25 @@ def traverse(
|
|
|
508
515
|
|
|
509
516
|
entry_path = entry.path
|
|
510
517
|
if entry.is_dir(follow_symlinks=False) or os.path.isdir(entry_path):
|
|
511
|
-
return
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
518
|
+
return (
|
|
519
|
+
True
|
|
520
|
+
if dir_selector is None
|
|
521
|
+
else dir_selector(
|
|
522
|
+
dict(
|
|
523
|
+
depth=depth + 1,
|
|
524
|
+
name=str(entry.name),
|
|
525
|
+
path=entry.path,
|
|
526
|
+
)
|
|
527
|
+
)
|
|
528
|
+
)
|
|
516
529
|
else:
|
|
517
|
-
return file_selector(
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
530
|
+
return file_selector(
|
|
531
|
+
dict(
|
|
532
|
+
depth=depth + 1,
|
|
533
|
+
name=str(entry.name),
|
|
534
|
+
path=entry.path,
|
|
535
|
+
)
|
|
536
|
+
)
|
|
522
537
|
|
|
523
538
|
return True
|
|
524
539
|
|
|
@@ -533,7 +548,8 @@ def traverse(
|
|
|
533
548
|
file_selector=file_selector,
|
|
534
549
|
include_pipeline_count=include_pipeline_count,
|
|
535
550
|
pipeline_count_mapping=pipeline_count_mapping,
|
|
536
|
-
)
|
|
551
|
+
)
|
|
552
|
+
for entry in sorted(
|
|
537
553
|
filter(__filter, os.scandir(path)),
|
|
538
554
|
key=lambda entry: entry.name,
|
|
539
555
|
)
|
|
@@ -546,11 +562,7 @@ def __should_update_dbt_cache(dir_path: str, filename: str) -> bool:
|
|
|
546
562
|
project_model = Project(root_project=True)
|
|
547
563
|
if project_model and project_model.is_feature_enabled(FeatureUUID.DBT_V2) and dir_path:
|
|
548
564
|
# If the file is a SQL or YAML file
|
|
549
|
-
if (
|
|
550
|
-
filename.endswith('.sql') or
|
|
551
|
-
filename.endswith('.yml') or
|
|
552
|
-
filename.endswith('.yaml')
|
|
553
|
-
):
|
|
565
|
+
if filename.endswith('.sql') or filename.endswith('.yml') or filename.endswith('.yaml'):
|
|
554
566
|
base_dir_path = Path(dir_path).parts[0].lower()
|
|
555
567
|
# If the file doesn’t exist in a block’s folder (e.g. data_loaders/, pipelines/)
|
|
556
568
|
if base_dir_path not in IGNORE_DIRECTORY_NAMES:
|
|
@@ -595,4 +607,5 @@ def update_file_cache() -> None:
|
|
|
595
607
|
project_model = Project(root_project=True)
|
|
596
608
|
if project_model and project_model.is_feature_enabled(FeatureUUID.COMMAND_CENTER):
|
|
597
609
|
from mage_ai.cache.file import FileCache
|
|
610
|
+
|
|
598
611
|
FileCache().invalidate()
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from dataclasses import dataclass, field
|
|
3
3
|
from datetime import datetime, timezone
|
|
4
|
-
from typing import Dict, List
|
|
4
|
+
from typing import Dict, List, Optional
|
|
5
5
|
|
|
6
6
|
import yaml
|
|
7
7
|
from dateutil.relativedelta import relativedelta
|
|
8
8
|
|
|
9
|
-
from mage_ai.data_preparation.models.
|
|
9
|
+
from mage_ai.data_preparation.models.block.settings.global_data_products.models import (
|
|
10
10
|
GlobalDataProductObjectType,
|
|
11
11
|
)
|
|
12
12
|
from mage_ai.data_preparation.models.pipeline import Pipeline
|
|
13
13
|
from mage_ai.orchestration.db.models.schedules import PipelineRun, PipelineSchedule
|
|
14
|
-
from mage_ai.settings.
|
|
14
|
+
from mage_ai.settings.platform.utils import full_paths_for_all_projects
|
|
15
15
|
from mage_ai.shared.array import find
|
|
16
16
|
from mage_ai.shared.dates import week_of_month
|
|
17
17
|
from mage_ai.shared.hash import extract, index_by
|
|
18
18
|
from mage_ai.shared.io import safe_write
|
|
19
|
+
from mage_ai.shared.path_fixer import add_absolute_path, get_path_parts
|
|
19
20
|
from mage_ai.shared.utils import clean_name
|
|
20
21
|
|
|
21
22
|
|
|
@@ -26,6 +27,7 @@ class GlobalDataProduct:
|
|
|
26
27
|
object_uuid: str = None
|
|
27
28
|
outdated_after: Dict = field(default_factory=dict)
|
|
28
29
|
outdated_starting_at: Dict = field(default_factory=dict)
|
|
30
|
+
repo_path: str = None
|
|
29
31
|
settings: Dict = field(default_factory=dict)
|
|
30
32
|
|
|
31
33
|
def __init__(self, uuid: str, **kwargs):
|
|
@@ -33,37 +35,50 @@ class GlobalDataProduct:
|
|
|
33
35
|
self.object_uuid = kwargs.get('object_uuid')
|
|
34
36
|
self.outdated_after = kwargs.get('outdated_after')
|
|
35
37
|
self.outdated_starting_at = kwargs.get('outdated_starting_at')
|
|
38
|
+
self.repo_path = kwargs.get('repo_path')
|
|
36
39
|
self.settings = kwargs.get('settings')
|
|
37
40
|
self.uuid = clean_name(uuid) if uuid else uuid
|
|
38
41
|
self._object = None
|
|
39
42
|
|
|
40
43
|
@classmethod
|
|
41
|
-
def file_path(
|
|
42
|
-
return os.path.join(
|
|
44
|
+
def file_path(cls, repo_path: str) -> str:
|
|
45
|
+
return os.path.join(repo_path, 'global_data_products.yaml')
|
|
43
46
|
|
|
44
47
|
@classmethod
|
|
45
|
-
def load_all(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
def load_all(cls, repo_path: Optional[str] = None) -> List['GlobalDataProduct']:
|
|
49
|
+
paths = []
|
|
50
|
+
if repo_path:
|
|
51
|
+
paths.append(repo_path)
|
|
52
|
+
else:
|
|
53
|
+
paths += full_paths_for_all_projects()
|
|
48
54
|
|
|
49
|
-
|
|
50
|
-
return []
|
|
55
|
+
arr = []
|
|
51
56
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
)
|
|
57
|
+
for file_path in paths:
|
|
58
|
+
file_path_to_use = cls.file_path(file_path)
|
|
59
|
+
if not os.path.exists(file_path_to_use):
|
|
60
|
+
continue
|
|
61
|
+
|
|
62
|
+
with open(file_path_to_use) as fp:
|
|
63
|
+
content = fp.read()
|
|
64
|
+
if content:
|
|
65
|
+
yaml_config = yaml.safe_load(content) or {}
|
|
66
|
+
for uuid, config_attributes in yaml_config.items():
|
|
67
|
+
arr.append(
|
|
68
|
+
cls(
|
|
69
|
+
uuid,
|
|
70
|
+
**config_attributes,
|
|
71
|
+
)
|
|
72
|
+
)
|
|
61
73
|
|
|
62
74
|
return arr
|
|
63
75
|
|
|
64
76
|
@classmethod
|
|
65
|
-
def get(
|
|
66
|
-
|
|
77
|
+
def get(cls, uuid: str, repo_path: Optional[str] = None, project: Optional[str] = None):
|
|
78
|
+
if project:
|
|
79
|
+
repo_path = add_absolute_path(project)
|
|
80
|
+
|
|
81
|
+
return find(lambda x: x.uuid == uuid, cls.load_all(repo_path))
|
|
67
82
|
|
|
68
83
|
@property
|
|
69
84
|
def pipeline(self) -> Pipeline:
|
|
@@ -71,7 +86,7 @@ class GlobalDataProduct:
|
|
|
71
86
|
if self._object:
|
|
72
87
|
return self._object
|
|
73
88
|
else:
|
|
74
|
-
self._object = Pipeline.get(self.object_uuid)
|
|
89
|
+
self._object = Pipeline.get(self.object_uuid, repo_path=self.repo_path)
|
|
75
90
|
|
|
76
91
|
return self._object
|
|
77
92
|
|
|
@@ -137,12 +152,15 @@ class GlobalDataProduct:
|
|
|
137
152
|
|
|
138
153
|
def get_outdated_at_delta(self, in_seconds: bool = False) -> relativedelta:
|
|
139
154
|
outdated_after = self.outdated_after or {}
|
|
140
|
-
delta = extract(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
155
|
+
delta = extract(
|
|
156
|
+
outdated_after,
|
|
157
|
+
[
|
|
158
|
+
'months',
|
|
159
|
+
'seconds',
|
|
160
|
+
'weeks',
|
|
161
|
+
'years',
|
|
162
|
+
],
|
|
163
|
+
)
|
|
146
164
|
|
|
147
165
|
if len(delta) >= 1:
|
|
148
166
|
d = relativedelta(**delta)
|
|
@@ -232,8 +250,7 @@ class GlobalDataProduct:
|
|
|
232
250
|
status: PipelineRun.PipelineRunStatus = None,
|
|
233
251
|
) -> List[PipelineRun]:
|
|
234
252
|
pipeline_runs = (
|
|
235
|
-
PipelineRun.
|
|
236
|
-
select(
|
|
253
|
+
PipelineRun.select(
|
|
237
254
|
PipelineRun.backfill_id,
|
|
238
255
|
PipelineRun.completed_at,
|
|
239
256
|
PipelineRun.created_at,
|
|
@@ -249,20 +266,20 @@ class GlobalDataProduct:
|
|
|
249
266
|
PipelineRun.updated_at,
|
|
250
267
|
PipelineRun.variables,
|
|
251
268
|
PipelineSchedule.global_data_product_uuid,
|
|
252
|
-
)
|
|
253
|
-
join(
|
|
254
|
-
|
|
269
|
+
)
|
|
270
|
+
.join(
|
|
271
|
+
PipelineSchedule,
|
|
272
|
+
PipelineRun.pipeline_schedule_id == PipelineSchedule.id,
|
|
273
|
+
)
|
|
274
|
+
.filter(
|
|
255
275
|
PipelineRun.pipeline_uuid == self.object_uuid,
|
|
256
276
|
PipelineSchedule.global_data_product_uuid == self.uuid,
|
|
257
277
|
)
|
|
258
278
|
)
|
|
259
279
|
|
|
260
280
|
if status:
|
|
261
|
-
pipeline_runs = (
|
|
262
|
-
|
|
263
|
-
filter(
|
|
264
|
-
PipelineRun.status == status,
|
|
265
|
-
)
|
|
281
|
+
pipeline_runs = pipeline_runs.filter(
|
|
282
|
+
PipelineRun.status == status,
|
|
266
283
|
)
|
|
267
284
|
|
|
268
285
|
pipeline_runs = pipeline_runs.order_by(PipelineRun.execution_date.desc())
|
|
@@ -270,23 +287,33 @@ class GlobalDataProduct:
|
|
|
270
287
|
if limit is not None:
|
|
271
288
|
pipeline_runs = pipeline_runs.limit(limit)
|
|
272
289
|
|
|
273
|
-
return [
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
+
return [
|
|
291
|
+
PipelineRun(
|
|
292
|
+
backfill_id=row.backfill_id,
|
|
293
|
+
completed_at=row.completed_at,
|
|
294
|
+
created_at=row.created_at,
|
|
295
|
+
event_variables=row.event_variables,
|
|
296
|
+
execution_date=row.execution_date,
|
|
297
|
+
executor_type=row.executor_type,
|
|
298
|
+
global_data_product_uuid=row.global_data_product_uuid,
|
|
299
|
+
id=row.id,
|
|
300
|
+
metrics=row.metrics,
|
|
301
|
+
passed_sla=row.passed_sla,
|
|
302
|
+
pipeline_schedule_id=row.pipeline_schedule_id,
|
|
303
|
+
pipeline_uuid=row.pipeline_uuid,
|
|
304
|
+
status=row.status,
|
|
305
|
+
updated_at=row.updated_at,
|
|
306
|
+
variables=row.variables,
|
|
307
|
+
)
|
|
308
|
+
for row in pipeline_runs.all()
|
|
309
|
+
]
|
|
310
|
+
|
|
311
|
+
@property
|
|
312
|
+
def project_name(self) -> Optional[str]:
|
|
313
|
+
if self.repo_path:
|
|
314
|
+
parts = get_path_parts(self.repo_path)
|
|
315
|
+
if parts and len(parts) >= 3:
|
|
316
|
+
return parts[1]
|
|
290
317
|
|
|
291
318
|
def to_dict(self, include_uuid: bool = False) -> Dict:
|
|
292
319
|
data = dict(
|
|
@@ -294,6 +321,8 @@ class GlobalDataProduct:
|
|
|
294
321
|
object_uuid=self.object_uuid,
|
|
295
322
|
outdated_after=self.outdated_after,
|
|
296
323
|
outdated_starting_at=self.outdated_starting_at,
|
|
324
|
+
project=self.project_name,
|
|
325
|
+
repo_path=self.repo_path,
|
|
297
326
|
settings=self.settings,
|
|
298
327
|
)
|
|
299
328
|
|
|
@@ -305,8 +334,8 @@ class GlobalDataProduct:
|
|
|
305
334
|
def delete(self) -> None:
|
|
306
335
|
self.save(delete=True)
|
|
307
336
|
|
|
308
|
-
def save(self, delete: bool = False
|
|
309
|
-
mapping = index_by(lambda x: x.uuid, self.load_all())
|
|
337
|
+
def save(self, delete: bool = False) -> None:
|
|
338
|
+
mapping = index_by(lambda x: x.uuid, self.load_all(self.repo_path))
|
|
310
339
|
|
|
311
340
|
if delete:
|
|
312
341
|
mapping.pop(self.uuid, None)
|
|
@@ -324,7 +353,7 @@ class GlobalDataProduct:
|
|
|
324
353
|
mapping_new[uuid][k] = v
|
|
325
354
|
|
|
326
355
|
content = yaml.safe_dump(mapping_new)
|
|
327
|
-
safe_write(
|
|
356
|
+
safe_write(self.file_path(self.repo_path), content)
|
|
328
357
|
|
|
329
358
|
def update(self, payload: Dict) -> None:
|
|
330
359
|
for key in [
|
|
@@ -332,6 +361,7 @@ class GlobalDataProduct:
|
|
|
332
361
|
'object_uuid',
|
|
333
362
|
'outdated_after',
|
|
334
363
|
'outdated_starting_at',
|
|
364
|
+
'repo_path',
|
|
335
365
|
'settings',
|
|
336
366
|
]:
|
|
337
367
|
value = payload.get(key)
|
|
@@ -421,6 +421,7 @@ class Hook(BaseDataClass):
|
|
|
421
421
|
if with_trigger or (self.run_settings and self.run_settings.with_trigger):
|
|
422
422
|
pipeline_run = trigger_pipeline(
|
|
423
423
|
self.pipeline.uuid,
|
|
424
|
+
repo_path=self.pipeline.repo_path,
|
|
424
425
|
variables=variables,
|
|
425
426
|
check_status=check_status and not asynchronous,
|
|
426
427
|
error_on_failure=error_on_failure,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
from typing import Any, Callable, Dict, Optional, Sequence, Union
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
@dataclass
|
|
6
|
+
class PipelineInterface:
|
|
7
|
+
get_block: Callable[[str], 'BlockInterface']
|
|
8
|
+
uuid: str
|
|
9
|
+
variable_manager: Any
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@dataclass
|
|
13
|
+
class BlockInterface:
|
|
14
|
+
configuration: Dict[str, bool]
|
|
15
|
+
get_data_integration_settings: Callable[..., Dict[str, Optional[Dict[str, Union[str, Dict]]]]]
|
|
16
|
+
get_spark_session: Callable[..., Any]
|
|
17
|
+
get_spark_session_from_global_vars: Callable[..., Any]
|
|
18
|
+
pipeline: PipelineInterface
|
|
19
|
+
upstream_blocks: Sequence['BlockInterface']
|
|
20
|
+
uuid: str
|
|
21
|
+
variable_manager: Any
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@dataclass
|
|
25
|
+
class VariableInterface:
|
|
26
|
+
is_partial_data_readable: Callable[[], bool]
|
|
27
|
+
items_count: Callable[..., Optional[int]]
|
|
28
|
+
read_partial_data: Callable
|
|
29
|
+
uuid: str
|