mage-ai 0.9.69__py3-none-any.whl → 0.9.71__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mage-ai might be problematic. Click here for more details.
- mage_ai/ai/utils/xgboost.py +222 -0
- mage_ai/api/errors.py +37 -25
- mage_ai/api/operations/base.py +13 -1
- mage_ai/api/parsers/PipelineScheduleParser.py +1 -1
- mage_ai/api/policies/BackfillPolicy.py +1 -0
- mage_ai/api/policies/BlockOutputPolicy.py +40 -17
- mage_ai/api/policies/GlobalDataProductPolicy.py +91 -41
- mage_ai/api/policies/KernelPolicy.py +55 -32
- mage_ai/api/policies/KernelProcessPolicy.py +56 -0
- mage_ai/api/policies/OutputPolicy.py +73 -41
- mage_ai/api/policies/PipelinePolicy.py +206 -137
- mage_ai/api/policies/WorkspacePolicy.py +1 -0
- mage_ai/api/presenters/BackfillPresenter.py +1 -0
- mage_ai/api/presenters/BlockLayoutItemPresenter.py +9 -7
- mage_ai/api/presenters/BlockPresenter.py +1 -1
- mage_ai/api/presenters/GlobalDataProductPresenter.py +6 -1
- mage_ai/api/presenters/KernelPresenter.py +5 -26
- mage_ai/api/presenters/KernelProcessPresenter.py +28 -0
- mage_ai/api/presenters/PipelinePresenter.py +18 -5
- mage_ai/api/presenters/StatusPresenter.py +2 -0
- mage_ai/api/presenters/SyncPresenter.py +25 -0
- mage_ai/api/resources/AutocompleteItemResource.py +1 -1
- mage_ai/api/resources/BlockLayoutItemResource.py +90 -44
- mage_ai/api/resources/BlockOutputResource.py +42 -9
- mage_ai/api/resources/BlockResource.py +4 -3
- mage_ai/api/resources/BlockRunResource.py +27 -22
- mage_ai/api/resources/ClusterResource.py +4 -1
- mage_ai/api/resources/CustomTemplateResource.py +34 -14
- mage_ai/api/resources/DataProviderResource.py +1 -1
- mage_ai/api/resources/ExecutionStateResource.py +3 -1
- mage_ai/api/resources/FileContentResource.py +8 -2
- mage_ai/api/resources/FileResource.py +10 -4
- mage_ai/api/resources/FileVersionResource.py +3 -1
- mage_ai/api/resources/GitBranchResource.py +101 -31
- mage_ai/api/resources/GitCustomBranchResource.py +29 -1
- mage_ai/api/resources/GlobalDataProductResource.py +44 -7
- mage_ai/api/resources/GlobalHookResource.py +4 -1
- mage_ai/api/resources/IntegrationDestinationResource.py +6 -2
- mage_ai/api/resources/IntegrationSourceResource.py +8 -4
- mage_ai/api/resources/IntegrationSourceStreamResource.py +6 -2
- mage_ai/api/resources/KernelProcessResource.py +44 -0
- mage_ai/api/resources/KernelResource.py +25 -3
- mage_ai/api/resources/OauthResource.py +1 -1
- mage_ai/api/resources/OutputResource.py +33 -11
- mage_ai/api/resources/PageBlockLayoutResource.py +34 -23
- mage_ai/api/resources/PipelineInteractionResource.py +31 -15
- mage_ai/api/resources/PipelineResource.py +258 -125
- mage_ai/api/resources/PipelineRunResource.py +52 -7
- mage_ai/api/resources/PipelineScheduleResource.py +11 -2
- mage_ai/api/resources/PipelineTriggerResource.py +6 -1
- mage_ai/api/resources/ProjectResource.py +18 -7
- mage_ai/api/resources/PullRequestResource.py +6 -4
- mage_ai/api/resources/SecretResource.py +1 -1
- mage_ai/api/resources/SeedResource.py +8 -1
- mage_ai/api/resources/StatusResource.py +21 -6
- mage_ai/api/resources/SyncResource.py +6 -8
- mage_ai/api/resources/VariableResource.py +46 -26
- mage_ai/api/resources/VersionControlProjectResource.py +9 -2
- mage_ai/api/resources/WidgetResource.py +1 -1
- mage_ai/api/resources/WorkspaceResource.py +6 -5
- mage_ai/api/views.py +47 -40
- mage_ai/authentication/permissions/seed.py +16 -2
- mage_ai/authentication/providers/oidc.py +21 -1
- mage_ai/autocomplete/utils.py +13 -9
- mage_ai/cache/base.py +1 -1
- mage_ai/cache/block.py +18 -12
- mage_ai/cache/block_action_object/__init__.py +33 -5
- mage_ai/cache/file.py +22 -19
- mage_ai/cache/pipeline.py +18 -12
- mage_ai/cli/main.py +1 -0
- mage_ai/cluster_manager/aws/emr_cluster_manager.py +9 -5
- mage_ai/cluster_manager/config.py +2 -2
- mage_ai/cluster_manager/kubernetes/workload_manager.py +52 -1
- mage_ai/cluster_manager/manage.py +1 -1
- mage_ai/cluster_manager/workspace/base.py +7 -1
- mage_ai/cluster_manager/workspace/kubernetes.py +22 -1
- mage_ai/command_center/applications/factory.py +10 -7
- mage_ai/command_center/applications/utils.py +2 -2
- mage_ai/command_center/files/factory.py +17 -15
- mage_ai/command_center/presenters/text.py +1 -1
- mage_ai/command_center/utils.py +25 -13
- mage_ai/data/__init__.py +0 -0
- mage_ai/data/constants.py +45 -0
- mage_ai/data/models/__init__.py +0 -0
- mage_ai/data/models/base.py +119 -0
- mage_ai/data/models/constants.py +1 -0
- mage_ai/data/models/generator.py +115 -0
- mage_ai/data/models/manager.py +168 -0
- mage_ai/data/models/pyarrow/__init__.py +0 -0
- mage_ai/data/models/pyarrow/record_batch.py +55 -0
- mage_ai/data/models/pyarrow/shared.py +21 -0
- mage_ai/data/models/pyarrow/table.py +8 -0
- mage_ai/data/models/reader.py +103 -0
- mage_ai/data/models/utils.py +59 -0
- mage_ai/data/models/writer.py +91 -0
- mage_ai/data/tabular/__init__.py +0 -0
- mage_ai/data/tabular/constants.py +23 -0
- mage_ai/data/tabular/mocks.py +19 -0
- mage_ai/data/tabular/models.py +126 -0
- mage_ai/data/tabular/reader.py +602 -0
- mage_ai/data/tabular/utils.py +102 -0
- mage_ai/data/tabular/writer.py +266 -0
- mage_ai/data/variables/__init__.py +0 -0
- mage_ai/data/variables/wrapper.py +54 -0
- mage_ai/data_cleaner/analysis/charts.py +61 -39
- mage_ai/data_cleaner/column_types/column_type_detector.py +53 -31
- mage_ai/data_cleaner/estimators/encoders.py +5 -2
- mage_ai/data_integrations/utils/scheduler.py +16 -11
- mage_ai/data_preparation/decorators.py +1 -0
- mage_ai/data_preparation/executors/block_executor.py +237 -155
- mage_ai/data_preparation/executors/k8s_block_executor.py +30 -7
- mage_ai/data_preparation/executors/k8s_pipeline_executor.py +30 -7
- mage_ai/data_preparation/executors/streaming_pipeline_executor.py +2 -2
- mage_ai/data_preparation/git/__init__.py +77 -29
- mage_ai/data_preparation/git/api.py +69 -8
- mage_ai/data_preparation/git/utils.py +64 -34
- mage_ai/data_preparation/logging/logger_manager.py +4 -3
- mage_ai/data_preparation/models/block/__init__.py +1562 -879
- mage_ai/data_preparation/models/block/data_integration/mixins.py +4 -3
- mage_ai/data_preparation/models/block/dynamic/__init__.py +17 -6
- mage_ai/data_preparation/models/block/dynamic/child.py +41 -102
- mage_ai/data_preparation/models/block/dynamic/constants.py +1 -0
- mage_ai/data_preparation/models/block/dynamic/counter.py +296 -0
- mage_ai/data_preparation/models/block/dynamic/data.py +16 -0
- mage_ai/data_preparation/models/block/dynamic/factory.py +163 -0
- mage_ai/data_preparation/models/block/dynamic/models.py +19 -0
- mage_ai/data_preparation/models/block/dynamic/shared.py +92 -0
- mage_ai/data_preparation/models/block/dynamic/utils.py +295 -167
- mage_ai/data_preparation/models/block/dynamic/variables.py +384 -144
- mage_ai/data_preparation/models/block/dynamic/wrappers.py +77 -0
- mage_ai/data_preparation/models/block/extension/utils.py +10 -1
- mage_ai/data_preparation/models/block/global_data_product/__init__.py +35 -3
- mage_ai/data_preparation/models/block/integration/__init__.py +6 -2
- mage_ai/data_preparation/models/block/outputs.py +722 -0
- mage_ai/data_preparation/models/block/platform/mixins.py +7 -8
- mage_ai/data_preparation/models/block/r/__init__.py +56 -38
- mage_ai/data_preparation/models/block/remote/__init__.py +0 -0
- mage_ai/data_preparation/models/block/remote/models.py +58 -0
- mage_ai/data_preparation/models/block/settings/__init__.py +0 -0
- mage_ai/data_preparation/models/block/settings/dynamic/__init__.py +0 -0
- mage_ai/data_preparation/models/block/settings/dynamic/constants.py +7 -0
- mage_ai/data_preparation/models/block/settings/dynamic/mixins.py +118 -0
- mage_ai/data_preparation/models/block/settings/dynamic/models.py +31 -0
- mage_ai/data_preparation/models/block/settings/global_data_products/__init__.py +0 -0
- mage_ai/data_preparation/models/block/settings/global_data_products/mixins.py +20 -0
- mage_ai/data_preparation/models/block/settings/global_data_products/models.py +46 -0
- mage_ai/data_preparation/models/block/settings/variables/__init__.py +0 -0
- mage_ai/data_preparation/models/block/settings/variables/mixins.py +74 -0
- mage_ai/data_preparation/models/block/settings/variables/models.py +49 -0
- mage_ai/data_preparation/models/block/spark/mixins.py +2 -1
- mage_ai/data_preparation/models/block/sql/__init__.py +30 -5
- mage_ai/data_preparation/models/block/sql/utils/shared.py +21 -3
- mage_ai/data_preparation/models/block/utils.py +164 -69
- mage_ai/data_preparation/models/constants.py +21 -14
- mage_ai/data_preparation/models/custom_templates/custom_block_template.py +18 -13
- mage_ai/data_preparation/models/custom_templates/custom_pipeline_template.py +33 -16
- mage_ai/data_preparation/models/custom_templates/utils.py +1 -1
- mage_ai/data_preparation/models/file.py +41 -28
- mage_ai/data_preparation/models/global_data_product/__init__.py +100 -58
- mage_ai/data_preparation/models/global_hooks/models.py +1 -0
- mage_ai/data_preparation/models/interfaces.py +29 -0
- mage_ai/data_preparation/models/pipeline.py +374 -185
- mage_ai/data_preparation/models/pipelines/integration_pipeline.py +1 -2
- mage_ai/data_preparation/models/pipelines/seed.py +1 -1
- mage_ai/data_preparation/models/project/__init__.py +66 -18
- mage_ai/data_preparation/models/project/constants.py +2 -0
- mage_ai/data_preparation/models/triggers/__init__.py +124 -26
- mage_ai/data_preparation/models/utils.py +467 -17
- mage_ai/data_preparation/models/variable.py +1028 -137
- mage_ai/data_preparation/models/variables/__init__.py +0 -0
- mage_ai/data_preparation/models/variables/cache.py +149 -0
- mage_ai/data_preparation/models/variables/constants.py +72 -0
- mage_ai/data_preparation/models/variables/summarizer.py +336 -0
- mage_ai/data_preparation/models/variables/utils.py +77 -0
- mage_ai/data_preparation/models/widget/__init__.py +63 -41
- mage_ai/data_preparation/models/widget/charts.py +40 -27
- mage_ai/data_preparation/models/widget/constants.py +2 -0
- mage_ai/data_preparation/models/widget/utils.py +3 -3
- mage_ai/data_preparation/preferences.py +3 -3
- mage_ai/data_preparation/repo_manager.py +55 -21
- mage_ai/data_preparation/storage/base_storage.py +2 -2
- mage_ai/data_preparation/storage/gcs_storage.py +7 -4
- mage_ai/data_preparation/storage/local_storage.py +18 -9
- mage_ai/data_preparation/storage/s3_storage.py +5 -2
- mage_ai/data_preparation/templates/data_exporters/streaming/oracledb.yaml +8 -0
- mage_ai/data_preparation/variable_manager.py +281 -76
- mage_ai/io/base.py +3 -2
- mage_ai/io/bigquery.py +1 -0
- mage_ai/io/redshift.py +7 -5
- mage_ai/kernels/__init__.py +0 -0
- mage_ai/kernels/models.py +188 -0
- mage_ai/kernels/utils.py +169 -0
- mage_ai/orchestration/concurrency.py +6 -2
- mage_ai/orchestration/db/__init__.py +1 -0
- mage_ai/orchestration/db/migrations/versions/0227396a216c_add_userproject_table.py +38 -0
- mage_ai/orchestration/db/migrations/versions/42a14d6143f1_update_token_column_type.py +54 -0
- mage_ai/orchestration/db/models/dynamic/__init__.py +0 -0
- mage_ai/orchestration/db/models/dynamic/controller.py +67 -0
- mage_ai/orchestration/db/models/oauth.py +12 -18
- mage_ai/orchestration/db/models/projects.py +10 -0
- mage_ai/orchestration/db/models/schedules.py +225 -187
- mage_ai/orchestration/db/models/schedules_project_platform.py +18 -12
- mage_ai/orchestration/db/models/utils.py +46 -5
- mage_ai/orchestration/metrics/pipeline_run.py +8 -9
- mage_ai/orchestration/notification/sender.py +38 -15
- mage_ai/orchestration/pipeline_scheduler_original.py +64 -33
- mage_ai/orchestration/pipeline_scheduler_project_platform.py +1 -1
- mage_ai/orchestration/run_status_checker.py +11 -4
- mage_ai/orchestration/triggers/api.py +41 -2
- mage_ai/orchestration/triggers/global_data_product.py +9 -4
- mage_ai/orchestration/triggers/utils.py +10 -1
- mage_ai/orchestration/utils/resources.py +3 -0
- mage_ai/presenters/charts/data_sources/base.py +4 -2
- mage_ai/presenters/charts/data_sources/block.py +15 -9
- mage_ai/presenters/charts/data_sources/chart_code.py +8 -5
- mage_ai/presenters/charts/data_sources/constants.py +1 -0
- mage_ai/presenters/charts/data_sources/system_metrics.py +22 -0
- mage_ai/presenters/interactions/models.py +11 -7
- mage_ai/presenters/pages/loaders/pipelines.py +5 -3
- mage_ai/presenters/pages/models/page_components/pipeline_schedules.py +3 -1
- mage_ai/presenters/utils.py +2 -0
- mage_ai/server/api/blocks.py +2 -1
- mage_ai/server/api/downloads.py +9 -2
- mage_ai/server/api/runs.py +151 -0
- mage_ai/server/api/triggers.py +3 -1
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +8 -8
- mage_ai/server/frontend_dist/_next/static/UZLabyPgcxtZvp0O0EUUS/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1376-22de38b4ad008d8a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1557-25a7d985d5564fd3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1668-30b4619b9534519b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1799-c42db95a015689ee.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2996-2108b53b9d371d8d.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{3548-fa0792ddb88f4646.js → 3548-9d26185b3fb663b1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{3763-61b542dafdbf5754.js → 3763-40780c6d1e4b261d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3782-129dd2a2448a2e36.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3958-bcdfa414ccfa1eb2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/4168-97fd1578d1a38315.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/4982-fa5a238b139fbdd2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5699-176f445e1313f001.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7162-7dd03f0f605de721.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7779-68d2b72a90c5f925.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7966-5446a8e43711e2f9.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8023-6c2f172f48dcb99b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8095-c351b8a735d73e0c.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9624-8b8e100079ab69e1.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{main-77fe248a6fbd12d8.js → main-b99d4e30a88d9dc7.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-9fe2d9d07c94e968.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{block-layout-14f952f66964022f.js → block-layout-7f4b735c67115df5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/[...slug]-e7d48e6b0c3068ac.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products-b943f31f050fc3a4.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-4bfc84ff07d7656f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{overview-597b74828bf105db.js → overview-9f1ac4ec003884f3.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-3edc6270c5b0e962.js → frontend_dist/_next/static/chunks/pages/pipeline-runs-6d183f91a2ff6668.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-7e737f6fc7e83e9b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-38e1fbcfbfc1014e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-d94488e3f2eeef36.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-cc641a7fa8473796.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-a5c0362763a21fa8.js → block-runs-284309877f3c5a5a.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-26250e5335194ade.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-7acc7afc00df17c2.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-5f4c8128b2413fd8.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-4ebfc8e400315dda.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-e5e0150a256aadb3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-eb11c5390c982b49.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-1bdfda8edc9cf4a8.js → triggers-4612d15a65c35912.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/{profile-3f0df3decc856ee9.js → profile-3ae43c932537b254.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-b603d7fe4b175256.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js → frontend_dist/_next/static/chunks/pages/settings/platform/settings-319ddbabc239e91b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-47b64ced27c24985.js → [...slug]-5c360f72e4498855.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{permissions-e5a4d3d815cec25d.js → permissions-fb29fa6c2bd90bb0.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-3b76fa959ffa09d3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-379e1ee292504842.js → [...slug]-3b787b42f1093b1f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles-0b83fbdd39e85f5b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-a1e6950974d643a8.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/{[...slug]-2af9afbe727d88aa.js → [...slug]-0aa019d87db8b0b8.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-a4db8710f703c729.js → users-88c694d19207f2ec.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{triggers-9cba3211434a8966.js → triggers-a599c6ac89be8c8d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-31d0d50f7f30462b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{webpack-d079359c241db804.js → webpack-ac7fdc472bedf682.js} +1 -1
- mage_ai/server/frontend_dist/block-layout.html +3 -3
- mage_ai/server/frontend_dist/compute.html +6 -6
- mage_ai/server/frontend_dist/files.html +6 -6
- mage_ai/server/frontend_dist/global-data-products/[...slug].html +6 -6
- mage_ai/server/frontend_dist/global-data-products.html +6 -6
- mage_ai/server/frontend_dist/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist/global-hooks.html +6 -6
- mage_ai/server/frontend_dist/index.html +3 -3
- mage_ai/server/frontend_dist/manage/files.html +6 -6
- mage_ai/server/frontend_dist/manage/settings.html +6 -6
- mage_ai/server/frontend_dist/manage/users/[user].html +6 -6
- mage_ai/server/frontend_dist/manage/users/new.html +6 -6
- mage_ai/server/frontend_dist/manage/users.html +6 -6
- mage_ai/server/frontend_dist/manage.html +6 -6
- mage_ai/server/frontend_dist/oauth.html +5 -5
- mage_ai/server/frontend_dist/overview.html +6 -6
- mage_ai/server/frontend_dist/pipeline-runs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +3 -3
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +3 -3
- mage_ai/server/frontend_dist/pipelines.html +6 -6
- mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist/platform/global-hooks.html +6 -6
- mage_ai/server/frontend_dist/settings/account/profile.html +6 -6
- mage_ai/server/frontend_dist/settings/platform/preferences.html +6 -6
- mage_ai/server/frontend_dist/settings/platform/settings.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/permissions.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/roles.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/users.html +6 -6
- mage_ai/server/frontend_dist/settings.html +3 -3
- mage_ai/server/frontend_dist/sign-in.html +15 -15
- mage_ai/server/frontend_dist/templates/[...slug].html +6 -6
- mage_ai/server/frontend_dist/templates.html +6 -6
- mage_ai/server/frontend_dist/terminal.html +6 -6
- mage_ai/server/frontend_dist/test.html +3 -3
- mage_ai/server/frontend_dist/triggers.html +6 -6
- mage_ai/server/frontend_dist/version-control.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/404.html +8 -8
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1376-22de38b4ad008d8a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-25a7d985d5564fd3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1668-30b4619b9534519b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1799-c42db95a015689ee.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2996-2108b53b9d371d8d.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{3548-fa0792ddb88f4646.js → 3548-9d26185b3fb663b1.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{3763-61b542dafdbf5754.js → 3763-40780c6d1e4b261d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-129dd2a2448a2e36.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3958-bcdfa414ccfa1eb2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4168-97fd1578d1a38315.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4982-fa5a238b139fbdd2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-176f445e1313f001.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7162-7dd03f0f605de721.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7779-68d2b72a90c5f925.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-5446a8e43711e2f9.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8023-6c2f172f48dcb99b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8095-c351b8a735d73e0c.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-8b8e100079ab69e1.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{main-70b78159c2bb3fe1.js → main-384298e9133cec76.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-13a578bce3b7f30c.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{block-layout-14f952f66964022f.js → block-layout-7f4b735c67115df5.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/[...slug]-e7d48e6b0c3068ac.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products-b943f31f050fc3a4.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-4bfc84ff07d7656f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{overview-597b74828bf105db.js → overview-9f1ac4ec003884f3.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipeline-runs-3edc6270c5b0e962.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-6d183f91a2ff6668.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-7e737f6fc7e83e9b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-38e1fbcfbfc1014e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-d94488e3f2eeef36.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-cc641a7fa8473796.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-a5c0362763a21fa8.js → block-runs-284309877f3c5a5a.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-26250e5335194ade.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-7acc7afc00df17c2.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-5f4c8128b2413fd8.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-4ebfc8e400315dda.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-e5e0150a256aadb3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-eb11c5390c982b49.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-1bdfda8edc9cf4a8.js → triggers-4612d15a65c35912.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/{profile-3f0df3decc856ee9.js → profile-3ae43c932537b254.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-b603d7fe4b175256.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-319ddbabc239e91b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-47b64ced27c24985.js → [...slug]-5c360f72e4498855.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{permissions-e5a4d3d815cec25d.js → permissions-fb29fa6c2bd90bb0.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-3b76fa959ffa09d3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-379e1ee292504842.js → [...slug]-3b787b42f1093b1f.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles-0b83fbdd39e85f5b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-a1e6950974d643a8.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/{[...slug]-2af9afbe727d88aa.js → [...slug]-0aa019d87db8b0b8.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-a4db8710f703c729.js → users-88c694d19207f2ec.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{triggers-9cba3211434a8966.js → triggers-a599c6ac89be8c8d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-31d0d50f7f30462b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{webpack-68c003fb6a175cd7.js → webpack-481689d9989710cd.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/kcptwoOU-JJJg6Vwpkfmx/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/block-layout.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/compute.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/files.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-hooks.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/index.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/manage/files.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/oauth.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/overview.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +3 -3
- mage_ai/server/frontend_dist_base_path_template/pipelines.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/sign-in.html +15 -15
- mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/templates.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/terminal.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/test.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/triggers.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/version-control.html +6 -6
- mage_ai/server/kernel_output_parser.py +4 -1
- mage_ai/server/scheduler_manager.py +12 -1
- mage_ai/server/server.py +69 -42
- mage_ai/server/utils/custom_output.py +284 -0
- mage_ai/server/utils/execute_custom_code.py +245 -0
- mage_ai/server/utils/output_display.py +123 -289
- mage_ai/server/websocket_server.py +116 -69
- mage_ai/services/aws/ecs/ecs.py +1 -0
- mage_ai/services/k8s/config.py +27 -4
- mage_ai/services/k8s/job_manager.py +6 -1
- mage_ai/services/k8s/utils.py +97 -0
- mage_ai/services/ssh/aws/emr/utils.py +8 -8
- mage_ai/settings/keys/auth.py +1 -0
- mage_ai/settings/platform/__init__.py +159 -38
- mage_ai/settings/platform/constants.py +5 -0
- mage_ai/settings/platform/utils.py +53 -10
- mage_ai/settings/repo.py +26 -12
- mage_ai/settings/server.py +128 -37
- mage_ai/shared/array.py +24 -1
- mage_ai/shared/complex.py +45 -0
- mage_ai/shared/config.py +2 -1
- mage_ai/shared/custom_logger.py +11 -0
- mage_ai/shared/dates.py +10 -6
- mage_ai/shared/files.py +63 -8
- mage_ai/shared/hash.py +33 -9
- mage_ai/shared/io.py +9 -5
- mage_ai/shared/models.py +82 -24
- mage_ai/shared/outputs.py +87 -0
- mage_ai/shared/parsers.py +144 -13
- mage_ai/shared/path_fixer.py +11 -7
- mage_ai/shared/singletons/__init__.py +0 -0
- mage_ai/shared/singletons/base.py +47 -0
- mage_ai/shared/singletons/memory.py +38 -0
- mage_ai/shared/strings.py +34 -1
- mage_ai/shared/yaml.py +24 -0
- mage_ai/streaming/sinks/oracledb.py +57 -0
- mage_ai/streaming/sinks/sink_factory.py +4 -0
- mage_ai/system/__init__.py +0 -0
- mage_ai/system/constants.py +14 -0
- mage_ai/system/memory/__init__.py +0 -0
- mage_ai/system/memory/constants.py +1 -0
- mage_ai/system/memory/manager.py +174 -0
- mage_ai/system/memory/presenters.py +158 -0
- mage_ai/system/memory/process.py +216 -0
- mage_ai/system/memory/samples.py +13 -0
- mage_ai/system/memory/utils.py +656 -0
- mage_ai/system/memory/wrappers.py +177 -0
- mage_ai/system/models.py +58 -0
- mage_ai/system/storage/__init__.py +0 -0
- mage_ai/system/storage/utils.py +29 -0
- mage_ai/tests/api/endpoints/mixins.py +2 -2
- mage_ai/tests/api/endpoints/test_blocks.py +2 -1
- mage_ai/tests/api/endpoints/test_custom_designs.py +4 -4
- mage_ai/tests/api/endpoints/test_pipeline_runs.py +2 -2
- mage_ai/tests/api/endpoints/test_projects.py +2 -1
- mage_ai/tests/api/operations/base/mixins.py +1 -1
- mage_ai/tests/api/operations/base/test_base.py +27 -27
- mage_ai/tests/api/operations/base/test_base_with_user_authentication.py +27 -27
- mage_ai/tests/api/operations/base/test_base_with_user_permissions.py +23 -23
- mage_ai/tests/api/operations/test_syncs.py +6 -4
- mage_ai/tests/api/resources/test_pipeline_resource.py +11 -4
- mage_ai/tests/authentication/oauth/test_utils.py +1 -1
- mage_ai/tests/authentication/providers/test_oidc.py +59 -0
- mage_ai/tests/base_test.py +2 -2
- mage_ai/tests/data/__init__.py +0 -0
- mage_ai/tests/data/models/__init__.py +0 -0
- mage_ai/tests/data_preparation/executors/test_block_executor.py +23 -16
- mage_ai/tests/data_preparation/git/test_git.py +4 -1
- mage_ai/tests/data_preparation/models/block/dynamic/test_combos.py +305 -0
- mage_ai/tests/data_preparation/models/block/dynamic/test_counter.py +212 -0
- mage_ai/tests/data_preparation/models/block/dynamic/test_factory.py +360 -0
- mage_ai/tests/data_preparation/models/block/dynamic/test_variables.py +332 -0
- mage_ai/tests/data_preparation/models/block/hook/test_hook_block.py +2 -2
- mage_ai/tests/data_preparation/models/block/platform/test_mixins.py +1 -1
- mage_ai/tests/data_preparation/models/block/sql/utils/test_shared.py +26 -1
- mage_ai/tests/data_preparation/models/block/test_global_data_product.py +5 -2
- mage_ai/tests/data_preparation/models/custom_templates/test_utils.py +5 -4
- mage_ai/tests/data_preparation/models/global_hooks/test_hook.py +3 -0
- mage_ai/tests/data_preparation/models/global_hooks/test_predicates.py +9 -3
- mage_ai/tests/data_preparation/models/test_block.py +115 -120
- mage_ai/tests/data_preparation/models/test_blocks_helper.py +114 -0
- mage_ai/tests/data_preparation/models/test_global_data_product.py +41 -24
- mage_ai/tests/data_preparation/models/test_pipeline.py +9 -6
- mage_ai/tests/data_preparation/models/test_project.py +4 -1
- mage_ai/tests/data_preparation/models/test_utils.py +80 -0
- mage_ai/tests/data_preparation/models/test_variable.py +242 -69
- mage_ai/tests/data_preparation/models/variables/__init__.py +0 -0
- mage_ai/tests/data_preparation/models/variables/test_summarizer.py +481 -0
- mage_ai/tests/data_preparation/storage/shared/__init__.py +0 -0
- mage_ai/tests/data_preparation/test_repo_manager.py +6 -7
- mage_ai/tests/data_preparation/test_variable_manager.py +57 -48
- mage_ai/tests/factory.py +64 -43
- mage_ai/tests/orchestration/db/models/test_schedules.py +3 -3
- mage_ai/tests/orchestration/db/models/test_schedules_dynamic_blocks.py +279 -0
- mage_ai/tests/orchestration/test_pipeline_scheduler.py +1 -0
- mage_ai/tests/orchestration/triggers/test_global_data_product.py +141 -138
- mage_ai/tests/orchestration/triggers/test_utils.py +3 -2
- mage_ai/tests/server/test_server.py +19 -0
- mage_ai/tests/services/k8s/test_job_manager.py +27 -6
- mage_ai/tests/streaming/sinks/test_oracledb.py +38 -0
- mage_ai/tests/test_shared.py +61 -0
- mage_ai/usage_statistics/logger.py +7 -2
- mage_ai/utils/code.py +33 -19
- mage_ai/version_control/branch/utils.py +2 -1
- mage_ai/version_control/models.py +3 -2
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/METADATA +6 -3
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/RECORD +555 -454
- mage_ai/data_preparation/models/global_data_product/constants.py +0 -6
- mage_ai/server/frontend_dist/_next/static/_krrrgup_C-dPOpX36S8I/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1557-df144fbd8b2208c3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2631-b9f9bea3f1cf906d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3782-ef4cd4f0b52072d0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/4783-422429203610c318.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5699-6d708c6b2153ea08.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/635-0d6b7c8804bcd2dc.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7022-0d52dd8868621fb0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7361-8a23dd8360593e7a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7966-f07b2913f7326b50.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8095-bdce03896ef9639a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8146-6bed4e7401e067e6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9265-d2a1aaec75ec69b8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9440-4069842b90d4b801.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9624-59b2f803f9c88cd6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9832-67896490f6e8a014.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-d9c89527266296f7.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/[...slug]-591abd392dc50ed4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products-78e8e88f2a757a18.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-852d403c7bda21b3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-95ffcd3e2b27e567.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-1ed9045b2f1dfd65.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-f028ef3880ed856c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles-36fa165a48af586b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/KLL5mirre9d7_ZeEpaw3s/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-df144fbd8b2208c3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2631-b9f9bea3f1cf906d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-ef4cd4f0b52072d0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4783-422429203610c318.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-6d708c6b2153ea08.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/635-0d6b7c8804bcd2dc.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7022-0d52dd8868621fb0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-8a23dd8360593e7a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-f07b2913f7326b50.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8095-bdce03896ef9639a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8146-6bed4e7401e067e6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9265-d2a1aaec75ec69b8.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9440-4069842b90d4b801.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-59b2f803f9c88cd6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9832-67896490f6e8a014.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-d9c89527266296f7.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/[...slug]-591abd392dc50ed4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products-78e8e88f2a757a18.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-852d403c7bda21b3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-95ffcd3e2b27e567.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-1ed9045b2f1dfd65.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-f028ef3880ed856c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles-36fa165a48af586b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +0 -1
- mage_ai/shared/memory.py +0 -90
- mage_ai/tests/data_preparation/models/block/dynamic/test_dynamic_helpers.py +0 -48
- /mage_ai/{tests/data_preparation/shared → ai/utils}/__init__.py +0 -0
- /mage_ai/server/frontend_dist/_next/static/{_krrrgup_C-dPOpX36S8I → UZLabyPgcxtZvp0O0EUUS}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{KLL5mirre9d7_ZeEpaw3s → kcptwoOU-JJJg6Vwpkfmx}/_ssgManifest.js +0 -0
- /mage_ai/tests/data_preparation/{shared → storage/shared}/test_secrets.py +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/top_level.txt +0 -0
|
@@ -148,7 +148,8 @@ class FileResource(GenericResource):
|
|
|
148
148
|
pipeline_file, pipeline_config = Pipeline.import_from_zip(content, overwrite)
|
|
149
149
|
tags = pipeline_config.get('tags', [])
|
|
150
150
|
pipeline_uuid = pipeline_config.get('uuid')
|
|
151
|
-
|
|
151
|
+
repo_path = get_repo_path(user=user)
|
|
152
|
+
pipeline = Pipeline(pipeline_uuid, config=pipeline_config, repo_path=repo_path)
|
|
152
153
|
if tags:
|
|
153
154
|
from mage_ai.cache.tag import TagCache
|
|
154
155
|
|
|
@@ -161,7 +162,7 @@ class FileResource(GenericResource):
|
|
|
161
162
|
|
|
162
163
|
block_cache = await BlockCache.initialize_cache()
|
|
163
164
|
for block in pipeline.blocks_by_uuid.values():
|
|
164
|
-
block_cache.add_pipeline(block, pipeline)
|
|
165
|
+
block_cache.add_pipeline(block, pipeline, repo_path)
|
|
165
166
|
|
|
166
167
|
return self(pipeline_file, user, **kwargs)
|
|
167
168
|
else:
|
|
@@ -175,7 +176,9 @@ class FileResource(GenericResource):
|
|
|
175
176
|
overwrite=overwrite,
|
|
176
177
|
)
|
|
177
178
|
|
|
178
|
-
block_type = Block.block_type_from_path(
|
|
179
|
+
block_type = Block.block_type_from_path(
|
|
180
|
+
dir_path, repo_path=get_repo_path(user=user)
|
|
181
|
+
)
|
|
179
182
|
if block_type:
|
|
180
183
|
cache_block_action_object = await BlockActionObjectCache.initialize_cache()
|
|
181
184
|
cache_block_action_object.update_block(block_file_absolute_path=file.file_path)
|
|
@@ -235,7 +238,10 @@ class FileResource(GenericResource):
|
|
|
235
238
|
|
|
236
239
|
@safe_db_query
|
|
237
240
|
async def update(self, payload, **kwargs):
|
|
238
|
-
block_type = Block.block_type_from_path(
|
|
241
|
+
block_type = Block.block_type_from_path(
|
|
242
|
+
self.model.dir_path,
|
|
243
|
+
repo_path=get_repo_path(user=self.current_user),
|
|
244
|
+
)
|
|
239
245
|
cache_block_action_object = None
|
|
240
246
|
if block_type:
|
|
241
247
|
cache_block_action_object = await BlockActionObjectCache.initialize_cache()
|
|
@@ -4,6 +4,7 @@ from mage_ai.data_preparation.models.block import Block
|
|
|
4
4
|
from mage_ai.data_preparation.models.file import File
|
|
5
5
|
from mage_ai.data_preparation.models.pipeline import Pipeline
|
|
6
6
|
from mage_ai.orchestration.db import safe_db_query
|
|
7
|
+
from mage_ai.settings.repo import get_repo_path
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
class FileVersionResource(GenericResource):
|
|
@@ -21,7 +22,8 @@ class FileVersionResource(GenericResource):
|
|
|
21
22
|
block_uuid = block_uuid[0]
|
|
22
23
|
|
|
23
24
|
if pipeline_uuid and block_uuid:
|
|
24
|
-
|
|
25
|
+
repo_path = get_repo_path(user=user)
|
|
26
|
+
pipeline = Pipeline.get(pipeline_uuid, repo_path=repo_path)
|
|
25
27
|
if pipeline:
|
|
26
28
|
block = pipeline.get_block(block_uuid)
|
|
27
29
|
if block:
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import os
|
|
2
|
-
from typing import Dict, List
|
|
2
|
+
from typing import Dict, List, Tuple
|
|
3
3
|
|
|
4
4
|
from mage_ai.api.errors import ApiError
|
|
5
5
|
from mage_ai.api.resources.GenericResource import GenericResource
|
|
6
6
|
from mage_ai.authentication.oauth.constants import ProviderName
|
|
7
7
|
from mage_ai.data_preparation.git import REMOTE_NAME, Git, api
|
|
8
8
|
from mage_ai.data_preparation.git.clients.base import Client as GitClient
|
|
9
|
-
from mage_ai.data_preparation.git.utils import
|
|
9
|
+
from mage_ai.data_preparation.git.utils import (
|
|
10
|
+
get_oauth_access_token_for_user,
|
|
11
|
+
get_provider_from_remote_url,
|
|
12
|
+
)
|
|
10
13
|
from mage_ai.data_preparation.preferences import get_preferences
|
|
14
|
+
from mage_ai.server.logger import Logger
|
|
15
|
+
from mage_ai.settings.repo import get_repo_path
|
|
11
16
|
from mage_ai.shared.path_fixer import remove_base_repo_path
|
|
12
17
|
from mage_ai.shared.strings import capitalize_remove_underscore_lower
|
|
13
18
|
|
|
19
|
+
logger = Logger().new_server_logger(__name__)
|
|
20
|
+
|
|
14
21
|
|
|
15
22
|
def build_file_object(obj):
|
|
16
23
|
arr = []
|
|
@@ -29,9 +36,21 @@ def build_file_object(obj):
|
|
|
29
36
|
class GitBranchResource(GenericResource):
|
|
30
37
|
@classmethod
|
|
31
38
|
def get_git_manager(
|
|
32
|
-
self,
|
|
39
|
+
self,
|
|
40
|
+
user=None,
|
|
41
|
+
context_data: Dict = None,
|
|
42
|
+
preferences=None,
|
|
43
|
+
repo_path: str = None,
|
|
44
|
+
setup_repo: bool = False,
|
|
45
|
+
config_overwrite: Dict = None,
|
|
33
46
|
) -> Git:
|
|
34
|
-
return Git.get_manager(
|
|
47
|
+
return Git.get_manager(
|
|
48
|
+
context_data=context_data,
|
|
49
|
+
preferences=preferences,
|
|
50
|
+
repo_path=repo_path,
|
|
51
|
+
setup_repo=setup_repo,
|
|
52
|
+
user=user,
|
|
53
|
+
)
|
|
35
54
|
|
|
36
55
|
@classmethod
|
|
37
56
|
def collection(self, query, meta, user, **kwargs):
|
|
@@ -53,7 +72,7 @@ class GitBranchResource(GenericResource):
|
|
|
53
72
|
if remote_url:
|
|
54
73
|
provider = get_provider_from_remote_url(remote_url)
|
|
55
74
|
|
|
56
|
-
access_token =
|
|
75
|
+
access_token = get_oauth_access_token_for_user(user, provider=provider)
|
|
57
76
|
if access_token:
|
|
58
77
|
branches = GitClient.get_client_for_provider(provider)(
|
|
59
78
|
access_token.token
|
|
@@ -64,7 +83,15 @@ class GitBranchResource(GenericResource):
|
|
|
64
83
|
arr += [dict(name=branch) for branch in git_manager.branches]
|
|
65
84
|
|
|
66
85
|
if include_remote_branches:
|
|
67
|
-
|
|
86
|
+
try:
|
|
87
|
+
git_manager.fetch()
|
|
88
|
+
mage_remote = git_manager.origin
|
|
89
|
+
arr += [
|
|
90
|
+
dict(name=ref.name)
|
|
91
|
+
for ref in mage_remote.refs
|
|
92
|
+
]
|
|
93
|
+
except Exception:
|
|
94
|
+
logger.warning('Failed to fetch remote branches')
|
|
68
95
|
|
|
69
96
|
return self.build_result_set(
|
|
70
97
|
arr,
|
|
@@ -83,11 +110,22 @@ class GitBranchResource(GenericResource):
|
|
|
83
110
|
|
|
84
111
|
@classmethod
|
|
85
112
|
async def member(self, pk, user, **kwargs):
|
|
86
|
-
|
|
113
|
+
context_data = kwargs.get('context_data')
|
|
114
|
+
repo_path = get_repo_path(context_data=context_data, user=user)
|
|
115
|
+
preferences = get_preferences(
|
|
116
|
+
repo_path=repo_path,
|
|
117
|
+
user=user,
|
|
118
|
+
)
|
|
87
119
|
setup_repo = False
|
|
88
120
|
if preferences.is_git_integration_enabled():
|
|
89
121
|
setup_repo = True
|
|
90
|
-
git_manager = self.get_git_manager(
|
|
122
|
+
git_manager = self.get_git_manager(
|
|
123
|
+
user=user,
|
|
124
|
+
context_data=context_data,
|
|
125
|
+
preferences=preferences,
|
|
126
|
+
repo_path=repo_path,
|
|
127
|
+
setup_repo=setup_repo,
|
|
128
|
+
)
|
|
91
129
|
|
|
92
130
|
display_format = kwargs.get('meta', {}).get('_format')
|
|
93
131
|
if 'with_basic_details' == display_format:
|
|
@@ -98,7 +136,7 @@ class GitBranchResource(GenericResource):
|
|
|
98
136
|
modified_files=[],
|
|
99
137
|
name=git_manager.current_branch,
|
|
100
138
|
staged_files=[],
|
|
101
|
-
sync_config=
|
|
139
|
+
sync_config=preferences.sync_config,
|
|
102
140
|
untracked_files=[],
|
|
103
141
|
),
|
|
104
142
|
user,
|
|
@@ -116,39 +154,34 @@ class GitBranchResource(GenericResource):
|
|
|
116
154
|
modified_files=modified_files,
|
|
117
155
|
name=git_manager.current_branch,
|
|
118
156
|
staged_files=staged_files,
|
|
119
|
-
sync_config=
|
|
157
|
+
sync_config=preferences.sync_config,
|
|
120
158
|
untracked_files=untracked_files,
|
|
121
159
|
),
|
|
122
160
|
user,
|
|
123
161
|
**kwargs,
|
|
124
162
|
)
|
|
125
163
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
files = payload.get('files', None)
|
|
136
|
-
message = payload.get('message', None)
|
|
137
|
-
|
|
164
|
+
@classmethod
|
|
165
|
+
def get_oauth_config(
|
|
166
|
+
cls,
|
|
167
|
+
remote_url: str = None,
|
|
168
|
+
remote_name: str = None,
|
|
169
|
+
user=None,
|
|
170
|
+
) -> Tuple[str, str, str, Dict]:
|
|
171
|
+
git_manager = cls.get_git_manager(user=user)
|
|
138
172
|
url = None
|
|
139
|
-
remote_url = query.get('remote_url', None)
|
|
140
173
|
if remote_url:
|
|
141
|
-
url = remote_url
|
|
142
|
-
elif
|
|
143
|
-
remote = git_manager.repo.remotes[
|
|
174
|
+
url = remote_url
|
|
175
|
+
elif remote_name:
|
|
176
|
+
remote = git_manager.repo.remotes[remote_name]
|
|
144
177
|
url = list(remote.urls)[0]
|
|
145
178
|
|
|
146
179
|
provider = ProviderName.GITHUB
|
|
147
180
|
if url:
|
|
148
181
|
provider = get_provider_from_remote_url(url)
|
|
149
182
|
|
|
150
|
-
access_token =
|
|
151
|
-
|
|
183
|
+
access_token = get_oauth_access_token_for_user(
|
|
184
|
+
user, provider=provider
|
|
152
185
|
)
|
|
153
186
|
http_access_token = git_manager.get_access_token()
|
|
154
187
|
|
|
@@ -158,9 +191,9 @@ class GitBranchResource(GenericResource):
|
|
|
158
191
|
token = access_token.token
|
|
159
192
|
user_from_api = api.get_user(token, provider=provider)
|
|
160
193
|
# Default to mage user email if no email is returned from API
|
|
161
|
-
email = user_from_api.get(
|
|
162
|
-
|
|
163
|
-
|
|
194
|
+
email = user_from_api.get('email')
|
|
195
|
+
if email is None and user:
|
|
196
|
+
email = user.email
|
|
164
197
|
config_overwrite = dict(
|
|
165
198
|
username=user_from_api.get('username'),
|
|
166
199
|
email=email,
|
|
@@ -168,6 +201,37 @@ class GitBranchResource(GenericResource):
|
|
|
168
201
|
elif http_access_token:
|
|
169
202
|
token = http_access_token
|
|
170
203
|
|
|
204
|
+
return token, provider, url, config_overwrite
|
|
205
|
+
|
|
206
|
+
async def update(self, payload, **kwargs):
|
|
207
|
+
query = kwargs.get('query') or {}
|
|
208
|
+
|
|
209
|
+
git_manager = self.get_git_manager(user=self.current_user)
|
|
210
|
+
action_type = payload.get('action_type')
|
|
211
|
+
action_payload = payload.get('action_payload', dict())
|
|
212
|
+
action_remote = action_payload.get('remote', None)
|
|
213
|
+
action_branch = action_payload.get('branch', None)
|
|
214
|
+
action_arg = action_payload.get('arg', None)
|
|
215
|
+
|
|
216
|
+
# Eventually we would want to give the user the ability to pass in multiple
|
|
217
|
+
# arguments to the action, but for now we will just pass in a single argument.
|
|
218
|
+
action_kwargs = dict()
|
|
219
|
+
if action_arg:
|
|
220
|
+
action_kwargs[action_arg] = True
|
|
221
|
+
|
|
222
|
+
files = payload.get('files', None)
|
|
223
|
+
message = payload.get('message', None)
|
|
224
|
+
|
|
225
|
+
remote_url = query.get('remote_url', None)
|
|
226
|
+
if remote_url:
|
|
227
|
+
remote_url = remote_url[0]
|
|
228
|
+
|
|
229
|
+
token, provider, url, config_overwrite = self.get_oauth_config(
|
|
230
|
+
remote_url=remote_url,
|
|
231
|
+
remote_name=action_remote,
|
|
232
|
+
user=self.current_user,
|
|
233
|
+
)
|
|
234
|
+
|
|
171
235
|
# Recreate git manager with updated config
|
|
172
236
|
git_manager = self.get_git_manager(
|
|
173
237
|
user=self.current_user, config_overwrite=config_overwrite
|
|
@@ -206,6 +270,7 @@ class GitBranchResource(GenericResource):
|
|
|
206
270
|
action_branch,
|
|
207
271
|
token,
|
|
208
272
|
config_overwrite=config_overwrite,
|
|
273
|
+
**action_kwargs,
|
|
209
274
|
)
|
|
210
275
|
if custom_progress.other_lines:
|
|
211
276
|
lines = custom_progress.other_lines
|
|
@@ -236,6 +301,7 @@ class GitBranchResource(GenericResource):
|
|
|
236
301
|
action_branch,
|
|
237
302
|
token,
|
|
238
303
|
config_overwrite=config_overwrite,
|
|
304
|
+
**action_kwargs,
|
|
239
305
|
)
|
|
240
306
|
else:
|
|
241
307
|
custom_progress = api.fetch(
|
|
@@ -243,6 +309,7 @@ class GitBranchResource(GenericResource):
|
|
|
243
309
|
url,
|
|
244
310
|
token,
|
|
245
311
|
config_overwrite=config_overwrite,
|
|
312
|
+
**action_kwargs,
|
|
246
313
|
)
|
|
247
314
|
|
|
248
315
|
if custom_progress and custom_progress.other_lines:
|
|
@@ -271,6 +338,7 @@ class GitBranchResource(GenericResource):
|
|
|
271
338
|
url,
|
|
272
339
|
token,
|
|
273
340
|
config_overwrite=config_overwrite,
|
|
341
|
+
**action_kwargs,
|
|
274
342
|
)
|
|
275
343
|
|
|
276
344
|
if custom_progress and custom_progress.other_lines:
|
|
@@ -304,6 +372,7 @@ class GitBranchResource(GenericResource):
|
|
|
304
372
|
action_branch,
|
|
305
373
|
token,
|
|
306
374
|
config_overwrite=config_overwrite,
|
|
375
|
+
**action_kwargs,
|
|
307
376
|
)
|
|
308
377
|
else:
|
|
309
378
|
self.model[
|
|
@@ -324,6 +393,7 @@ class GitBranchResource(GenericResource):
|
|
|
324
393
|
url,
|
|
325
394
|
token,
|
|
326
395
|
config_overwrite=config_overwrite,
|
|
396
|
+
**action_kwargs,
|
|
327
397
|
)
|
|
328
398
|
else:
|
|
329
399
|
self.model[
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from typing import Dict, List
|
|
2
2
|
|
|
3
3
|
from mage_ai.api.resources.GitBranchResource import GitBranchResource
|
|
4
|
-
from mage_ai.data_preparation.git import REMOTE_NAME, Git
|
|
4
|
+
from mage_ai.data_preparation.git import REMOTE_NAME, Git, api
|
|
5
5
|
from mage_ai.data_preparation.sync import AuthType
|
|
6
6
|
|
|
7
7
|
|
|
@@ -17,6 +17,34 @@ class GitCustomBranchResource(GitBranchResource):
|
|
|
17
17
|
user=user,
|
|
18
18
|
)
|
|
19
19
|
|
|
20
|
+
@classmethod
|
|
21
|
+
def create(cls, payload, user, **kwargs):
|
|
22
|
+
branch = payload.get('name')
|
|
23
|
+
remote = payload.get('remote')
|
|
24
|
+
|
|
25
|
+
token, _, url, config_overwrite = cls.get_oauth_config(
|
|
26
|
+
remote_name=remote,
|
|
27
|
+
user=user,
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
git_manager = cls.get_git_manager(
|
|
31
|
+
user=user, config_overwrite=config_overwrite
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
if remote:
|
|
35
|
+
api.switch_branch(
|
|
36
|
+
remote,
|
|
37
|
+
url,
|
|
38
|
+
branch,
|
|
39
|
+
token,
|
|
40
|
+
config_overwrite=config_overwrite,
|
|
41
|
+
user=user,
|
|
42
|
+
)
|
|
43
|
+
else:
|
|
44
|
+
git_manager.switch_branch(branch)
|
|
45
|
+
|
|
46
|
+
return cls(dict(name=git_manager.current_branch), user, **kwargs)
|
|
47
|
+
|
|
20
48
|
@classmethod
|
|
21
49
|
async def member(self, pk, user, **kwargs):
|
|
22
50
|
resource = await GitBranchResource.member(pk, user, **kwargs)
|
|
@@ -1,43 +1,80 @@
|
|
|
1
1
|
from mage_ai.api.errors import ApiError
|
|
2
2
|
from mage_ai.api.resources.GenericResource import GenericResource
|
|
3
3
|
from mage_ai.data_preparation.models.global_data_product import GlobalDataProduct
|
|
4
|
+
from mage_ai.settings.repo import get_repo_path
|
|
4
5
|
from mage_ai.shared.hash import ignore_keys
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
class GlobalDataProductResource(GenericResource):
|
|
8
9
|
@classmethod
|
|
9
10
|
def collection(self, query, meta, user, **kwargs):
|
|
11
|
+
repo_path = query.get('repo_path', [None])
|
|
12
|
+
if repo_path:
|
|
13
|
+
repo_path = repo_path[0]
|
|
14
|
+
|
|
15
|
+
current_project = query.get('current_project', [False])
|
|
16
|
+
if current_project:
|
|
17
|
+
current_project = current_project[0]
|
|
18
|
+
|
|
19
|
+
if current_project:
|
|
20
|
+
repo_path = get_repo_path(user=user)
|
|
21
|
+
|
|
10
22
|
return self.build_result_set(
|
|
11
|
-
sorted(GlobalDataProduct.load_all(), key=lambda x: x.uuid),
|
|
23
|
+
sorted(GlobalDataProduct.load_all(repo_path), key=lambda x: x.uuid),
|
|
12
24
|
user,
|
|
13
25
|
**kwargs,
|
|
14
26
|
)
|
|
15
27
|
|
|
16
28
|
@classmethod
|
|
17
29
|
def create(self, payload, user, **kwargs):
|
|
30
|
+
repo_path = get_repo_path(user=user)
|
|
18
31
|
uuid = payload.get('uuid')
|
|
19
|
-
if GlobalDataProduct.get(uuid):
|
|
32
|
+
if GlobalDataProduct.get(uuid, repo_path):
|
|
20
33
|
error = ApiError.RESOURCE_INVALID.copy()
|
|
21
|
-
error.update(
|
|
34
|
+
error.update(
|
|
35
|
+
dict(message=f'A global data product with UUID {uuid} already exists.')
|
|
36
|
+
)
|
|
22
37
|
raise ApiError(error)
|
|
23
38
|
|
|
24
|
-
model = GlobalDataProduct(
|
|
39
|
+
model = GlobalDataProduct(
|
|
40
|
+
uuid,
|
|
41
|
+
repo_path=repo_path,
|
|
42
|
+
**ignore_keys(payload, ['uuid']),
|
|
43
|
+
)
|
|
25
44
|
model.save()
|
|
26
45
|
|
|
27
46
|
return self(model, user, **kwargs)
|
|
28
47
|
|
|
29
48
|
@classmethod
|
|
30
49
|
def member(self, pk, user, **kwargs):
|
|
31
|
-
|
|
50
|
+
query = kwargs.get('query', {})
|
|
51
|
+
project = query.get('project', [None])
|
|
52
|
+
if project:
|
|
53
|
+
project = project[0]
|
|
54
|
+
repo_path = get_repo_path(user=user)
|
|
55
|
+
return self(
|
|
56
|
+
GlobalDataProduct.get(
|
|
57
|
+
pk, repo_path=repo_path if not project else None, project=project
|
|
58
|
+
),
|
|
59
|
+
user,
|
|
60
|
+
**kwargs,
|
|
61
|
+
)
|
|
32
62
|
|
|
33
63
|
def delete(self, **kwargs):
|
|
34
64
|
self.model.delete()
|
|
35
65
|
|
|
36
66
|
def update(self, payload, **kwargs):
|
|
67
|
+
repo_path = get_repo_path(user=self.current_user)
|
|
37
68
|
uuid = payload.get('uuid')
|
|
38
|
-
if
|
|
69
|
+
if (
|
|
70
|
+
self.model
|
|
71
|
+
and self.model.uuid != uuid
|
|
72
|
+
and GlobalDataProduct.get(uuid, repo_path)
|
|
73
|
+
):
|
|
39
74
|
error = ApiError.RESOURCE_INVALID.copy()
|
|
40
|
-
error.update(
|
|
75
|
+
error.update(
|
|
76
|
+
dict(message=f'A global data product with UUID {uuid} already exists.')
|
|
77
|
+
)
|
|
41
78
|
raise ApiError(error)
|
|
42
79
|
|
|
43
80
|
if self.model:
|
|
@@ -15,6 +15,7 @@ from mage_ai.data_preparation.models.global_hooks.models import (
|
|
|
15
15
|
)
|
|
16
16
|
from mage_ai.data_preparation.models.pipeline import Pipeline
|
|
17
17
|
from mage_ai.orchestration.db.models.oauth import User
|
|
18
|
+
from mage_ai.settings.repo import get_repo_path
|
|
18
19
|
from mage_ai.settings.utils import base_repo_path
|
|
19
20
|
from mage_ai.shared.array import find
|
|
20
21
|
from mage_ai.shared.hash import ignore_keys
|
|
@@ -190,6 +191,8 @@ class GlobalHookResource(AsyncBaseResource):
|
|
|
190
191
|
|
|
191
192
|
|
|
192
193
|
async def __load_pipelines(resource: GlobalHookResource):
|
|
194
|
+
repo_path = get_repo_path(user=resource.current_user)
|
|
195
|
+
|
|
193
196
|
pipeline_uuids = []
|
|
194
197
|
for res in resource.result_set():
|
|
195
198
|
if res.model.pipeline_settings and res.model.pipeline_settings.get('uuid'):
|
|
@@ -199,7 +202,7 @@ async def __load_pipelines(resource: GlobalHookResource):
|
|
|
199
202
|
|
|
200
203
|
async def get_pipeline(uuid):
|
|
201
204
|
try:
|
|
202
|
-
return await Pipeline.get_async(uuid)
|
|
205
|
+
return await Pipeline.get_async(uuid, repo_path=repo_path)
|
|
203
206
|
except Exception as err:
|
|
204
207
|
err_message = f'Error loading pipeline {uuid}: {err}.'
|
|
205
208
|
if err.__class__.__name__ == 'OSError' and 'Too many open files' in err.strerror:
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
from mage_ai.api.resources.GenericResource import GenericResource
|
|
2
2
|
from mage_ai.data_integrations.destinations.constants import DESTINATIONS
|
|
3
3
|
from mage_ai.data_preparation.models.constants import BlockType
|
|
4
|
-
from mage_ai.data_preparation.models.pipelines.integration_pipeline import
|
|
4
|
+
from mage_ai.data_preparation.models.pipelines.integration_pipeline import (
|
|
5
|
+
IntegrationPipeline,
|
|
6
|
+
)
|
|
5
7
|
from mage_ai.orchestration.db import safe_db_query
|
|
6
8
|
from mage_ai.server.api.integration_sources import get_collection
|
|
9
|
+
from mage_ai.settings.repo import get_repo_path
|
|
7
10
|
|
|
8
11
|
|
|
9
12
|
class IntegrationDestinationResource(GenericResource):
|
|
@@ -27,7 +30,8 @@ class IntegrationDestinationResource(GenericResource):
|
|
|
27
30
|
action_type = payload['action_type']
|
|
28
31
|
if 'test_connection' == action_type:
|
|
29
32
|
pipeline_uuid = payload['pipeline_uuid']
|
|
30
|
-
|
|
33
|
+
repo_path = get_repo_path(user=user)
|
|
34
|
+
pipeline = IntegrationPipeline.get(pipeline_uuid, repo_path=repo_path)
|
|
31
35
|
config = payload['config']
|
|
32
36
|
|
|
33
37
|
try:
|
|
@@ -22,6 +22,7 @@ from mage_ai.data_preparation.models.pipelines.integration_pipeline import (
|
|
|
22
22
|
from mage_ai.orchestration.db import safe_db_query
|
|
23
23
|
from mage_ai.orchestration.db.models.schedules import PipelineRun
|
|
24
24
|
from mage_ai.server.api.integration_sources import get_collection
|
|
25
|
+
from mage_ai.settings.repo import get_repo_path
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
def get_state_data_for_blocks(
|
|
@@ -140,13 +141,14 @@ class IntegrationSourceResource(GenericResource):
|
|
|
140
141
|
success = False
|
|
141
142
|
streams = []
|
|
142
143
|
|
|
144
|
+
repo_path = get_repo_path(user=user)
|
|
143
145
|
action_type = payload['action_type']
|
|
144
146
|
if 'test_connection' == action_type:
|
|
145
147
|
pipeline_uuid = payload['pipeline_uuid']
|
|
146
148
|
block_uuid = payload.get('block_uuid')
|
|
147
149
|
|
|
148
150
|
if block_uuid:
|
|
149
|
-
pipeline = Pipeline.get(pipeline_uuid)
|
|
151
|
+
pipeline = Pipeline.get(pipeline_uuid, repo_path=repo_path)
|
|
150
152
|
block = pipeline.get_block(block_uuid)
|
|
151
153
|
try:
|
|
152
154
|
test_connection(block)
|
|
@@ -155,7 +157,7 @@ class IntegrationSourceResource(GenericResource):
|
|
|
155
157
|
traceback.print_exc()
|
|
156
158
|
error_message = str(e)
|
|
157
159
|
else:
|
|
158
|
-
pipeline = IntegrationPipeline.get(pipeline_uuid)
|
|
160
|
+
pipeline = IntegrationPipeline.get(pipeline_uuid, repo_path=repo_path)
|
|
159
161
|
config = payload['config']
|
|
160
162
|
|
|
161
163
|
try:
|
|
@@ -166,7 +168,7 @@ class IntegrationSourceResource(GenericResource):
|
|
|
166
168
|
error_message = str(e)
|
|
167
169
|
elif 'sample_data' == action_type:
|
|
168
170
|
pipeline_uuid = payload['pipeline_uuid']
|
|
169
|
-
pipeline = IntegrationPipeline.get(pipeline_uuid)
|
|
171
|
+
pipeline = IntegrationPipeline.get(pipeline_uuid, repo_path=repo_path)
|
|
170
172
|
|
|
171
173
|
streams_updated = pipeline.preview_data(
|
|
172
174
|
BlockType.DATA_LOADER,
|
|
@@ -222,4 +224,6 @@ class IntegrationSourceResource(GenericResource):
|
|
|
222
224
|
|
|
223
225
|
return self(state_data, user, **kwargs)
|
|
224
226
|
|
|
225
|
-
|
|
227
|
+
repo_path = get_repo_path(user=user)
|
|
228
|
+
|
|
229
|
+
return self(IntegrationPipeline.get(pk, repo_path=repo_path), user, **kwargs)
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
from mage_ai.api.resources.GenericResource import GenericResource
|
|
2
|
-
from mage_ai.data_preparation.models.pipelines.integration_pipeline import
|
|
2
|
+
from mage_ai.data_preparation.models.pipelines.integration_pipeline import (
|
|
3
|
+
IntegrationPipeline,
|
|
4
|
+
)
|
|
3
5
|
from mage_ai.orchestration.db import safe_db_query
|
|
6
|
+
from mage_ai.settings.repo import get_repo_path
|
|
4
7
|
|
|
5
8
|
|
|
6
9
|
class IntegrationSourceStreamResource(GenericResource):
|
|
7
10
|
@classmethod
|
|
8
11
|
@safe_db_query
|
|
9
12
|
def member(self, pk, user, **kwargs):
|
|
10
|
-
|
|
13
|
+
repo_path = get_repo_path(user=user)
|
|
14
|
+
return self(IntegrationPipeline.get(pk, repo_path=repo_path), user, **kwargs)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from mage_ai.api.errors import ApiError
|
|
2
|
+
from mage_ai.api.resources.GenericResource import GenericResource
|
|
3
|
+
from mage_ai.kernels.models import KernelProcess
|
|
4
|
+
from mage_ai.kernels.utils import get_process_info
|
|
5
|
+
|
|
6
|
+
TERMINATE_INACTIVE = '__terminate_inactive__'
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class KernelProcessResource(GenericResource):
|
|
10
|
+
@classmethod
|
|
11
|
+
async def collection(cls, query, meta, user, **kwargs):
|
|
12
|
+
check_active_status = query.get('check_active_status', [False])
|
|
13
|
+
if check_active_status:
|
|
14
|
+
check_active_status = check_active_status[0]
|
|
15
|
+
|
|
16
|
+
return cls.build_result_set(
|
|
17
|
+
KernelProcess.load_all(check_active_status=check_active_status),
|
|
18
|
+
user,
|
|
19
|
+
**kwargs,
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def member(self, pk, user, **kwargs):
|
|
24
|
+
if TERMINATE_INACTIVE == pk:
|
|
25
|
+
return self(KernelProcess.load(pid=TERMINATE_INACTIVE), user, **kwargs)
|
|
26
|
+
|
|
27
|
+
query = kwargs.get('query', {})
|
|
28
|
+
check_active_status = query.get('check_active_status', [False])
|
|
29
|
+
if check_active_status:
|
|
30
|
+
check_active_status = check_active_status[0]
|
|
31
|
+
|
|
32
|
+
info = get_process_info(pk, check_active_status=check_active_status)
|
|
33
|
+
|
|
34
|
+
if not info:
|
|
35
|
+
raise ApiError(ApiError.RESOURCE_NOT_FOUND)
|
|
36
|
+
|
|
37
|
+
kernel_process = KernelProcess.load(**info)
|
|
38
|
+
return self(kernel_process, user, **kwargs)
|
|
39
|
+
|
|
40
|
+
async def delete(self, **kwargs):
|
|
41
|
+
if self.model.pid == TERMINATE_INACTIVE:
|
|
42
|
+
KernelProcess.terminate_inactive()
|
|
43
|
+
|
|
44
|
+
self.model.terminate()
|