mage-ai 0.9.45__py3-none-any.whl → 0.9.47__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.
- mage_ai/api/constants.py +2 -0
- mage_ai/api/operations/base.py +230 -12
- mage_ai/api/policies/BasePolicy.py +3 -3
- mage_ai/api/policies/ComputeClusterPolicy.py +96 -0
- mage_ai/api/policies/ComputeConnectionPolicy.py +74 -0
- mage_ai/api/policies/ComputeServicePolicy.py +50 -0
- mage_ai/api/policies/DownloadPolicy.py +29 -0
- mage_ai/api/policies/GlobalHookPolicy.py +126 -0
- mage_ai/api/policies/IntegrationSourcePolicy.py +62 -0
- mage_ai/api/policies/OauthPolicy.py +56 -4
- mage_ai/api/policies/ProjectPolicy.py +1 -0
- mage_ai/api/presenters/ComputeClusterPresenter.py +19 -0
- mage_ai/api/presenters/ComputeConnectionPresenter.py +26 -0
- mage_ai/api/presenters/ComputeServicePresenter.py +15 -0
- mage_ai/api/presenters/DownloadPresenter.py +13 -0
- mage_ai/api/presenters/GlobalHookPresenter.py +74 -0
- mage_ai/api/presenters/IntegrationSourcePresenter.py +9 -2
- mage_ai/api/presenters/PipelinePresenter.py +3 -0
- mage_ai/api/presenters/PipelineRunPresenter.py +8 -3
- mage_ai/api/presenters/PipelineSchedulePresenter.py +22 -1
- mage_ai/api/presenters/ProjectPresenter.py +1 -0
- mage_ai/api/presenters/SparkApplicationPresenter.py +2 -0
- mage_ai/api/presenters/WorkspacePresenter.py +22 -22
- mage_ai/api/resources/AsyncBaseResource.py +39 -0
- mage_ai/api/resources/BlockResource.py +5 -0
- mage_ai/api/resources/ClusterResource.py +1 -1
- mage_ai/api/resources/ComputeClusterResource.py +109 -0
- mage_ai/api/resources/ComputeConnectionResource.py +103 -0
- mage_ai/api/resources/ComputeServiceResource.py +35 -0
- mage_ai/api/resources/DataProviderResource.py +2 -0
- mage_ai/api/resources/DownloadResource.py +56 -0
- mage_ai/api/resources/ExecutionStateResource.py +1 -1
- mage_ai/api/resources/GlobalHookResource.py +192 -0
- mage_ai/api/resources/IntegrationSourceResource.py +149 -2
- mage_ai/api/resources/KernelResource.py +10 -0
- mage_ai/api/resources/OauthResource.py +28 -33
- mage_ai/api/resources/PipelineResource.py +4 -4
- mage_ai/api/resources/PipelineScheduleResource.py +37 -16
- mage_ai/api/resources/ProjectResource.py +5 -3
- mage_ai/api/resources/SessionResource.py +0 -9
- mage_ai/api/resources/SparkApplicationResource.py +5 -5
- mage_ai/api/resources/SparkEnvironmentResource.py +1 -2
- mage_ai/api/resources/SparkExecutorResource.py +1 -2
- mage_ai/api/resources/SparkJobResource.py +3 -6
- mage_ai/api/resources/SparkSqlResource.py +6 -11
- mage_ai/api/resources/SparkStageAttemptResource.py +2 -3
- mage_ai/api/resources/SparkStageAttemptTaskResource.py +1 -2
- mage_ai/api/resources/SparkStageAttemptTaskSummaryResource.py +1 -2
- mage_ai/api/resources/SparkStageResource.py +3 -6
- mage_ai/api/resources/SparkThreadResource.py +1 -2
- mage_ai/api/resources/mixins/spark.py +25 -4
- mage_ai/authentication/oauth2.py +1 -3
- mage_ai/authentication/permissions/constants.py +4 -0
- mage_ai/authentication/providers/active_directory.py +136 -0
- mage_ai/authentication/providers/constants.py +3 -0
- mage_ai/authentication/providers/ghe.py +24 -25
- mage_ai/authentication/providers/google.py +25 -26
- mage_ai/authentication/providers/oauth.py +2 -2
- mage_ai/authentication/providers/okta.py +28 -29
- mage_ai/authentication/providers/sso.py +2 -2
- mage_ai/cluster_manager/aws/emr_cluster_manager.py +2 -1
- mage_ai/cluster_manager/workspace/base.py +7 -3
- mage_ai/data_integrations/destinations/constants.py +1 -0
- mage_ai/data_integrations/sources/constants.py +5 -0
- mage_ai/data_integrations/utils/scheduler.py +57 -2
- mage_ai/data_preparation/executors/block_executor.py +9 -1
- mage_ai/data_preparation/executors/pipeline_executor.py +9 -0
- mage_ai/data_preparation/models/block/__init__.py +82 -17
- mage_ai/data_preparation/models/block/data_integration/constants.py +3 -0
- mage_ai/data_preparation/models/block/data_integration/data.py +1 -1
- mage_ai/data_preparation/models/block/data_integration/utils.py +196 -37
- mage_ai/data_preparation/models/block/spark/mixins.py +82 -34
- mage_ai/data_preparation/models/block/sql/utils/shared.py +18 -1
- mage_ai/data_preparation/models/block/utils.py +28 -13
- mage_ai/data_preparation/models/download/__init__.py +8 -0
- mage_ai/data_preparation/models/global_hooks/__init__.py +0 -0
- mage_ai/data_preparation/models/global_hooks/constants.py +93 -0
- mage_ai/data_preparation/models/global_hooks/models.py +992 -0
- mage_ai/data_preparation/models/global_hooks/predicates.py +316 -0
- mage_ai/data_preparation/models/global_hooks/utils.py +21 -0
- mage_ai/data_preparation/models/pipeline.py +84 -6
- mage_ai/data_preparation/models/pipelines/integration_pipeline.py +0 -1
- mage_ai/data_preparation/models/pipelines/models.py +16 -0
- mage_ai/data_preparation/models/project/__init__.py +6 -0
- mage_ai/data_preparation/models/project/constants.py +1 -0
- mage_ai/data_preparation/models/project/models.py +12 -0
- mage_ai/data_preparation/preferences.py +29 -18
- mage_ai/data_preparation/repo_manager.py +35 -3
- mage_ai/data_preparation/sync/__init__.py +2 -0
- mage_ai/data_preparation/templates/constants.py +14 -0
- mage_ai/data_preparation/templates/data_exporters/chroma.py +24 -0
- mage_ai/data_preparation/templates/data_exporters/streaming/rabbitmq.yaml +7 -0
- mage_ai/data_preparation/templates/data_loaders/chroma.py +27 -0
- mage_ai/data_preparation/templates/data_loaders/streaming/activemq.yaml +6 -0
- mage_ai/data_preparation/templates/data_loaders/streaming/nats.yaml +20 -0
- mage_ai/data_preparation/templates/repo/io_config.yaml +3 -0
- mage_ai/io/base.py +1 -0
- mage_ai/io/chroma.py +153 -0
- mage_ai/io/config.py +8 -0
- mage_ai/orchestration/db/models/schedules.py +100 -36
- mage_ai/orchestration/pipeline_scheduler.py +58 -19
- mage_ai/orchestration/queue/process_queue.py +9 -1
- mage_ai/orchestration/triggers/api.py +11 -3
- mage_ai/orchestration/triggers/constants.py +1 -0
- mage_ai/server/active_kernel.py +37 -4
- mage_ai/server/api/downloads.py +76 -1
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/frontend_dist/_next/static/N3FS4bHv0jpYeeg672uYK/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1749-bf512b4dabbab7fa.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{7519-8c29bbb92e03cc77.js → 1845-5ce774d5ab81ed57.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1952-57858e7445d24413.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/2714-1e79e9f2e998b544.js → frontend_dist/_next/static/chunks/2714-68fef54789d7eaeb.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2717-92cdffd87b6f6e05.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3419-715ca383fa15a5ef.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3437-b4d6a037cf5781f8.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3943-c9fb980f03df6450.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/4267-cb102e060a43d9bd.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3932-0ceca9599d6e6d00.js → frontend_dist/_next/static/chunks/4366-3e52497942acbafe.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{4783-1a21d9be47574bba.js → 4783-422429203610c318.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5457-949640f4037bf12f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5499-76cf8f023c6b0985.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/553-7f7919e14392ca67.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5638-a65610405a70961c.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5810-e26a0768db1cfdba.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5820-28adeabb5cda2b96.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{5896-14e5a23b1c6a0769.js → 5896-7b8e36634d7d94eb.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/600-705fe234320ec5de.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3122-f27de34d0b5426af.js → frontend_dist/_next/static/chunks/6285-648f9a732e100b2f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6798-b904395b0c18647b.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/5397-b5f2e477acc6bd6b.js → frontend_dist/_next/static/chunks/6965-c613d1834c8ed92d.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/7022-18fde36eb46e1d65.js → frontend_dist/_next/static/chunks/7022-e76cae3ba5ee5312.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/722-900f786d24f91b2e.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/7361-694e1e4fb9c97d68.js → frontend_dist/_next/static/chunks/7361-6c5c9063b9f91700.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/7858-c83d25349d0e980f.js → frontend_dist/_next/static/chunks/7858-d9df72e95e438284.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{8146-92e7ccfed169ee9c.js → 8146-27f0e31f309897a5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8264-0d582a6ca33c3dfa.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3684-cbda680fd8927d07.js → frontend_dist/_next/static/chunks/8432-f191e39f9b5893f2.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/845-9a73c65fe3fdc328.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8487-8e1c09546dff4dbf.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/90-a7308bae028d7001.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9264-cc44b07f248707b0.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9618-4eb49cdbd1ba11d7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{976-18c98af60b76f1a7.js → 976-0a8c2c4d7acd957b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/framework-22b71764bf44ede4.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-78c4a077a2f279c2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/block-layout-a24cb24b6f08bbc9.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/compute-419775ca1293b354.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-b37d221eb5ddc248.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/{[...slug]-3f6fc312f67ff72e.js → [...slug]-cfd68e760ae00958.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-data-products-f4cd03036c3e8723.js → global-data-products-c3b79ef31007f95b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-7adc543fc490367a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks-51d366993f6dd449.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/files-fe6e73463a20d67c.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-60845f0b59142f32.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-1d9b298fdceabbf1.js → frontend_dist/_next/static/chunks/pages/manage/users/[user]-9384c5f1efa2ac18.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-abd8571907664fdf.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{users-a7c970122a10afdc.js → users-28a930b148d99766.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-d8a38b5d1f50e798.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/overview-a4647a274cf4dffa.js → frontend_dist/_next/static/chunks/pages/overview-f0c40645f385f23f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipeline-runs-c79819d6826e5416.js → pipeline-runs-b35d37bfba8fbccc.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-9adc2974aada27ba.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-51b1311dff2a974e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-571c0962333b92f0.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-2333e524d34b474a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{logs-a52d2d3e0c2978f4.js → logs-ef680455ae54ccbe.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-ddddcddd2f74b4f6.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-4a238307feddb522.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-6d1afeb4a84f50f7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1ff9bb8e22ca1e75.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-ce717786f31e8f04.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d20b2cd08907afd.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-11363aa58d51f4e1.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-b75bf17498e87354.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-779c3ef0676a12ac.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-bbea9a088657404a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/{[pipeline]-35fe7762cb83a733.js → [pipeline]-02c843b9c8418bb5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-3737f2b0afc2ede3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-3c8f062913c66f3e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-d6a62284c7c99cb3.js → [...slug]-b78b1be5b9ed84b9.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{permissions-b1389695f758c32b.js → permissions-37b78a436eeab258.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-c1f4ed17d501ccca.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-0bdb66265286ab22.js → [...slug]-db05a80d18c168e5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{roles-e04e18fc295ca76a.js → roles-f55c77e4f46c8d33.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-2a1f8737561fdd94.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/{[...slug]-0267358c91122109.js → [...slug]-e3bf6e5d8bb250c4.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-50fed18bb9b8d142.js → users-20f0a050a42a015d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{settings-56f83205752b1323.js → settings-0f0121db7f5ff93d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-99e2748e3c1d57a3.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-9370551ffa462144.js → frontend_dist/_next/static/chunks/pages/templates/[...slug]-f44ccd1499ffd23a.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{templates-3cff90df13a1a755.js → templates-1bfaa1c50e844813.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-ed121e305169cf1c.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/test-9ae68758102cc843.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-8bdd858240d5dbf6.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-dd4fb405695f74bf.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{webpack-8af2b89c5a3779fc.js → webpack-fea697dd168c6d0c.js} +1 -1
- mage_ai/server/frontend_dist/block-layout.html +2 -2
- mage_ai/server/frontend_dist/compute.html +5 -5
- mage_ai/server/frontend_dist/files.html +5 -5
- mage_ai/server/frontend_dist/global-data-products/[...slug].html +5 -5
- mage_ai/server/frontend_dist/global-data-products.html +5 -5
- mage_ai/server/frontend_dist/global-hooks/[...slug].html +24 -0
- mage_ai/server/frontend_dist/global-hooks.html +24 -0
- mage_ai/server/frontend_dist/index.html +2 -2
- mage_ai/server/frontend_dist/manage/files.html +5 -5
- mage_ai/server/frontend_dist/manage/settings.html +5 -5
- mage_ai/server/frontend_dist/manage/users/[user].html +5 -5
- mage_ai/server/frontend_dist/manage/users/new.html +5 -5
- mage_ai/server/frontend_dist/manage/users.html +5 -5
- mage_ai/server/frontend_dist/manage.html +5 -5
- mage_ai/server/frontend_dist/oauth.html +4 -4
- mage_ai/server/frontend_dist/overview.html +5 -5
- mage_ai/server/frontend_dist/pipeline-runs.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist/pipelines.html +5 -5
- mage_ai/server/frontend_dist/settings/account/profile.html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/permissions.html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/roles.html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/users.html +5 -5
- mage_ai/server/frontend_dist/settings.html +2 -2
- mage_ai/server/frontend_dist/sign-in.html +24 -25
- mage_ai/server/frontend_dist/templates/[...slug].html +5 -5
- mage_ai/server/frontend_dist/templates.html +5 -5
- mage_ai/server/frontend_dist/terminal.html +5 -5
- mage_ai/server/frontend_dist/test.html +15 -15
- mage_ai/server/frontend_dist/triggers.html +5 -5
- mage_ai/server/frontend_dist/version-control.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/_next/static/aoO6jYZLVlUGCCdY-wmy8/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1749-bf512b4dabbab7fa.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{7519-8c29bbb92e03cc77.js → 1845-5ce774d5ab81ed57.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1952-57858e7445d24413.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/2714-1e79e9f2e998b544.js → frontend_dist_base_path_template/_next/static/chunks/2714-68fef54789d7eaeb.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-92cdffd87b6f6e05.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3419-715ca383fa15a5ef.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3437-b4d6a037cf5781f8.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3943-c9fb980f03df6450.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4267-cb102e060a43d9bd.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/3932-0ceca9599d6e6d00.js → frontend_dist_base_path_template/_next/static/chunks/4366-3e52497942acbafe.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{4783-1a21d9be47574bba.js → 4783-422429203610c318.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5457-949640f4037bf12f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5499-76cf8f023c6b0985.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/553-7f7919e14392ca67.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5638-a65610405a70961c.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5810-e26a0768db1cfdba.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5820-28adeabb5cda2b96.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{5896-14e5a23b1c6a0769.js → 5896-7b8e36634d7d94eb.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/600-705fe234320ec5de.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/3122-f27de34d0b5426af.js → frontend_dist_base_path_template/_next/static/chunks/6285-648f9a732e100b2f.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6798-b904395b0c18647b.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/5397-b5f2e477acc6bd6b.js → frontend_dist_base_path_template/_next/static/chunks/6965-c613d1834c8ed92d.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/7022-18fde36eb46e1d65.js → frontend_dist_base_path_template/_next/static/chunks/7022-e76cae3ba5ee5312.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/722-900f786d24f91b2e.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/7361-694e1e4fb9c97d68.js → frontend_dist_base_path_template/_next/static/chunks/7361-6c5c9063b9f91700.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/7858-c83d25349d0e980f.js → frontend_dist_base_path_template/_next/static/chunks/7858-d9df72e95e438284.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{8146-92e7ccfed169ee9c.js → 8146-27f0e31f309897a5.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8264-0d582a6ca33c3dfa.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/3684-cbda680fd8927d07.js → frontend_dist_base_path_template/_next/static/chunks/8432-f191e39f9b5893f2.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/845-9a73c65fe3fdc328.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8487-8e1c09546dff4dbf.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/90-a7308bae028d7001.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-cc44b07f248707b0.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9618-4eb49cdbd1ba11d7.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{976-18c98af60b76f1a7.js → 976-0a8c2c4d7acd957b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/framework-22b71764bf44ede4.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-78c4a077a2f279c2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/block-layout-a24cb24b6f08bbc9.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/compute-419775ca1293b354.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-b37d221eb5ddc248.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/{[...slug]-3f6fc312f67ff72e.js → [...slug]-cfd68e760ae00958.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-data-products-f4cd03036c3e8723.js → global-data-products-c3b79ef31007f95b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-7adc543fc490367a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks-51d366993f6dd449.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/files-fe6e73463a20d67c.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-60845f0b59142f32.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/users/[user]-1d9b298fdceabbf1.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-9384c5f1efa2ac18.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-abd8571907664fdf.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{users-a7c970122a10afdc.js → users-28a930b148d99766.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-d8a38b5d1f50e798.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/overview-a4647a274cf4dffa.js → frontend_dist_base_path_template/_next/static/chunks/pages/overview-f0c40645f385f23f.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{pipeline-runs-c79819d6826e5416.js → pipeline-runs-b35d37bfba8fbccc.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-9adc2974aada27ba.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-51b1311dff2a974e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-571c0962333b92f0.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-2333e524d34b474a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{logs-a52d2d3e0c2978f4.js → logs-ef680455ae54ccbe.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-ddddcddd2f74b4f6.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-4a238307feddb522.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-6d1afeb4a84f50f7.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1ff9bb8e22ca1e75.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-ce717786f31e8f04.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d20b2cd08907afd.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-11363aa58d51f4e1.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-b75bf17498e87354.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-779c3ef0676a12ac.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-bbea9a088657404a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/{[pipeline]-35fe7762cb83a733.js → [pipeline]-02c843b9c8418bb5.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-3737f2b0afc2ede3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-3c8f062913c66f3e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-d6a62284c7c99cb3.js → [...slug]-b78b1be5b9ed84b9.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{permissions-b1389695f758c32b.js → permissions-37b78a436eeab258.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-c1f4ed17d501ccca.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-0bdb66265286ab22.js → [...slug]-db05a80d18c168e5.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{roles-e04e18fc295ca76a.js → roles-f55c77e4f46c8d33.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-2a1f8737561fdd94.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/{[...slug]-0267358c91122109.js → [...slug]-e3bf6e5d8bb250c4.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-50fed18bb9b8d142.js → users-20f0a050a42a015d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{settings-56f83205752b1323.js → settings-0f0121db7f5ff93d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-99e2748e3c1d57a3.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/templates/[...slug]-9370551ffa462144.js → frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-f44ccd1499ffd23a.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{templates-3cff90df13a1a755.js → templates-1bfaa1c50e844813.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/terminal-ed121e305169cf1c.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/test-9ae68758102cc843.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-8bdd858240d5dbf6.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-dd4fb405695f74bf.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{webpack-074f3eb2281fba79.js → webpack-d30cb09c85b4c4f0.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/compute.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/files.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +24 -0
- mage_ai/server/frontend_dist_base_path_template/global-hooks.html +24 -0
- mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/files.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/oauth.html +4 -4
- mage_ai/server/frontend_dist_base_path_template/overview.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/sign-in.html +28 -29
- mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/templates.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/terminal.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/test.html +15 -15
- mage_ai/server/frontend_dist_base_path_template/triggers.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/version-control.html +5 -5
- mage_ai/server/server.py +44 -12
- mage_ai/server/utils/output_display.py +6 -0
- mage_ai/server/websocket_server.py +14 -0
- mage_ai/services/aws/emr/config.py +1 -0
- mage_ai/services/aws/emr/constants.py +1 -0
- mage_ai/services/aws/emr/emr.py +20 -7
- mage_ai/services/compute/__init__.py +0 -0
- mage_ai/services/compute/aws/__init__.py +0 -0
- mage_ai/services/compute/aws/constants.py +21 -0
- mage_ai/services/compute/aws/models.py +459 -0
- mage_ai/services/compute/aws/steps.py +482 -0
- mage_ai/services/compute/constants.py +27 -0
- mage_ai/services/compute/models.py +212 -0
- mage_ai/services/k8s/job_manager.py +4 -0
- mage_ai/services/spark/api/aws_emr.py +38 -0
- mage_ai/services/spark/api/base.py +7 -4
- mage_ai/services/spark/api/constants.py +4 -0
- mage_ai/services/spark/api/local.py +25 -24
- mage_ai/services/spark/api/service.py +15 -5
- mage_ai/services/spark/constants.py +1 -1
- mage_ai/services/spark/models/applications.py +45 -3
- mage_ai/services/spark/models/base.py +3 -19
- mage_ai/services/spark/models/environments.py +16 -11
- mage_ai/services/spark/models/executors.py +2 -2
- mage_ai/services/spark/models/sqls.py +46 -15
- mage_ai/services/spark/models/stages.py +55 -32
- mage_ai/services/spark/models/threads.py +2 -2
- mage_ai/services/spark/utils.py +22 -6
- mage_ai/services/ssh/__init__.py +0 -0
- mage_ai/services/ssh/aws/__init__.py +0 -0
- mage_ai/services/ssh/aws/emr/__init__.py +0 -0
- mage_ai/services/ssh/aws/emr/constants.py +10 -0
- mage_ai/services/ssh/aws/emr/models.py +326 -0
- mage_ai/services/ssh/aws/emr/utils.py +151 -0
- mage_ai/settings/__init__.py +8 -1
- mage_ai/settings/repo.py +3 -0
- mage_ai/settings/secret_generation.py +7 -0
- mage_ai/settings/sso.py +8 -0
- mage_ai/shared/files.py +47 -0
- mage_ai/shared/hash.py +16 -0
- mage_ai/shared/models.py +254 -0
- mage_ai/streaming/constants.py +3 -0
- mage_ai/streaming/sinks/postgres.py +2 -0
- mage_ai/streaming/sinks/rabbitmq.py +76 -0
- mage_ai/streaming/sinks/sink_factory.py +4 -0
- mage_ai/streaming/sources/activemq.py +89 -0
- mage_ai/streaming/sources/nats_js.py +182 -0
- mage_ai/streaming/sources/source_factory.py +8 -0
- mage_ai/tests/ai/test_ai_functions.py +53 -8
- mage_ai/tests/api/endpoints/test_oauths.py +33 -0
- mage_ai/tests/api/endpoints/test_projects.py +1 -0
- mage_ai/tests/api/endpoints/test_workspaces.py +55 -0
- mage_ai/tests/api/operations/test_base.py +7 -5
- mage_ai/tests/api/operations/test_operations.py +0 -1
- mage_ai/tests/api/operations/test_operations_with_hooks.py +622 -0
- mage_ai/tests/api/operations/test_syncs.py +0 -1
- mage_ai/tests/api/operations/test_users.py +13 -2
- mage_ai/tests/api/policies/test_oauth_policy.py +38 -0
- mage_ai/tests/data_preparation/models/global_hooks/__init__.py +0 -0
- mage_ai/tests/data_preparation/models/global_hooks/test_global_hooks.py +600 -0
- mage_ai/tests/data_preparation/models/global_hooks/test_hook.py +804 -0
- mage_ai/tests/data_preparation/models/global_hooks/test_predicates.py +803 -0
- mage_ai/tests/data_preparation/models/global_hooks/test_utils.py +38 -0
- mage_ai/tests/data_preparation/models/test_block.py +26 -0
- mage_ai/tests/data_preparation/models/test_pipeline.py +15 -0
- mage_ai/tests/data_preparation/test_repo_manager.py +11 -0
- mage_ai/tests/factory.py +105 -5
- mage_ai/tests/orchestration/queue/test_process_queue.py +15 -2
- mage_ai/tests/orchestration/test_pipeline_scheduler.py +82 -1
- mage_ai/tests/services/k8s/test_job_manager.py +38 -1
- mage_ai/tests/shared/mixins.py +328 -0
- mage_ai/tests/shared/test_hash.py +17 -1
- mage_ai/tests/streaming/sinks/test_rabbitmq.py +36 -0
- mage_ai/tests/streaming/sources/test_activemq.py +32 -0
- mage_ai/tests/streaming/sources/test_nats_js.py +32 -0
- mage_ai/tests/streaming/sources/test_source_factory.py +26 -1
- {mage_ai-0.9.45.dist-info → mage_ai-0.9.47.dist-info}/METADATA +14 -4
- {mage_ai-0.9.45.dist-info → mage_ai-0.9.47.dist-info}/RECORD +467 -386
- {mage_ai-0.9.45.dist-info → mage_ai-0.9.47.dist-info}/WHEEL +1 -1
- mage_ai/authentication/oauth/active_directory.py +0 -17
- mage_ai/server/frontend_dist/_next/static/chunks/1125-91d3ce33140ef041.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1749-607014ecf28268bf.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1952-573c7fc7ad84da6e.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3004-231cad9039ae5dcb.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3419-0873e170ef7d6303.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3943-9e1105393a3be0de.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/4267-335766a915ee2fa9.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5457-8be2e0a3fe0ba64b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5499-bca977f466e259e1.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/553-edf533e634e85192.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5810-37c6091b29a1fe53.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/600-0733eb84f0a0a9e0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6333-95ad799d13326dce.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/722-2a171fe616310f60.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8224-39a93ee1058b6069.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8264-6ef8fdb195694807.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8487-032ef9b17d20aad9.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9264-1b5c4b071ed544c3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/framework-7c365855dab1bf41.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-1203afde83fa2d6e.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/block-layout-c465c14d48392b11.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/compute-b1f8d5a7a9a30f2d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-93c094bad0f299fb.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/files-891e5bd5935f7473.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-d2e4ee4e68d36807.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-4a49126fcfe8ced0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-5f8c5d0bc6ad1113.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-b4c0a36c69c346a4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a9266d353f288e8c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-b5c29c852262312e.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-9f233917aa72ad82.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-5af599da035252a7.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-8597f8e13d80ee48.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-5e0d047a6c9cb1fc.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-b0a508aa52914dad.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-074c32397d341de9.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-50f5d8706ed0bc73.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-e151c1552fcb67bd.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-95394769a783c6c7.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-8336c4326f1e7d96.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-01dd679e4a21e0d9.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-4d9051c073a9b2ff.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-5a306deca6717862.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-0dbc5b11019e78a0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-578d862f3e56e6e6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/test-1c0588d685b909b9.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-ffaab4c013e62ba1.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-114000e84313994f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/icIDjCezcfhiKL87kgeSY/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/_O1kJQLGtZmoBMyWpQrea/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1125-91d3ce33140ef041.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1749-607014ecf28268bf.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1952-573c7fc7ad84da6e.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3004-231cad9039ae5dcb.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3419-0873e170ef7d6303.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3943-9e1105393a3be0de.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4267-335766a915ee2fa9.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5457-8be2e0a3fe0ba64b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5499-bca977f466e259e1.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/553-edf533e634e85192.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5810-37c6091b29a1fe53.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/600-0733eb84f0a0a9e0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6333-95ad799d13326dce.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/722-2a171fe616310f60.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8224-39a93ee1058b6069.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8264-6ef8fdb195694807.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8487-032ef9b17d20aad9.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-1b5c4b071ed544c3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/framework-7c365855dab1bf41.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-1203afde83fa2d6e.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/block-layout-c465c14d48392b11.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/compute-b1f8d5a7a9a30f2d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-93c094bad0f299fb.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/files-891e5bd5935f7473.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-d2e4ee4e68d36807.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-4a49126fcfe8ced0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-5f8c5d0bc6ad1113.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-b4c0a36c69c346a4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a9266d353f288e8c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-b5c29c852262312e.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-9f233917aa72ad82.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-5af599da035252a7.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-8597f8e13d80ee48.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-5e0d047a6c9cb1fc.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-b0a508aa52914dad.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-074c32397d341de9.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-50f5d8706ed0bc73.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-e151c1552fcb67bd.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-95394769a783c6c7.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-8336c4326f1e7d96.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-01dd679e4a21e0d9.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-4d9051c073a9b2ff.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-5a306deca6717862.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-0dbc5b11019e78a0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/terminal-578d862f3e56e6e6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/test-1c0588d685b909b9.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-ffaab4c013e62ba1.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-114000e84313994f.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{icIDjCezcfhiKL87kgeSY → N3FS4bHv0jpYeeg672uYK}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{_O1kJQLGtZmoBMyWpQrea → aoO6jYZLVlUGCCdY-wmy8}/_ssgManifest.js +0 -0
- {mage_ai-0.9.45.dist-info → mage_ai-0.9.47.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.45.dist-info → mage_ai-0.9.47.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.45.dist-info → mage_ai-0.9.47.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from mage_ai.api.resources.BaseResource import BaseResource
|
|
2
|
+
from mage_ai.api.result_set import ResultSet
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class AsyncBaseResource(BaseResource):
|
|
6
|
+
async def collective_load_for_attribute(self, key):
|
|
7
|
+
k_name = self.__class__.__name__
|
|
8
|
+
if self.result_set().context and self.result_set().context.data:
|
|
9
|
+
loaded = self.result_set().context.data.get(k_name, {}).get(key, None)
|
|
10
|
+
else:
|
|
11
|
+
loaded = None
|
|
12
|
+
loader = self.__class__.collective_loader().get(key, None)
|
|
13
|
+
if not loaded and loader:
|
|
14
|
+
loaded = await loader['load'](self)
|
|
15
|
+
if loaded and not isinstance(
|
|
16
|
+
loaded,
|
|
17
|
+
ResultSet) and not isinstance(
|
|
18
|
+
loaded,
|
|
19
|
+
dict):
|
|
20
|
+
loaded = ResultSet(loaded)
|
|
21
|
+
if not self.result_set().context.data.get(k_name):
|
|
22
|
+
self.result_set().context.data[k_name] = {}
|
|
23
|
+
self.result_set().context.data[k_name][key] = loaded
|
|
24
|
+
return loaded
|
|
25
|
+
|
|
26
|
+
async def __getattr__(self, name):
|
|
27
|
+
async def _missing(*args, **kwargs):
|
|
28
|
+
loader = self.__class__.collective_loader().get(name, None)
|
|
29
|
+
if loader:
|
|
30
|
+
arr = await self.collective_load_for_attribute(name)
|
|
31
|
+
if loader['select']:
|
|
32
|
+
val = await loader['select'](self, arr)
|
|
33
|
+
else:
|
|
34
|
+
val = arr
|
|
35
|
+
else:
|
|
36
|
+
val = getattr(self.model, name)
|
|
37
|
+
|
|
38
|
+
return val
|
|
39
|
+
return await _missing()
|
|
@@ -267,6 +267,11 @@ class BlockResource(GenericResource):
|
|
|
267
267
|
':'.join(parts_new),
|
|
268
268
|
)
|
|
269
269
|
|
|
270
|
+
if metrics.get('dynamic_upstream_block_uuids'):
|
|
271
|
+
block_mapping[block_run_block_uuid]['uuids'].extend(
|
|
272
|
+
metrics.get('dynamic_upstream_block_uuids') or [],
|
|
273
|
+
)
|
|
274
|
+
|
|
270
275
|
# If it should reduce, then all the children have 1 downstream.
|
|
271
276
|
if should_reduce_output(block):
|
|
272
277
|
for db in block.downstream_blocks:
|
|
@@ -41,7 +41,7 @@ class ClusterResource(GenericResource):
|
|
|
41
41
|
error['message'] = 'Please include cluster_id in the request payload.'
|
|
42
42
|
raise ApiError(error)
|
|
43
43
|
|
|
44
|
-
emr_cluster_manager.set_active_cluster(cluster_id)
|
|
44
|
+
emr_cluster_manager.set_active_cluster(cluster_id=cluster_id)
|
|
45
45
|
success = True
|
|
46
46
|
|
|
47
47
|
self.model.update(
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
from mage_ai.api.resources.GenericResource import GenericResource
|
|
2
|
+
from mage_ai.services.compute.aws.models import Cluster
|
|
3
|
+
from mage_ai.services.compute.models import ComputeService
|
|
4
|
+
from mage_ai.services.spark.constants import ComputeServiceUUID
|
|
5
|
+
from mage_ai.services.ssh.aws.emr.models import close_tunnel
|
|
6
|
+
from mage_ai.services.ssh.aws.emr.utils import tunnel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ComputeClusterResource(GenericResource):
|
|
10
|
+
@classmethod
|
|
11
|
+
async def collection(self, query_arg, _meta, user, **kwargs):
|
|
12
|
+
parent_model = kwargs.get('parent_model')
|
|
13
|
+
|
|
14
|
+
include_all_states = query_arg.get('include_all_states', [None])
|
|
15
|
+
if include_all_states:
|
|
16
|
+
include_all_states = include_all_states[0]
|
|
17
|
+
|
|
18
|
+
clusters = []
|
|
19
|
+
|
|
20
|
+
if isinstance(parent_model, ComputeService):
|
|
21
|
+
if ComputeServiceUUID.AWS_EMR == parent_model.uuid:
|
|
22
|
+
try:
|
|
23
|
+
result = parent_model.clusters_and_metadata(
|
|
24
|
+
include_all_states=include_all_states,
|
|
25
|
+
)
|
|
26
|
+
clusters = [dict(
|
|
27
|
+
cluster=cluster,
|
|
28
|
+
) for cluster in result.get('clusters') or []]
|
|
29
|
+
except Exception as err:
|
|
30
|
+
print(f'[WARNING] ComputeClusterResource.collection: {err}')
|
|
31
|
+
|
|
32
|
+
return self.build_result_set(
|
|
33
|
+
clusters,
|
|
34
|
+
user,
|
|
35
|
+
**kwargs,
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
@classmethod
|
|
39
|
+
async def member(self, pk, user, **kwargs):
|
|
40
|
+
parent_model = kwargs.get('parent_model')
|
|
41
|
+
|
|
42
|
+
cluster = None
|
|
43
|
+
|
|
44
|
+
if isinstance(parent_model, ComputeService):
|
|
45
|
+
if ComputeServiceUUID.AWS_EMR == parent_model.uuid:
|
|
46
|
+
cluster = parent_model.get_cluster_details(pk)
|
|
47
|
+
|
|
48
|
+
return self(dict(
|
|
49
|
+
cluster=cluster,
|
|
50
|
+
), user, **kwargs)
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def create(self, payload, user, **kwargs):
|
|
54
|
+
parent_model = kwargs.get('parent_model')
|
|
55
|
+
|
|
56
|
+
cluster = None
|
|
57
|
+
|
|
58
|
+
if isinstance(parent_model, ComputeService):
|
|
59
|
+
if ComputeServiceUUID.AWS_EMR == parent_model.uuid:
|
|
60
|
+
cluster = parent_model.create_cluster()
|
|
61
|
+
|
|
62
|
+
return self(dict(
|
|
63
|
+
cluster=cluster,
|
|
64
|
+
), user, **kwargs)
|
|
65
|
+
|
|
66
|
+
async def delete(self, **kwargs):
|
|
67
|
+
parent_model = kwargs.get('parent_model')
|
|
68
|
+
|
|
69
|
+
if isinstance(parent_model, ComputeService):
|
|
70
|
+
if ComputeServiceUUID.AWS_EMR == parent_model.uuid:
|
|
71
|
+
cluster = self.get_cluster()
|
|
72
|
+
parent_model.terminate_clusters([cluster.id])
|
|
73
|
+
|
|
74
|
+
if cluster.active:
|
|
75
|
+
close_tunnel()
|
|
76
|
+
|
|
77
|
+
async def update(self, payload, **kwargs):
|
|
78
|
+
parent_model = kwargs.get('parent_model')
|
|
79
|
+
|
|
80
|
+
if isinstance(parent_model, ComputeService):
|
|
81
|
+
if ComputeServiceUUID.AWS_EMR == parent_model.uuid:
|
|
82
|
+
cluster_id = self.get_cluster_id()
|
|
83
|
+
if cluster_id:
|
|
84
|
+
cluster = parent_model.update_cluster(cluster_id, payload)
|
|
85
|
+
if cluster:
|
|
86
|
+
self.model = dict(cluster=cluster)
|
|
87
|
+
|
|
88
|
+
if cluster.active:
|
|
89
|
+
def _callback(*args, **kwargs):
|
|
90
|
+
tunnel(reconnect=True)
|
|
91
|
+
|
|
92
|
+
self.on_update_callback = _callback
|
|
93
|
+
|
|
94
|
+
def get_cluster(self) -> Cluster:
|
|
95
|
+
return self.model.get('cluster')
|
|
96
|
+
|
|
97
|
+
def get_cluster_id(self) -> str:
|
|
98
|
+
cluster_id = None
|
|
99
|
+
|
|
100
|
+
if 'cluster' in self.model:
|
|
101
|
+
cluster = self.get_cluster()
|
|
102
|
+
if cluster:
|
|
103
|
+
cluster_id = None
|
|
104
|
+
if isinstance(cluster, Cluster):
|
|
105
|
+
cluster_id = cluster.id
|
|
106
|
+
elif isinstance(cluster, dict):
|
|
107
|
+
cluster_id = cluster.get('id')
|
|
108
|
+
|
|
109
|
+
return cluster_id
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
from mage_ai.api.errors import ApiError
|
|
2
|
+
from mage_ai.api.resources.GenericResource import GenericResource
|
|
3
|
+
from mage_ai.services.compute.constants import (
|
|
4
|
+
ComputeConnectionActionUUID,
|
|
5
|
+
ComputeConnectionState,
|
|
6
|
+
)
|
|
7
|
+
from mage_ai.services.compute.models import ComputeConnection, ComputeService
|
|
8
|
+
from mage_ai.services.spark.constants import ComputeServiceUUID
|
|
9
|
+
from mage_ai.services.ssh.aws.emr.models import SSHTunnel, create_tunnel
|
|
10
|
+
from mage_ai.services.ssh.aws.emr.utils import should_tunnel, tunnel
|
|
11
|
+
from mage_ai.shared.array import find
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ComputeConnectionResource(GenericResource):
|
|
15
|
+
@classmethod
|
|
16
|
+
async def collection(self, query_arg, _meta, user, **kwargs):
|
|
17
|
+
parent_model = kwargs.get('parent_model')
|
|
18
|
+
|
|
19
|
+
arr = []
|
|
20
|
+
|
|
21
|
+
if parent_model and isinstance(parent_model, ComputeService):
|
|
22
|
+
if ComputeServiceUUID.AWS_EMR == parent_model.uuid:
|
|
23
|
+
arr.extend(parent_model.compute_connections())
|
|
24
|
+
|
|
25
|
+
return self.build_result_set(
|
|
26
|
+
arr,
|
|
27
|
+
user,
|
|
28
|
+
**kwargs,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
@classmethod
|
|
32
|
+
async def member(self, pk, user, **kwargs):
|
|
33
|
+
parent_model = kwargs.get('parent_model')
|
|
34
|
+
|
|
35
|
+
model = ComputeConnection.load(name=pk, uuid=pk)
|
|
36
|
+
if parent_model and isinstance(parent_model, ComputeService):
|
|
37
|
+
if ComputeServiceUUID.AWS_EMR == parent_model.uuid:
|
|
38
|
+
model = find(lambda x: x.uuid == pk, parent_model.compute_connections())
|
|
39
|
+
|
|
40
|
+
return self(model, user, **kwargs)
|
|
41
|
+
|
|
42
|
+
async def update(self, payload, **kwargs):
|
|
43
|
+
parent_model = kwargs.get('parent_model')
|
|
44
|
+
|
|
45
|
+
action_uuid = payload.get('action')
|
|
46
|
+
|
|
47
|
+
if not action_uuid:
|
|
48
|
+
return
|
|
49
|
+
|
|
50
|
+
if parent_model and isinstance(parent_model, ComputeService):
|
|
51
|
+
if ComputeServiceUUID.AWS_EMR == parent_model.uuid:
|
|
52
|
+
from mage_ai.services.compute.aws.steps import SetupStepUUID
|
|
53
|
+
|
|
54
|
+
if SetupStepUUID.OBSERVABILITY == self.model.uuid:
|
|
55
|
+
action_valid = action_uuid in [
|
|
56
|
+
ComputeConnectionActionUUID.CREATE,
|
|
57
|
+
ComputeConnectionActionUUID.DELETE,
|
|
58
|
+
ComputeConnectionActionUUID.DESELECT,
|
|
59
|
+
ComputeConnectionActionUUID.UPDATE,
|
|
60
|
+
]
|
|
61
|
+
|
|
62
|
+
if action_valid:
|
|
63
|
+
if ComputeConnectionActionUUID.CREATE == action_uuid:
|
|
64
|
+
try:
|
|
65
|
+
should_tunnel(
|
|
66
|
+
ignore_active_kernel=True,
|
|
67
|
+
raise_error=True,
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
ssh_tunnel = create_tunnel(
|
|
71
|
+
connect=False,
|
|
72
|
+
fresh=True,
|
|
73
|
+
reconnect=False,
|
|
74
|
+
stop=False,
|
|
75
|
+
)
|
|
76
|
+
if ssh_tunnel:
|
|
77
|
+
ssh_tunnel.precheck_access(raise_error=True)
|
|
78
|
+
ssh_tunnel.connect()
|
|
79
|
+
else:
|
|
80
|
+
raise Exception('Cannot create SSH tunnel instance.')
|
|
81
|
+
except Exception as err:
|
|
82
|
+
error = ApiError.UNAUTHORIZED_ACCESS.copy()
|
|
83
|
+
error.update(message=str(err))
|
|
84
|
+
raise ApiError(error)
|
|
85
|
+
|
|
86
|
+
def _callback(
|
|
87
|
+
action_uuid=action_uuid,
|
|
88
|
+
*args,
|
|
89
|
+
**kwargs,
|
|
90
|
+
):
|
|
91
|
+
ssh_tunnel = SSHTunnel()
|
|
92
|
+
|
|
93
|
+
if ComputeConnectionActionUUID.CREATE == action_uuid:
|
|
94
|
+
tunnel(ignore_active_kernel=True)
|
|
95
|
+
elif ComputeConnectionActionUUID.DELETE == action_uuid:
|
|
96
|
+
ssh_tunnel.close()
|
|
97
|
+
elif ComputeConnectionActionUUID.DESELECT == action_uuid:
|
|
98
|
+
ssh_tunnel.stop()
|
|
99
|
+
elif ComputeConnectionActionUUID.UPDATE == action_uuid:
|
|
100
|
+
ssh_tunnel.reconnect()
|
|
101
|
+
|
|
102
|
+
self.model.state = ComputeConnectionState.PENDING
|
|
103
|
+
self.on_update_callback = _callback
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from mage_ai.api.resources.GenericResource import GenericResource
|
|
2
|
+
from mage_ai.data_preparation.models.project import Project
|
|
3
|
+
from mage_ai.services.compute.models import ComputeService
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ComputeServiceResource(GenericResource):
|
|
7
|
+
@classmethod
|
|
8
|
+
async def collection(self, _query, _meta, user, **kwargs):
|
|
9
|
+
resource = await self.member(None, user, **kwargs)
|
|
10
|
+
|
|
11
|
+
return self.build_result_set(
|
|
12
|
+
[
|
|
13
|
+
resource.model,
|
|
14
|
+
],
|
|
15
|
+
user,
|
|
16
|
+
**kwargs,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
@classmethod
|
|
20
|
+
def get_model(self, _pk):
|
|
21
|
+
return ComputeService.build(Project())
|
|
22
|
+
|
|
23
|
+
@classmethod
|
|
24
|
+
async def member(self, pk, user, **kwargs):
|
|
25
|
+
query_arg = kwargs.get('query', {})
|
|
26
|
+
|
|
27
|
+
with_clusters = query_arg.get('with_clusters', [False])
|
|
28
|
+
if with_clusters:
|
|
29
|
+
with_clusters = with_clusters[0]
|
|
30
|
+
|
|
31
|
+
compute_service = self.get_model(pk)
|
|
32
|
+
if with_clusters:
|
|
33
|
+
compute_service.with_clusters = with_clusters
|
|
34
|
+
|
|
35
|
+
return self(compute_service, user, **kwargs)
|
|
@@ -8,6 +8,7 @@ from mage_ai.settings.repo import get_repo_path
|
|
|
8
8
|
|
|
9
9
|
DATA_PROVIDERS = [
|
|
10
10
|
DataSource.BIGQUERY,
|
|
11
|
+
DataSource.CHROMA,
|
|
11
12
|
DataSource.CLICKHOUSE,
|
|
12
13
|
DataSource.DRUID,
|
|
13
14
|
DataSource.DUCKDB,
|
|
@@ -21,6 +22,7 @@ DATA_PROVIDERS = [
|
|
|
21
22
|
]
|
|
22
23
|
DATA_PROVIDERS_NAME = {
|
|
23
24
|
DataSource.BIGQUERY: 'BigQuery',
|
|
25
|
+
DataSource.CHROMA: 'Chroma',
|
|
24
26
|
DataSource.CLICKHOUSE: 'ClickHouse',
|
|
25
27
|
DataSource.DUCKDB: 'DuckDB',
|
|
26
28
|
DataSource.DRUID: 'Druid',
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from typing import Dict
|
|
3
|
+
|
|
4
|
+
import jwt
|
|
5
|
+
|
|
6
|
+
from mage_ai.api.constants import DOWNLOAD_TOKEN_LIFESPAN
|
|
7
|
+
from mage_ai.api.resources.GenericResource import GenericResource
|
|
8
|
+
from mage_ai.data_preparation.models.download import Download
|
|
9
|
+
from mage_ai.data_preparation.models.file import File
|
|
10
|
+
from mage_ai.data_preparation.models.pipeline import Pipeline
|
|
11
|
+
from mage_ai.orchestration.db import safe_db_query
|
|
12
|
+
from mage_ai.settings import JWT_DOWNLOAD_SECRET
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class DownloadResource(GenericResource):
|
|
16
|
+
|
|
17
|
+
@classmethod
|
|
18
|
+
@safe_db_query
|
|
19
|
+
async def create(self, payload: Dict, user, **kwargs) -> 'DownloadResource':
|
|
20
|
+
parent_model = kwargs.get('parent_model')
|
|
21
|
+
|
|
22
|
+
ignore_folder_structure = payload.get('ignore_folder_structure', False)
|
|
23
|
+
|
|
24
|
+
file_list = []
|
|
25
|
+
|
|
26
|
+
if isinstance(parent_model, Pipeline):
|
|
27
|
+
file_name, file_list = self.fetch_pipeline_files(parent_model)
|
|
28
|
+
elif isinstance(parent_model, File):
|
|
29
|
+
if not parent_model.exists():
|
|
30
|
+
raise Exception(f'File {parent_model.filename} does not exist.')
|
|
31
|
+
file_name = parent_model.filename
|
|
32
|
+
file_list.append(parent_model.file_path)
|
|
33
|
+
|
|
34
|
+
token = self.generate_download_token(file_name, file_list, ignore_folder_structure)
|
|
35
|
+
download = Download(token)
|
|
36
|
+
|
|
37
|
+
return self(download, user)
|
|
38
|
+
|
|
39
|
+
def fetch_pipeline_files(pipeline: Pipeline):
|
|
40
|
+
config_path = pipeline.config_path
|
|
41
|
+
|
|
42
|
+
zip_name = f'{pipeline.uuid}.zip'
|
|
43
|
+
file_list = [config_path] + [block.file_path for block in pipeline.blocks_by_uuid.values()]
|
|
44
|
+
|
|
45
|
+
return [zip_name, file_list]
|
|
46
|
+
|
|
47
|
+
def generate_download_token(file_name, file_list, ignore_folder_structure):
|
|
48
|
+
now = datetime.datetime.utcnow()
|
|
49
|
+
payload = {
|
|
50
|
+
'file_name': file_name,
|
|
51
|
+
'file_list': file_list,
|
|
52
|
+
'ignore_folder_structure': ignore_folder_structure,
|
|
53
|
+
'iat': now,
|
|
54
|
+
'exp': now + datetime.timedelta(seconds=DOWNLOAD_TOKEN_LIFESPAN)
|
|
55
|
+
}
|
|
56
|
+
return jwt.encode(payload, JWT_DOWNLOAD_SECRET, algorithm="HS256")
|
|
@@ -18,7 +18,7 @@ class ExecutionStateResource(GenericResource):
|
|
|
18
18
|
|
|
19
19
|
if pipeline_uuid and block_uuid:
|
|
20
20
|
pipeline = await Pipeline.get_async(pipeline_uuid)
|
|
21
|
-
if pipeline and PipelineType.PYTHON
|
|
21
|
+
if pipeline and pipeline.type in [PipelineType.PYTHON, PipelineType.PYSPARK]:
|
|
22
22
|
block = pipeline.get_block(block_uuid)
|
|
23
23
|
if block and block.compute_management_enabled() and block.is_using_spark():
|
|
24
24
|
arr.append(dict(
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
from typing import Dict, List
|
|
3
|
+
|
|
4
|
+
from mage_ai.api.errors import ApiError
|
|
5
|
+
from mage_ai.api.resources.AsyncBaseResource import AsyncBaseResource
|
|
6
|
+
from mage_ai.api.resources.PipelineResource import PipelineResource
|
|
7
|
+
from mage_ai.authentication.permissions.constants import EntityName
|
|
8
|
+
from mage_ai.data_preparation.models.global_hooks.constants import (
|
|
9
|
+
DISABLED_RESOURCE_TYPES,
|
|
10
|
+
)
|
|
11
|
+
from mage_ai.data_preparation.models.global_hooks.models import (
|
|
12
|
+
GlobalHooks,
|
|
13
|
+
Hook,
|
|
14
|
+
HookOperation,
|
|
15
|
+
)
|
|
16
|
+
from mage_ai.data_preparation.models.pipeline import Pipeline
|
|
17
|
+
from mage_ai.orchestration.db.models.oauth import User
|
|
18
|
+
from mage_ai.shared.array import find
|
|
19
|
+
from mage_ai.shared.hash import ignore_keys
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class GlobalHookResource(AsyncBaseResource):
|
|
23
|
+
@classmethod
|
|
24
|
+
async def collection(self, query: Dict, _meta: Dict, user: User, **kwargs):
|
|
25
|
+
operation_types = query.get('operation_type[]', [])
|
|
26
|
+
if operation_types:
|
|
27
|
+
operation_types = operation_types[0]
|
|
28
|
+
if isinstance(operation_types, str):
|
|
29
|
+
operation_types = [HookOperation(m) for m in operation_types.split(',') if m]
|
|
30
|
+
|
|
31
|
+
resource_types = query.get('resource_type[]', [])
|
|
32
|
+
if resource_types:
|
|
33
|
+
resource_types = resource_types[0]
|
|
34
|
+
if isinstance(resource_types, str):
|
|
35
|
+
resource_types = [EntityName(m) for m in resource_types.split(',') if m]
|
|
36
|
+
|
|
37
|
+
global_hooks = GlobalHooks.load_from_file()
|
|
38
|
+
|
|
39
|
+
return self.build_result_set(
|
|
40
|
+
global_hooks.hooks(
|
|
41
|
+
operation_types=operation_types,
|
|
42
|
+
resource_types=resource_types,
|
|
43
|
+
),
|
|
44
|
+
user,
|
|
45
|
+
**kwargs,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
async def create(self, payload: Dict, user: User, **kwargs) -> 'GlobalHookResource':
|
|
50
|
+
if user and user.id:
|
|
51
|
+
payload['metadata'] = dict(
|
|
52
|
+
user=dict(
|
|
53
|
+
id=user.id,
|
|
54
|
+
),
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
hook = Hook.load(**payload)
|
|
58
|
+
|
|
59
|
+
if not hook.uuid or not hook.resource_type or not hook.operation_type:
|
|
60
|
+
missing = []
|
|
61
|
+
if not hook.resource_type:
|
|
62
|
+
missing.append('resource_type')
|
|
63
|
+
if not hook.operation_type:
|
|
64
|
+
missing.append('operation_type')
|
|
65
|
+
if not hook.uuid:
|
|
66
|
+
missing.append('uuid')
|
|
67
|
+
|
|
68
|
+
error = ApiError.RESOURCE_INVALID.copy()
|
|
69
|
+
error.update(
|
|
70
|
+
message=f'Hook is missing the following required attributes: {", ".join(missing)}.',
|
|
71
|
+
)
|
|
72
|
+
raise ApiError(error)
|
|
73
|
+
|
|
74
|
+
if hook.resource_type and hook.resource_type in DISABLED_RESOURCE_TYPES:
|
|
75
|
+
error = ApiError.RESOURCE_INVALID.copy()
|
|
76
|
+
error.update(
|
|
77
|
+
message=f'Hooks cannot be created for resource type {hook.resource_type.value}.',
|
|
78
|
+
)
|
|
79
|
+
raise ApiError(error)
|
|
80
|
+
|
|
81
|
+
global_hooks = GlobalHooks.load_from_file()
|
|
82
|
+
if global_hooks.get_hook(
|
|
83
|
+
operation_type=hook.operation_type,
|
|
84
|
+
resource_type=hook.resource_type,
|
|
85
|
+
uuid=hook.uuid,
|
|
86
|
+
):
|
|
87
|
+
error = ApiError.RESOURCE_INVALID.copy()
|
|
88
|
+
error.update(
|
|
89
|
+
message=f'Hook {hook.uuid} already exists for resource '
|
|
90
|
+
f'{hook.resource_type} and operation {hook.operation_type}.',
|
|
91
|
+
)
|
|
92
|
+
raise ApiError(error)
|
|
93
|
+
|
|
94
|
+
global_hooks.add_hook(hook, snapshot=True)
|
|
95
|
+
global_hooks.save()
|
|
96
|
+
|
|
97
|
+
return self(hook, user, **kwargs)
|
|
98
|
+
|
|
99
|
+
@classmethod
|
|
100
|
+
async def member(self, pk: str, user: User, **kwargs):
|
|
101
|
+
query = kwargs.get('query') or {}
|
|
102
|
+
|
|
103
|
+
resource_type = query.get('resource_type', [None])
|
|
104
|
+
if resource_type:
|
|
105
|
+
resource_type = resource_type[0]
|
|
106
|
+
|
|
107
|
+
operation_type = query.get('operation_type', [None])
|
|
108
|
+
if operation_type:
|
|
109
|
+
operation_type = operation_type[0]
|
|
110
|
+
|
|
111
|
+
include_operation_types = query.get('include_operation_types', [None])
|
|
112
|
+
if include_operation_types:
|
|
113
|
+
include_operation_types = include_operation_types[0]
|
|
114
|
+
|
|
115
|
+
include_resource_types = query.get('include_resource_types', [None])
|
|
116
|
+
if include_resource_types:
|
|
117
|
+
include_resource_types = include_resource_types[0]
|
|
118
|
+
|
|
119
|
+
global_hooks = GlobalHooks.load_from_file()
|
|
120
|
+
hook = global_hooks.get_hook(
|
|
121
|
+
operation_type=HookOperation(operation_type) if operation_type else operation_type,
|
|
122
|
+
resource_type=EntityName(resource_type) if resource_type else resource_type,
|
|
123
|
+
uuid=pk,
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
if not hook and not include_operation_types and not include_resource_types:
|
|
127
|
+
raise ApiError(ApiError.RESOURCE_NOT_FOUND)
|
|
128
|
+
|
|
129
|
+
return self(hook, user, **kwargs)
|
|
130
|
+
|
|
131
|
+
async def update(self, payload: Dict, **kwargs):
|
|
132
|
+
global_hooks = GlobalHooks.load_from_file()
|
|
133
|
+
self.model = global_hooks.add_hook(
|
|
134
|
+
self.model,
|
|
135
|
+
payload=ignore_keys(payload, ['snapshot']),
|
|
136
|
+
snapshot=payload.get('snapshot') or False,
|
|
137
|
+
update=True,
|
|
138
|
+
)
|
|
139
|
+
global_hooks.save()
|
|
140
|
+
|
|
141
|
+
async def delete(self, **kwargs):
|
|
142
|
+
global_hooks = GlobalHooks.load_from_file()
|
|
143
|
+
global_hooks.remove_hook(self.model)
|
|
144
|
+
global_hooks.save()
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
async def __load_pipelines(resource: GlobalHookResource):
|
|
148
|
+
pipeline_uuids = []
|
|
149
|
+
for res in resource.result_set():
|
|
150
|
+
if res.model.pipeline_settings and res.model.pipeline_settings.get('uuid'):
|
|
151
|
+
pipeline_uuid = res.model.pipeline_settings.get('uuid')
|
|
152
|
+
if pipeline_uuid:
|
|
153
|
+
pipeline_uuids.append(pipeline_uuid)
|
|
154
|
+
|
|
155
|
+
async def get_pipeline(uuid):
|
|
156
|
+
try:
|
|
157
|
+
return await Pipeline.get_async(uuid)
|
|
158
|
+
except Exception as err:
|
|
159
|
+
err_message = f'Error loading pipeline {uuid}: {err}.'
|
|
160
|
+
if err.__class__.__name__ == 'OSError' and 'Too many open files' in err.strerror:
|
|
161
|
+
raise Exception(err_message)
|
|
162
|
+
else:
|
|
163
|
+
print(err_message)
|
|
164
|
+
return None
|
|
165
|
+
|
|
166
|
+
pipelines = await asyncio.gather(
|
|
167
|
+
*[get_pipeline(uuid) for uuid in pipeline_uuids]
|
|
168
|
+
)
|
|
169
|
+
pipelines = [p for p in pipelines if p is not None]
|
|
170
|
+
|
|
171
|
+
return PipelineResource.build_result_set(pipelines, resource.current_user)
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
async def __find_pipeline(resource: GlobalHookResource, arr: List[PipelineResource]):
|
|
175
|
+
pipeline_uuid = resource.model.pipeline_settings and resource.model.pipeline_settings.get(
|
|
176
|
+
'uuid',
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
if not pipeline_uuid:
|
|
180
|
+
return
|
|
181
|
+
|
|
182
|
+
return find(
|
|
183
|
+
lambda x, pipeline_uuid=pipeline_uuid: x.uuid == pipeline_uuid,
|
|
184
|
+
arr,
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
GlobalHookResource.register_collective_loader(
|
|
189
|
+
'pipeline_details',
|
|
190
|
+
load=__load_pipelines,
|
|
191
|
+
select=__find_pipeline,
|
|
192
|
+
)
|