mage-ai 0.9.55__py3-none-any.whl → 0.9.57__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/api/parsers/ProjectParser.py +29 -0
- mage_ai/api/policies/BlockPolicy.py +1 -0
- mage_ai/api/policies/CustomDesignPolicy.py +3 -0
- mage_ai/api/policies/GitBranchPolicy.py +9 -0
- mage_ai/api/policies/GitCustomBranchPolicy.py +1 -0
- mage_ai/api/policies/GlobalHookPolicy.py +3 -0
- mage_ai/api/policies/ProjectPolicy.py +28 -0
- mage_ai/api/presenters/ProjectPresenter.py +4 -0
- mage_ai/api/resources/BlockResource.py +14 -1
- mage_ai/api/resources/FileResource.py +1 -1
- mage_ai/api/resources/GitFileResource.py +1 -1
- mage_ai/api/resources/GlobalHookResource.py +55 -10
- mage_ai/api/resources/PipelineResource.py +12 -11
- mage_ai/api/resources/ProjectResource.py +95 -7
- mage_ai/authentication/operation_history/models.py +1 -1
- mage_ai/cache/dbt/cache.py +1 -1
- mage_ai/cache/dbt/utils.py +22 -2
- mage_ai/cluster_manager/kubernetes/workload_manager.py +17 -7
- mage_ai/data_preparation/models/block/__init__.py +71 -5
- mage_ai/data_preparation/models/block/dbt/block_sql.py +13 -3
- mage_ai/data_preparation/models/block/dbt/dbt_adapter.py +15 -1
- mage_ai/data_preparation/models/block/dbt/profiles.py +14 -12
- mage_ai/data_preparation/models/block/platform/mixins.py +6 -2
- mage_ai/data_preparation/models/block/platform/utils.py +9 -1
- mage_ai/data_preparation/models/file.py +1 -1
- mage_ai/data_preparation/models/global_hooks/models.py +2 -2
- mage_ai/data_preparation/models/project/__init__.py +74 -4
- mage_ai/data_preparation/models/project/constants.py +1 -0
- mage_ai/data_preparation/repo_manager.py +3 -0
- mage_ai/orchestration/db/models/schedules.py +64 -102
- mage_ai/orchestration/db/models/schedules_project_platform.py +365 -0
- mage_ai/orchestration/pipeline_scheduler.py +5 -1700
- mage_ai/orchestration/pipeline_scheduler_original.py +1635 -0
- mage_ai/orchestration/pipeline_scheduler_project_platform.py +1701 -0
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/frontend_dist/_next/static/A7VXVGKgLQCukXcjdysDz/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1557-724bfc3eabd095f7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/161-33f26e485ddef393.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2646-78905b899b68f4eb.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3419-ad674b271b8520ce.js → frontend_dist/_next/static/chunks/3419-b8bd26f5946bec5a.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3437-ce26fc28e114b44e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3540-9bb48b08f439d0a0.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3745-61b1c63bb56bb670.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{5729.0f2748e9e6dab951.js → 5189.dca121eccea793be.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5457-b373ebdf4d05d8e2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5533-3455832bc3f8429b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5729-9d8204ab91da631d.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/5810-e26a0768db1cfdba.js → frontend_dist/_next/static/chunks/5810-addfa3491ae6b01c.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8264-68db2a8334ad48f1.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8432-0ace6fb7bdbc6864.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8731-82571147875a2d58.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/874-d9e1b3c9c00ebac9.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9264-5df6e4c7b1e85c02.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-0d183e2f234d52c6.js → _app-4c0239ca6203e827.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/compute-822e66aa2e90cf4c.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-373217c5de51aeef.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/{[...slug]-1e4838e534c8f31e.js → [...slug]-0325e76a2f3e08c1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-data-products-bb38f73540efeac4.js → global-data-products-927ebbdc29529765.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-a172f5a447bd8925.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks-97bec2ac883e0c26.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/files-02d001d99eeaae3f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-2e577bfd4f0db2b7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-1827574a4ba95a72.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-a913c361bcc0d1a9.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-4e6fdcbbfc931d67.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-1c327edcf05df9c9.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{oauth-eba7027969034415.js → oauth-bd8494f8875c5c97.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-5a98e6a531410afb.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-1442183d13edec2e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-b526282c8ac49986.js → [...slug]-38b2241cdd10320c.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-515eb343210aa1fb.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-1c646dbef65d6a69.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{dashboard-fe4d1321da8291cb.js → dashboard-35cb916a18ac4e1f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-cd1918632dfef29d.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{logs-c011d465f61138ee.js → logs-67b0572c84db0940.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-46c0dabd155581a0.js → block-runs-40201b626ea3a664.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-f2a052cb8a20fe47.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-d1f23308effebe03.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-579899cbaedcdefc.js → monitors-9a116d88f00916ff.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/{[run]-7a2265b7e44bed0b.js → [run]-2d5abcd019d4bea1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{runs-9b53da919db959bd.js → runs-5363a7ae9afe8983.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{settings-1839276725bfd757.js → settings-931a1b3112866a72.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{syncs-68d779bc62185470.js → syncs-5ec5367cb877db38.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-01f4528602f4ba2a.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-8366661f8e2b2959.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-358523847fdbf547.js → triggers-378f8dada7d0c1dd.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-627be24ef4963cfb.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/platform/global-hooks/[...slug]-814bbd11e10c26dc.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/platform/global-hooks-021ec25e05862f8f.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-00393e67ab1e6788.js → frontend_dist/_next/static/chunks/pages/settings/account/profile-2b0aa123043519b8.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-05186e17c94347c1.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/settings-efe8bf1bf3177a7e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-eaeba99f9547a20a.js → [...slug]-aa5d871de1f3f7b0.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{permissions-c3140516cc28e467.js → permissions-ce45aad47049d993.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-1bc694b056ff0bcb.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-f6ff0e219a4b9ffd.js → [...slug]-88d29d1774db67e4.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{roles-22ff9d862736b2ec.js → roles-d8ca763e405cd9d1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{sync-data-614925e838d1974c.js → sync-data-42bd909eb8951040.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/{[...slug]-5b88dfb1c6d0d16c.js → [...slug]-250dfdf22bfe67e9.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-eb904db7ac7ea57c.js → users-97c4ce119f7238b5.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-dcdd0c71f99aebad.js → frontend_dist/_next/static/chunks/pages/sign-in-1af3ba18ff646dd4.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/[...slug]-ff9d49355393daea.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{templates-5ebfe79c24d8c4b4.js → templates-299a2c8f2dd89cf3.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-fb3f398009a02879.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/test-59a08e06f4ef6c3a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-551b85802515e313.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-1362aeda4a31dd41.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{webpack-fea697dd168c6d0c.js → webpack-17c3a8f588f14cfd.js} +1 -1
- mage_ai/server/frontend_dist/block-layout.html +2 -2
- mage_ai/server/frontend_dist/compute.html +2 -2
- mage_ai/server/frontend_dist/files.html +2 -2
- mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
- mage_ai/server/frontend_dist/global-data-products.html +2 -2
- mage_ai/server/frontend_dist/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist/global-hooks.html +2 -2
- mage_ai/server/frontend_dist/index.html +2 -2
- mage_ai/server/frontend_dist/manage/files.html +2 -2
- mage_ai/server/frontend_dist/manage/settings.html +2 -2
- mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist/manage/users.html +2 -2
- mage_ai/server/frontend_dist/manage.html +2 -2
- mage_ai/server/frontend_dist/oauth.html +3 -3
- mage_ai/server/frontend_dist/overview.html +2 -2
- mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist/pipelines.html +2 -2
- mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +24 -0
- mage_ai/server/frontend_dist/platform/global-hooks.html +24 -0
- mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist/settings/platform/preferences.html +24 -0
- mage_ai/server/frontend_dist/settings/platform/settings.html +24 -0
- mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/permissions.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/roles.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist/settings.html +2 -2
- mage_ai/server/frontend_dist/sign-in.html +3 -3
- mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
- mage_ai/server/frontend_dist/templates.html +2 -2
- mage_ai/server/frontend_dist/terminal.html +2 -2
- mage_ai/server/frontend_dist/test.html +2 -2
- mage_ai/server/frontend_dist/triggers.html +2 -2
- mage_ai/server/frontend_dist/version-control.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/404.html +4 -4
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-724bfc3eabd095f7.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/161-33f26e485ddef393.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2646-78905b899b68f4eb.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/3419-ad674b271b8520ce.js → frontend_dist_base_path_template/_next/static/chunks/3419-b8bd26f5946bec5a.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3437-ce26fc28e114b44e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3540-9bb48b08f439d0a0.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3745-61b1c63bb56bb670.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{5729.0f2748e9e6dab951.js → 5189.dca121eccea793be.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5457-b373ebdf4d05d8e2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5533-3455832bc3f8429b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5729-9d8204ab91da631d.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/5810-e26a0768db1cfdba.js → frontend_dist_base_path_template/_next/static/chunks/5810-addfa3491ae6b01c.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8264-68db2a8334ad48f1.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8432-0ace6fb7bdbc6864.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8731-82571147875a2d58.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/874-d9e1b3c9c00ebac9.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-5df6e4c7b1e85c02.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{_app-0d183e2f234d52c6.js → _app-4c0239ca6203e827.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/compute-822e66aa2e90cf4c.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-373217c5de51aeef.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/{[...slug]-1e4838e534c8f31e.js → [...slug]-0325e76a2f3e08c1.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-data-products-bb38f73540efeac4.js → global-data-products-927ebbdc29529765.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-a172f5a447bd8925.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks-97bec2ac883e0c26.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/files-02d001d99eeaae3f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-2e577bfd4f0db2b7.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-1827574a4ba95a72.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-a913c361bcc0d1a9.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-4e6fdcbbfc931d67.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-1c327edcf05df9c9.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{oauth-eba7027969034415.js → oauth-bd8494f8875c5c97.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-5a98e6a531410afb.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-1442183d13edec2e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-b526282c8ac49986.js → [...slug]-38b2241cdd10320c.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-515eb343210aa1fb.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-1c646dbef65d6a69.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{dashboard-fe4d1321da8291cb.js → dashboard-35cb916a18ac4e1f.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-cd1918632dfef29d.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{logs-c011d465f61138ee.js → logs-67b0572c84db0940.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-46c0dabd155581a0.js → block-runs-40201b626ea3a664.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-f2a052cb8a20fe47.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-d1f23308effebe03.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-579899cbaedcdefc.js → monitors-9a116d88f00916ff.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/{[run]-7a2265b7e44bed0b.js → [run]-2d5abcd019d4bea1.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{runs-9b53da919db959bd.js → runs-5363a7ae9afe8983.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{settings-1839276725bfd757.js → settings-931a1b3112866a72.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{syncs-68d779bc62185470.js → syncs-5ec5367cb877db38.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-01f4528602f4ba2a.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-8366661f8e2b2959.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-358523847fdbf547.js → triggers-378f8dada7d0c1dd.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-627be24ef4963cfb.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks/[...slug]-814bbd11e10c26dc.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks-021ec25e05862f8f.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/account/profile-00393e67ab1e6788.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-2b0aa123043519b8.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-05186e17c94347c1.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-efe8bf1bf3177a7e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-eaeba99f9547a20a.js → [...slug]-aa5d871de1f3f7b0.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{permissions-c3140516cc28e467.js → permissions-ce45aad47049d993.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-1bc694b056ff0bcb.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-f6ff0e219a4b9ffd.js → [...slug]-88d29d1774db67e4.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{roles-22ff9d862736b2ec.js → roles-d8ca763e405cd9d1.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{sync-data-614925e838d1974c.js → sync-data-42bd909eb8951040.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/{[...slug]-5b88dfb1c6d0d16c.js → [...slug]-250dfdf22bfe67e9.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-eb904db7ac7ea57c.js → users-97c4ce119f7238b5.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/sign-in-dcdd0c71f99aebad.js → frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-1af3ba18ff646dd4.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-ff9d49355393daea.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{templates-5ebfe79c24d8c4b4.js → templates-299a2c8f2dd89cf3.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/terminal-fb3f398009a02879.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/test-59a08e06f4ef6c3a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-551b85802515e313.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-1362aeda4a31dd41.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{webpack-d30cb09c85b4c4f0.js → webpack-b55fe1e575d8ac9d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/wSRrM15xnvA8lOWcaque7/_buildManifest.js +1 -0
- 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 +5 -5
- mage_ai/server/frontend_dist_base_path_template/global-hooks.html +5 -5
- 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 +3 -3
- 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/platform/global-hooks/[...slug].html +24 -0
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +24 -0
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +24 -0
- mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +24 -0
- 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 +11 -11
- 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 +2 -2
- 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/websocket_server.py +33 -22
- mage_ai/settings/models/configuration_option.py +15 -1
- mage_ai/settings/platform/__init__.py +44 -20
- mage_ai/shared/io.py +3 -0
- mage_ai/streaming/sinks/rabbitmq.py +3 -1
- mage_ai/streaming/sources/rabbitmq.py +5 -2
- mage_ai/tests/api/endpoints/test_pipeline_runs.py +4 -0
- mage_ai/tests/api/endpoints/test_projects.py +1 -0
- mage_ai/tests/api/resources/test_pipeline_resource.py +2 -2
- mage_ai/tests/data_preparation/models/block/platform/test_mixins.py +4 -3
- mage_ai/tests/data_preparation/models/test_block.py +2 -1
- mage_ai/tests/data_preparation/models/test_project.py +27 -7
- mage_ai/tests/orchestration/db/models/test_schedules.py +25 -7
- mage_ai/tests/orchestration/test_pipeline_scheduler.py +6 -261
- mage_ai/tests/orchestration/test_pipeline_scheduler_project_platform.py +286 -0
- mage_ai/tests/shared/mixins.py +1 -0
- {mage_ai-0.9.55.dist-info → mage_ai-0.9.57.dist-info}/METADATA +1 -1
- {mage_ai-0.9.55.dist-info → mage_ai-0.9.57.dist-info}/RECORD +309 -286
- mage_ai/server/frontend_dist/_next/static/7yQskzl_RfcpoOQn1DPQV/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1125-fbdaaef471846c61.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1952-c4ba37bc172d7051.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2646-d8612648f7836101.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3437-91f6098316edaf17.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3745-0aacee8ac93a042a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5332-c5abdf5c8d65a52e.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5457-6e700aadac17ceec.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8264-dad1f090c4278137.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8432-ec2b97cbf32ec5a7.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8731-9e0ad513b0dfce83.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/874-18d9f33cdd028e9d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9264-4428392376aa9dd4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9626-2627bc34f11b2906.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/compute-5ead3afa88d14721.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-87b31b998e9f1222.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-a7d74042d52c3c38.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks-cf7f1ba0b44ec0fb.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/files-899b362caff47d4d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-b9ddd48737fba474.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-1e8731ba2559fef4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-a6307396dfa82c88.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-fc5aafe5085739a9.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-c008f0201864d693.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-321f47b2dba4c780.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-bf4d162b5460acc6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-62ee3e957688c725.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-33d9fb90871be84c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-f4ff09cfff8bad46.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/[...slug]-04b0a55e8ad6f814.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-88025dd0ed3051a6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/test-b936dd972db94c6b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-e5e49ac3b9282aaa.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-a5372e488b5f44a2.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/2_SHgS8M315ekLG0qkZzC/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1125-fbdaaef471846c61.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1952-c4ba37bc172d7051.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2646-d8612648f7836101.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3437-91f6098316edaf17.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3745-0aacee8ac93a042a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5332-c5abdf5c8d65a52e.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5457-6e700aadac17ceec.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8264-dad1f090c4278137.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8432-ec2b97cbf32ec5a7.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8731-9e0ad513b0dfce83.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/874-18d9f33cdd028e9d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-4428392376aa9dd4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9626-2627bc34f11b2906.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/compute-5ead3afa88d14721.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-87b31b998e9f1222.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-a7d74042d52c3c38.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks-cf7f1ba0b44ec0fb.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/files-899b362caff47d4d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-b9ddd48737fba474.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-1e8731ba2559fef4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-a6307396dfa82c88.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-fc5aafe5085739a9.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-c008f0201864d693.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-321f47b2dba4c780.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-bf4d162b5460acc6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-62ee3e957688c725.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-33d9fb90871be84c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-f4ff09cfff8bad46.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-04b0a55e8ad6f814.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/terminal-88025dd0ed3051a6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/test-b936dd972db94c6b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-e5e49ac3b9282aaa.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-a5372e488b5f44a2.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{7yQskzl_RfcpoOQn1DPQV → A7VXVGKgLQCukXcjdysDz}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{2_SHgS8M315ekLG0qkZzC → wSRrM15xnvA8lOWcaque7}/_ssgManifest.js +0 -0
- {mage_ai-0.9.55.dist-info → mage_ai-0.9.57.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.55.dist-info → mage_ai-0.9.57.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.55.dist-info → mage_ai-0.9.57.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.55.dist-info → mage_ai-0.9.57.dist-info}/top_level.txt +0 -0
|
@@ -163,10 +163,10 @@ def project_platform_activated() -> bool:
|
|
|
163
163
|
return ENABLE_PROJECT_PLATFORM and os.path.exists(platform_settings_full_path())
|
|
164
164
|
|
|
165
165
|
|
|
166
|
-
def platform_settings() -> Dict:
|
|
166
|
+
def platform_settings(mage_projects_only: bool = False) -> Dict:
|
|
167
167
|
config = __load_platform_settings(platform_settings_full_path()) or {}
|
|
168
168
|
config['projects'] = merge_dict(
|
|
169
|
-
__get_projects_of_any_type() or {},
|
|
169
|
+
{} if mage_projects_only else (__get_projects_of_any_type() or {}),
|
|
170
170
|
(config.get('projects') if config else {}) or {},
|
|
171
171
|
)
|
|
172
172
|
return config
|
|
@@ -181,26 +181,31 @@ def active_project_settings(
|
|
|
181
181
|
settings = project_platform_settings(repo_path=repo_path, mage_projects_only=True)
|
|
182
182
|
|
|
183
183
|
items = list(settings.items())
|
|
184
|
-
if items:
|
|
185
|
-
|
|
186
|
-
lambda tup: tup and len(tup) >= 2 and (tup[1] or {}).get('active'),
|
|
187
|
-
items,
|
|
188
|
-
)
|
|
184
|
+
if not items:
|
|
185
|
+
return
|
|
189
186
|
|
|
190
|
-
|
|
191
|
-
|
|
187
|
+
project_settings_tup = find(
|
|
188
|
+
lambda tup: tup and len(tup) >= 2 and (tup[1] or {}).get('active'),
|
|
189
|
+
items,
|
|
190
|
+
)
|
|
192
191
|
|
|
193
|
-
|
|
194
|
-
|
|
192
|
+
if not project_settings_tup and get_default:
|
|
193
|
+
project_settings_tup = items[0]
|
|
195
194
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
195
|
+
if project_settings_tup:
|
|
196
|
+
project_name, project_settings = project_settings_tup
|
|
197
|
+
|
|
198
|
+
return merge_dict(
|
|
199
|
+
project_settings or {},
|
|
200
|
+
dict(uuid=project_name),
|
|
201
|
+
)
|
|
200
202
|
|
|
201
203
|
|
|
202
204
|
def project_platform_settings(repo_path: str = None, mage_projects_only: bool = False) -> Dict:
|
|
203
|
-
mapping = (__combined_platform_settings(
|
|
205
|
+
mapping = (__combined_platform_settings(
|
|
206
|
+
repo_path=repo_path,
|
|
207
|
+
mage_projects_only=mage_projects_only,
|
|
208
|
+
) or {}).get('projects')
|
|
204
209
|
|
|
205
210
|
if mage_projects_only:
|
|
206
211
|
select_keys = []
|
|
@@ -214,9 +219,28 @@ def project_platform_settings(repo_path: str = None, mage_projects_only: bool =
|
|
|
214
219
|
return mapping
|
|
215
220
|
|
|
216
221
|
|
|
217
|
-
def
|
|
218
|
-
|
|
219
|
-
|
|
222
|
+
def update_settings(settings: Dict) -> Dict:
|
|
223
|
+
projects = {}
|
|
224
|
+
for project_name, project_settings in (settings.get('projects') or {}).items():
|
|
225
|
+
uuid = project_settings.get('uuid') or project_name
|
|
226
|
+
projects[uuid] = extract(project_settings or {}, [
|
|
227
|
+
'path',
|
|
228
|
+
])
|
|
229
|
+
|
|
230
|
+
settings['projects'] = projects
|
|
231
|
+
content = yaml.dump(settings)
|
|
232
|
+
|
|
233
|
+
safe_write(platform_settings_full_path(), content)
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
def __combined_platform_settings(repo_path: str = None, mage_projects_only: bool = False) -> Dict:
|
|
237
|
+
parent = (platform_settings() or {}).copy()
|
|
238
|
+
child = (__local_platform_settings(repo_path=repo_path) or {}).copy()
|
|
239
|
+
|
|
240
|
+
if mage_projects_only:
|
|
241
|
+
keys = (parent.get('projects') or {}).keys()
|
|
242
|
+
child['projects'] = extract(child.get('projects') or {}, keys)
|
|
243
|
+
|
|
220
244
|
combine_into(child, parent)
|
|
221
245
|
return parent
|
|
222
246
|
|
|
@@ -249,7 +273,7 @@ def __get_projects_of_any_type() -> Dict:
|
|
|
249
273
|
repo_path = base_repo_path()
|
|
250
274
|
for path in os.listdir(repo_path):
|
|
251
275
|
project_path = os.path.join(repo_path, path)
|
|
252
|
-
if not os.path.isdir(project_path):
|
|
276
|
+
if not os.path.isdir(project_path) or path.startswith('.'):
|
|
253
277
|
continue
|
|
254
278
|
|
|
255
279
|
is_project = False
|
mage_ai/shared/io.py
CHANGED
|
@@ -87,6 +87,9 @@ async def safe_write_async(filepath: str, content: str, write_func: Callable = N
|
|
|
87
87
|
|
|
88
88
|
|
|
89
89
|
async def read_last_line_async(file_path: str) -> str:
|
|
90
|
+
if not file_path:
|
|
91
|
+
return
|
|
92
|
+
|
|
90
93
|
# https://stackoverflow.com/questions/46258499/how-to-read-the-last-line-of-a-file-in-python
|
|
91
94
|
async with aiofiles.open(file_path, mode='rb') as f:
|
|
92
95
|
# catch OSError in case of a one line file
|
|
@@ -15,6 +15,7 @@ class RabbitMQConfig(BaseConfig):
|
|
|
15
15
|
queue_name: str
|
|
16
16
|
username: str = 'guest'
|
|
17
17
|
password: str = 'guest'
|
|
18
|
+
url_protocol: str = 'amqp'
|
|
18
19
|
amqp_url_virtual_host: str = r'%2f'
|
|
19
20
|
|
|
20
21
|
|
|
@@ -29,12 +30,13 @@ class RabbitMQSink(BaseSink):
|
|
|
29
30
|
password = self.config.password
|
|
30
31
|
connection_host = self.config.connection_host
|
|
31
32
|
connection_port = self.config.connection_port
|
|
33
|
+
url_protocol = self.config.url_protocol
|
|
32
34
|
vt_host = self.config.amqp_url_virtual_host
|
|
33
35
|
|
|
34
36
|
self._print(f'Starting to initialize producer for queue {queue_name}')
|
|
35
37
|
|
|
36
38
|
try:
|
|
37
|
-
generated_url = f"
|
|
39
|
+
generated_url = f"{url_protocol}://{username}:{password}@" \
|
|
38
40
|
f"{connection_host}:{connection_port}/{vt_host}"
|
|
39
41
|
|
|
40
42
|
self._print(f'Trying to connect on {generated_url}')
|
|
@@ -3,9 +3,10 @@ from dataclasses import dataclass
|
|
|
3
3
|
from typing import Callable, Dict
|
|
4
4
|
|
|
5
5
|
import pika
|
|
6
|
+
from pika.exceptions import AMQPConnectionError
|
|
7
|
+
|
|
6
8
|
from mage_ai.shared.config import BaseConfig
|
|
7
9
|
from mage_ai.streaming.sources.base import BaseSource
|
|
8
|
-
from pika.exceptions import AMQPConnectionError
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
@dataclass
|
|
@@ -24,6 +25,7 @@ class RabbitMQConfig(BaseConfig):
|
|
|
24
25
|
username: str = 'guest'
|
|
25
26
|
password: str = 'guest'
|
|
26
27
|
amqp_url_virtual_host: str = r'%2f'
|
|
28
|
+
url_protocol: str = 'amqp'
|
|
27
29
|
consume_config: ConsumeConfig = None
|
|
28
30
|
|
|
29
31
|
@classmethod
|
|
@@ -43,13 +45,14 @@ class RabbitMQSource(BaseSource):
|
|
|
43
45
|
password = self.config.password
|
|
44
46
|
connection_host = self.config.connection_host
|
|
45
47
|
connection_port = self.config.connection_port
|
|
48
|
+
url_protocol = self.config.url_protocol
|
|
46
49
|
vt_host = self.config.amqp_url_virtual_host
|
|
47
50
|
|
|
48
51
|
self._print(f'Starting to initialize consumer for queue {queue_name}')
|
|
49
52
|
|
|
50
53
|
try:
|
|
51
54
|
|
|
52
|
-
generated_url = f"
|
|
55
|
+
generated_url = f"{url_protocol}://{username}:{password}@" \
|
|
53
56
|
f"{connection_host}:{connection_port}/{vt_host}"
|
|
54
57
|
|
|
55
58
|
self._print(f'Trying to connect on {generated_url}')
|
|
@@ -84,6 +84,10 @@ class PipelineRunAPIEndpointTest(BaseAPIEndpointTest):
|
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
@patch('mage_ai.settings.platform.utils.project_platform_activated', lambda: True)
|
|
87
|
+
@patch(
|
|
88
|
+
'mage_ai.orchestration.db.models.schedules.project_platform_activated',
|
|
89
|
+
lambda: True,
|
|
90
|
+
)
|
|
87
91
|
class PipelineRunProjectPlatformTests(ProjectPlatformMixin, BaseAPIEndpointTest):
|
|
88
92
|
async def test_collection_project_platform_activated(self):
|
|
89
93
|
pipelines = []
|
|
@@ -126,5 +126,6 @@ build_update_endpoint_tests(
|
|
|
126
126
|
assert_after_update=_assert_after_update,
|
|
127
127
|
patch_function_settings=[
|
|
128
128
|
('mage_ai.api.resources.ProjectResource.activate_project',),
|
|
129
|
+
('mage_ai.data_preparation.models.project.project_platform_activated', lambda: True),
|
|
129
130
|
],
|
|
130
131
|
)
|
|
@@ -339,8 +339,8 @@ class PipelineResourceTest(BaseApiTestCase):
|
|
|
339
339
|
lambda: True,
|
|
340
340
|
):
|
|
341
341
|
with patch(
|
|
342
|
-
'mage_ai.api.resources.PipelineResource.
|
|
342
|
+
'mage_ai.api.resources.PipelineResource.get_pipeline_from_platform_async',
|
|
343
343
|
wraps=Pipeline.get_async,
|
|
344
344
|
) as mock:
|
|
345
345
|
await PipelineResource.member(self.pipeline1.uuid, None)
|
|
346
|
-
mock.assert_called_once_with(self.pipeline1.uuid
|
|
346
|
+
mock.assert_called_once_with(self.pipeline1.uuid)
|
|
@@ -7,6 +7,7 @@ from mage_ai.data_preparation.models.block.dbt.block_sql import DBTBlock, DBTBlo
|
|
|
7
7
|
from mage_ai.data_preparation.models.constants import BlockLanguage, BlockType
|
|
8
8
|
from mage_ai.data_preparation.models.file import File
|
|
9
9
|
from mage_ai.settings.utils import base_repo_path
|
|
10
|
+
from mage_ai.shared.path_fixer import add_root_repo_path_to_relative_path
|
|
10
11
|
from mage_ai.tests.api.endpoints.mixins import BaseAPIEndpointTest
|
|
11
12
|
from mage_ai.tests.shared.mixins import ProjectPlatformMixin
|
|
12
13
|
|
|
@@ -45,7 +46,7 @@ class BlockWithProjectPlatformShared:
|
|
|
45
46
|
'get_file_path_from_source',
|
|
46
47
|
lambda value=value: value,
|
|
47
48
|
):
|
|
48
|
-
self.assertEqual(self.block.file_path, value)
|
|
49
|
+
self.assertEqual(self.block.file_path, add_root_repo_path_to_relative_path(value))
|
|
49
50
|
|
|
50
51
|
with patch.object(
|
|
51
52
|
self.block,
|
|
@@ -197,7 +198,7 @@ class BlockWithProjectPlatformActivatedTest(ProjectPlatformMixin, BlockWithProje
|
|
|
197
198
|
with patch('mage_ai.data_preparation.models.block.load_template') as mock_load_template:
|
|
198
199
|
with patch(
|
|
199
200
|
'mage_ai.data_preparation.models.block.from_another_project',
|
|
200
|
-
lambda
|
|
201
|
+
lambda file_path, other_file_path, x=file_path: file_path == x,
|
|
201
202
|
):
|
|
202
203
|
self.build_block(configuration=dict(
|
|
203
204
|
file_source=dict(
|
|
@@ -223,7 +224,7 @@ class BlockWithProjectPlatformActivatedTest(ProjectPlatformMixin, BlockWithProje
|
|
|
223
224
|
):
|
|
224
225
|
with patch(
|
|
225
226
|
'mage_ai.data_preparation.models.block.from_another_project',
|
|
226
|
-
lambda
|
|
227
|
+
lambda file_path, other_file_path, x=file_path: file_path == x,
|
|
227
228
|
):
|
|
228
229
|
self.build_block(
|
|
229
230
|
block_type=BlockType.DBT,
|
|
@@ -12,6 +12,7 @@ from mage_ai.data_preparation.models.block.errors import HasDownstreamDependenci
|
|
|
12
12
|
from mage_ai.data_preparation.models.pipeline import Pipeline
|
|
13
13
|
from mage_ai.data_preparation.repo_manager import get_repo_config
|
|
14
14
|
from mage_ai.data_preparation.variable_manager import VariableManager
|
|
15
|
+
from mage_ai.shared.path_fixer import add_root_repo_path_to_relative_path
|
|
15
16
|
from mage_ai.tests.base_test import DBTestCase
|
|
16
17
|
from mage_ai.tests.factory import create_integration_pipeline_with_blocks
|
|
17
18
|
from mage_ai.tests.shared.mixins import ProjectPlatformMixin
|
|
@@ -763,4 +764,4 @@ class BlockProjectPlatformTests(ProjectPlatformMixin):
|
|
|
763
764
|
configuration=dict(file_source=dict(path=path))
|
|
764
765
|
)
|
|
765
766
|
|
|
766
|
-
self.assertEqual(block.file_path, path)
|
|
767
|
+
self.assertEqual(block.file_path, add_root_repo_path_to_relative_path(path))
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import os
|
|
2
|
-
from unittest.mock import patch
|
|
2
|
+
from unittest.mock import call, patch
|
|
3
3
|
|
|
4
4
|
import yaml
|
|
5
5
|
|
|
@@ -80,9 +80,19 @@ class ProjectTest(ProjectPlatformMixin, AsyncDBTestCase):
|
|
|
80
80
|
self.assertEqual(project.version, VERSION)
|
|
81
81
|
self.assertFalse(project.root_project)
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
self.assertEqual(
|
|
84
|
+
mock_get_repo_config.mock_calls[0],
|
|
85
|
+
call(
|
|
86
|
+
repo_path=os.path.join(base_repo_path(), 'mage_platform'),
|
|
87
|
+
root_project=False,
|
|
88
|
+
),
|
|
89
|
+
)
|
|
90
|
+
self.assertEqual(
|
|
91
|
+
mock_get_repo_config.mock_calls[1],
|
|
92
|
+
call(
|
|
93
|
+
repo_path=base_repo_path(),
|
|
94
|
+
root_project=True,
|
|
95
|
+
),
|
|
86
96
|
)
|
|
87
97
|
|
|
88
98
|
with patch(
|
|
@@ -96,9 +106,19 @@ class ProjectTest(ProjectPlatformMixin, AsyncDBTestCase):
|
|
|
96
106
|
self.assertEqual(project.version, VERSION)
|
|
97
107
|
self.assertTrue(project.root_project)
|
|
98
108
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
109
|
+
self.assertEqual(
|
|
110
|
+
mock_get_repo_config.mock_calls[0],
|
|
111
|
+
call(
|
|
112
|
+
repo_path=base_repo_path(),
|
|
113
|
+
root_project=True,
|
|
114
|
+
),
|
|
115
|
+
)
|
|
116
|
+
self.assertEqual(
|
|
117
|
+
mock_get_repo_config.mock_calls[1],
|
|
118
|
+
call(
|
|
119
|
+
repo_path=base_repo_path(),
|
|
120
|
+
root_project=True,
|
|
121
|
+
),
|
|
102
122
|
)
|
|
103
123
|
|
|
104
124
|
def test_repo_path_for_database_query(self):
|
|
@@ -1791,6 +1791,10 @@ class BlockRunTests(DBTestCase):
|
|
|
1791
1791
|
self.assertEqual(b.logs.get('path'), expected_file_path)
|
|
1792
1792
|
|
|
1793
1793
|
|
|
1794
|
+
@patch(
|
|
1795
|
+
'mage_ai.orchestration.db.models.schedules.project_platform_activated',
|
|
1796
|
+
lambda: True,
|
|
1797
|
+
)
|
|
1794
1798
|
class PipelineScheduleProjectPlatformTests(ProjectPlatformMixin):
|
|
1795
1799
|
def test_repo_query(self):
|
|
1796
1800
|
with patch(
|
|
@@ -1831,7 +1835,9 @@ class PipelineScheduleProjectPlatformTests(ProjectPlatformMixin):
|
|
|
1831
1835
|
self.assertIn(ps.id, ids)
|
|
1832
1836
|
|
|
1833
1837
|
def test_pipeline(self):
|
|
1834
|
-
with patch(
|
|
1838
|
+
with patch(
|
|
1839
|
+
'mage_ai.orchestration.db.models.schedules_project_platform.get_pipeline_from_platform',
|
|
1840
|
+
) as mock:
|
|
1835
1841
|
pipeline_uuid = self.faker.unique.name()
|
|
1836
1842
|
repo_path = self.faker.unique.name()
|
|
1837
1843
|
|
|
@@ -1847,6 +1853,10 @@ class PipelineScheduleProjectPlatformTests(ProjectPlatformMixin):
|
|
|
1847
1853
|
)
|
|
1848
1854
|
|
|
1849
1855
|
|
|
1856
|
+
@patch(
|
|
1857
|
+
'mage_ai.orchestration.db.models.schedules.project_platform_activated',
|
|
1858
|
+
lambda: True,
|
|
1859
|
+
)
|
|
1850
1860
|
class PipelineRunProjectPlatformTests(ProjectPlatformMixin, AsyncDBTestCase):
|
|
1851
1861
|
def test_pipeline(self):
|
|
1852
1862
|
pipeline_uuid = self.faker.unique.name()
|
|
@@ -1864,7 +1874,9 @@ class PipelineRunProjectPlatformTests(ProjectPlatformMixin, AsyncDBTestCase):
|
|
|
1864
1874
|
create_block_runs=False,
|
|
1865
1875
|
)
|
|
1866
1876
|
|
|
1867
|
-
with patch(
|
|
1877
|
+
with patch(
|
|
1878
|
+
'mage_ai.orchestration.db.models.schedules_project_platform.get_pipeline_from_platform',
|
|
1879
|
+
) as mock:
|
|
1868
1880
|
pipeline_run.pipeline
|
|
1869
1881
|
|
|
1870
1882
|
mock.assert_called_once_with(
|
|
@@ -1926,11 +1938,12 @@ class PipelineRunProjectPlatformTests(ProjectPlatformMixin, AsyncDBTestCase):
|
|
|
1926
1938
|
return fake_logger_manager
|
|
1927
1939
|
|
|
1928
1940
|
with patch(
|
|
1929
|
-
'mage_ai.orchestration.db.models.
|
|
1941
|
+
'mage_ai.orchestration.db.models.schedules_project_platform.'
|
|
1942
|
+
'get_pipeline_from_platform_async',
|
|
1930
1943
|
__get_pipeline_from_platform_async,
|
|
1931
1944
|
):
|
|
1932
1945
|
with patch(
|
|
1933
|
-
'mage_ai.orchestration.db.models.
|
|
1946
|
+
'mage_ai.orchestration.db.models.schedules_project_platform.LoggerManagerFactory',
|
|
1934
1947
|
FakeLoggerManagerFactory,
|
|
1935
1948
|
):
|
|
1936
1949
|
await pipeline_run.logs_async()
|
|
@@ -1951,7 +1964,7 @@ class PipelineRunProjectPlatformTests(ProjectPlatformMixin, AsyncDBTestCase):
|
|
|
1951
1964
|
)
|
|
1952
1965
|
|
|
1953
1966
|
with patch(
|
|
1954
|
-
'mage_ai.orchestration.db.models.
|
|
1967
|
+
'mage_ai.orchestration.db.models.schedules_project_platform.get_global_variables',
|
|
1955
1968
|
wraps=lambda pipeline_uuid, pipeline: {},
|
|
1956
1969
|
) as mock:
|
|
1957
1970
|
with patch(
|
|
@@ -1963,6 +1976,10 @@ class PipelineRunProjectPlatformTests(ProjectPlatformMixin, AsyncDBTestCase):
|
|
|
1963
1976
|
self.assertEqual(mock.mock_calls[0][2]['pipeline'].uuid, pipeline_run.pipeline_uuid)
|
|
1964
1977
|
|
|
1965
1978
|
|
|
1979
|
+
@patch(
|
|
1980
|
+
'mage_ai.orchestration.db.models.schedules.project_platform_activated',
|
|
1981
|
+
lambda: True,
|
|
1982
|
+
)
|
|
1966
1983
|
class BlockRunProjectPlatformTests(ProjectPlatformMixin, AsyncDBTestCase):
|
|
1967
1984
|
async def test_logs_async(self):
|
|
1968
1985
|
value = self.faker.unique.name()
|
|
@@ -2028,11 +2045,12 @@ class BlockRunProjectPlatformTests(ProjectPlatformMixin, AsyncDBTestCase):
|
|
|
2028
2045
|
return fake_logger_manager
|
|
2029
2046
|
|
|
2030
2047
|
with patch(
|
|
2031
|
-
'mage_ai.orchestration.db.models.
|
|
2048
|
+
'mage_ai.orchestration.db.models.schedules_project_platform.' +
|
|
2049
|
+
'get_pipeline_from_platform_async',
|
|
2032
2050
|
__get_pipeline_from_platform_async,
|
|
2033
2051
|
):
|
|
2034
2052
|
with patch(
|
|
2035
|
-
'mage_ai.orchestration.db.models.
|
|
2053
|
+
'mage_ai.orchestration.db.models.schedules_project_platform.LoggerManagerFactory',
|
|
2036
2054
|
FakeLoggerManagerFactory,
|
|
2037
2055
|
):
|
|
2038
2056
|
await block_run.logs_async()
|