mage-ai 0.9.47__py3-none-any.whl → 0.9.48__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/presenters/PipelinePresenter.py +1 -0
- mage_ai/data_preparation/executors/block_executor.py +21 -1
- mage_ai/data_preparation/executors/pipeline_executor.py +19 -4
- mage_ai/data_preparation/models/block/__init__.py +50 -20
- mage_ai/data_preparation/models/block/data_integration/mixins.py +6 -6
- mage_ai/data_preparation/models/block/data_integration/utils.py +2 -2
- mage_ai/data_preparation/models/block/sql/bigquery.py +2 -2
- mage_ai/data_preparation/models/block/sql/snowflake.py +2 -2
- mage_ai/data_preparation/models/block/sql/trino.py +2 -2
- mage_ai/data_preparation/models/block/sql/utils/shared.py +2 -2
- mage_ai/data_preparation/models/block/utils.py +25 -16
- mage_ai/data_preparation/models/pipeline.py +5 -0
- mage_ai/data_preparation/models/project/__init__.py +0 -2
- mage_ai/io/chroma.py +13 -4
- mage_ai/orchestration/db/models/schedules.py +71 -0
- mage_ai/orchestration/pipeline_scheduler.py +1 -70
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/frontend_dist/_next/static/chunks/1952-0f9a12782f0aaae6.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2717-14191a781cf2f286.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3419-a7a52bcaaa687b07.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3437-e81a62f33337ca06.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3943-3cb1f765210dd7a4.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/4138-2c16e6d2f22246cd.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{5499-76cf8f023c6b0985.js → 5499-c2853ef57d39fde8.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6990-303bb87fc50f1755.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{7858-d9df72e95e438284.js → 7858-26a5a5d04fa3c703.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8264-9d6a7cea289e29ff.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8487-608d62c0eef1f29a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{1845-5ce774d5ab81ed57.js → 8731-2f78ec7b7760be8f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/90-93d18aaecef0685b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{9264-cc44b07f248707b0.js → 9264-727704fc34e74ae0.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9624-48fba6b4e6966fb7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-78c4a077a2f279c2.js → _app-8254de4f793643d0.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/block-layout-a24cb24b6f08bbc9.js → frontend_dist/_next/static/chunks/pages/block-layout-b926f6eb1ee9a53b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/compute-a9402b51e9fe748e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{files-b37d221eb5ddc248.js → files-85cecae037fd7a70.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/{[...slug]-cfd68e760ae00958.js → [...slug]-c3c9523ea8072c11.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-data-products-c3b79ef31007f95b.js → global-data-products-4d046f15202a1c8d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/{[...slug]-7adc543fc490367a.js → [...slug]-286133386c97a2b6.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks-3da370825153056c.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{files-fe6e73463a20d67c.js → files-39b73da5a15590f6.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-60845f0b59142f32.js → frontend_dist/_next/static/chunks/pages/manage/settings-666748ff5d101411.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-9384c5f1efa2ac18.js → frontend_dist/_next/static/chunks/pages/manage/users/[user]-be27631e67dbe070.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/{new-abd8571907664fdf.js → new-1932ce64823b372b.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-28a930b148d99766.js → frontend_dist/_next/static/chunks/pages/manage/users-ed509c75cf23f0f5.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage-d8a38b5d1f50e798.js → frontend_dist/_next/static/chunks/pages/manage-1feebec1124123fc.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{oauth-8bb62c4f6a511c43.js → oauth-e9b8f19c30381c28.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{overview-f0c40645f385f23f.js → overview-7b2ba2d5405c05fe.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-70fc3351bd11025f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-6ee3b88a5bb4ce94.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c9cf383bc13ce7b8.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{dashboard-571c0962333b92f0.js → dashboard-7bca6f718b939934.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-c119f630038b0685.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-146051325c92d742.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-ddddcddd2f74b4f6.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-15d307e6ba934a56.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-4a238307feddb522.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-f6196e563b960e5c.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-6d1afeb4a84f50f7.js → monitors-25dbd73201d99e80.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-06e55db757959ef8.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d20b2cd08907afd.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-ec3c45cfa027db58.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-11363aa58d51f4e1.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-495e877aa7ed709e.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-49adfeed5157d92b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-6143e028225390f5.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-0886f6320fef7131.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-e82a763d742cc034.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-3c8f062913c66f3e.js → frontend_dist/_next/static/chunks/pages/settings/account/profile-50d20fa715d454af.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-b78b1be5b9ed84b9.js → [...slug]-2bbd63b7e93a8600.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{permissions-37b78a436eeab258.js → permissions-4ea156c39608caab.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-f3c29ec53ee35795.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-db05a80d18c168e5.js → [...slug]-64ec8928d2542f3c.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{roles-f55c77e4f46c8d33.js → roles-835e6ec2a48ec583.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{sync-data-2a1f8737561fdd94.js → sync-data-0769149af025de30.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/{[...slug]-e3bf6e5d8bb250c4.js → [...slug]-612a65c42bcadef0.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-20f0a050a42a015d.js → users-e3365b4029a8db33.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{sign-in-99e2748e3c1d57a3.js → sign-in-f3a33e8f83abdb58.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-f44ccd1499ffd23a.js → frontend_dist/_next/static/chunks/pages/templates/[...slug]-f264097bf8120f31.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{templates-1bfaa1c50e844813.js → templates-406e13cc5c4caab4.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{terminal-ed121e305169cf1c.js → terminal-ef8ad878e5e7bb2f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-a90728798f964700.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{version-control-dd4fb405695f74bf.js → version-control-0e0c2713a2922be7.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/xxcdnITr3IkTdETH5ghqw/_buildManifest.js +1 -0
- 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 +5 -5
- mage_ai/server/frontend_dist/global-hooks.html +5 -5
- 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 +3 -3
- 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 +11 -11
- 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 +4 -4
- 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/chunks/1952-0f9a12782f0aaae6.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-14191a781cf2f286.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3419-a7a52bcaaa687b07.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3437-e81a62f33337ca06.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3943-3cb1f765210dd7a4.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4138-2c16e6d2f22246cd.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{5499-76cf8f023c6b0985.js → 5499-c2853ef57d39fde8.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6990-303bb87fc50f1755.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{7858-d9df72e95e438284.js → 7858-26a5a5d04fa3c703.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8264-9d6a7cea289e29ff.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8487-608d62c0eef1f29a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1845-5ce774d5ab81ed57.js → 8731-2f78ec7b7760be8f.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/90-93d18aaecef0685b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{9264-cc44b07f248707b0.js → 9264-727704fc34e74ae0.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-48fba6b4e6966fb7.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{_app-78c4a077a2f279c2.js → _app-8254de4f793643d0.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/block-layout-a24cb24b6f08bbc9.js → frontend_dist_base_path_template/_next/static/chunks/pages/block-layout-b926f6eb1ee9a53b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/compute-a9402b51e9fe748e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{files-b37d221eb5ddc248.js → files-85cecae037fd7a70.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/{[...slug]-cfd68e760ae00958.js → [...slug]-c3c9523ea8072c11.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-data-products-c3b79ef31007f95b.js → global-data-products-4d046f15202a1c8d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/{[...slug]-7adc543fc490367a.js → [...slug]-286133386c97a2b6.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks-3da370825153056c.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{files-fe6e73463a20d67c.js → files-39b73da5a15590f6.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/settings-60845f0b59142f32.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-666748ff5d101411.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/users/[user]-9384c5f1efa2ac18.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-be27631e67dbe070.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/{new-abd8571907664fdf.js → new-1932ce64823b372b.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/users-28a930b148d99766.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-ed509c75cf23f0f5.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage-d8a38b5d1f50e798.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage-1feebec1124123fc.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{oauth-8bb62c4f6a511c43.js → oauth-e9b8f19c30381c28.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{overview-f0c40645f385f23f.js → overview-7b2ba2d5405c05fe.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-70fc3351bd11025f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-6ee3b88a5bb4ce94.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c9cf383bc13ce7b8.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{dashboard-571c0962333b92f0.js → dashboard-7bca6f718b939934.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-c119f630038b0685.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-146051325c92d742.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-ddddcddd2f74b4f6.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-15d307e6ba934a56.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-4a238307feddb522.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-f6196e563b960e5c.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-6d1afeb4a84f50f7.js → monitors-25dbd73201d99e80.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-06e55db757959ef8.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d20b2cd08907afd.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-ec3c45cfa027db58.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-11363aa58d51f4e1.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-495e877aa7ed709e.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-49adfeed5157d92b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-6143e028225390f5.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-0886f6320fef7131.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-e82a763d742cc034.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/account/profile-3c8f062913c66f3e.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-50d20fa715d454af.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-b78b1be5b9ed84b9.js → [...slug]-2bbd63b7e93a8600.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{permissions-37b78a436eeab258.js → permissions-4ea156c39608caab.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-f3c29ec53ee35795.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-db05a80d18c168e5.js → [...slug]-64ec8928d2542f3c.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{roles-f55c77e4f46c8d33.js → roles-835e6ec2a48ec583.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{sync-data-2a1f8737561fdd94.js → sync-data-0769149af025de30.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/{[...slug]-e3bf6e5d8bb250c4.js → [...slug]-612a65c42bcadef0.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-20f0a050a42a015d.js → users-e3365b4029a8db33.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{sign-in-99e2748e3c1d57a3.js → sign-in-f3a33e8f83abdb58.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/templates/[...slug]-f44ccd1499ffd23a.js → frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-f264097bf8120f31.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{templates-1bfaa1c50e844813.js → templates-406e13cc5c4caab4.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{terminal-ed121e305169cf1c.js → terminal-ef8ad878e5e7bb2f.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-a90728798f964700.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{version-control-dd4fb405695f74bf.js → version-control-0e0c2713a2922be7.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/gDn6inKdLyj35NvURBSCV/_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/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 +10 -10
- 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 +4 -4
- 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 +2 -0
- mage_ai/streaming/sources/nats_js.py +12 -1
- mage_ai/tests/data_preparation/executors/test_block_executor.py +2 -0
- mage_ai/tests/data_preparation/models/test_pipeline.py +5 -0
- {mage_ai-0.9.47.dist-info → mage_ai-0.9.48.dist-info}/METADATA +3 -3
- {mage_ai-0.9.47.dist-info → mage_ai-0.9.48.dist-info}/RECORD +257 -257
- mage_ai/server/frontend_dist/_next/static/N3FS4bHv0jpYeeg672uYK/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1952-57858e7445d24413.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2717-92cdffd87b6f6e05.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3419-715ca383fa15a5ef.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3437-b4d6a037cf5781f8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3943-c9fb980f03df6450.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/600-705fe234320ec5de.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/722-900f786d24f91b2e.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8264-0d582a6ca33c3dfa.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8487-8e1c09546dff4dbf.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/90-a7308bae028d7001.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9624-334e7db5c84cb4ea.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/compute-419775ca1293b354.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks-51d366993f6dd449.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-b35d37bfba8fbccc.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-9adc2974aada27ba.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-51b1311dff2a974e.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-2333e524d34b474a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-ef680455ae54ccbe.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1ff9bb8e22ca1e75.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-b75bf17498e87354.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-779c3ef0676a12ac.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-bbea9a088657404a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-3737f2b0afc2ede3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-c1f4ed17d501ccca.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-8bdd858240d5dbf6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/aoO6jYZLVlUGCCdY-wmy8/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1952-57858e7445d24413.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-92cdffd87b6f6e05.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3419-715ca383fa15a5ef.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3437-b4d6a037cf5781f8.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3943-c9fb980f03df6450.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/600-705fe234320ec5de.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/722-900f786d24f91b2e.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8264-0d582a6ca33c3dfa.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8487-8e1c09546dff4dbf.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/90-a7308bae028d7001.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-334e7db5c84cb4ea.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/compute-419775ca1293b354.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks-51d366993f6dd449.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-b35d37bfba8fbccc.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-9adc2974aada27ba.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-51b1311dff2a974e.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-2333e524d34b474a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-ef680455ae54ccbe.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1ff9bb8e22ca1e75.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-b75bf17498e87354.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-779c3ef0676a12ac.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-bbea9a088657404a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-3737f2b0afc2ede3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-c1f4ed17d501ccca.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-8bdd858240d5dbf6.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{N3FS4bHv0jpYeeg672uYK → xxcdnITr3IkTdETH5ghqw}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{aoO6jYZLVlUGCCdY-wmy8 → gDn6inKdLyj35NvURBSCV}/_ssgManifest.js +0 -0
- {mage_ai-0.9.47.dist-info → mage_ai-0.9.48.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.47.dist-info → mage_ai-0.9.48.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.47.dist-info → mage_ai-0.9.48.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.47.dist-info → mage_ai-0.9.48.dist-info}/top_level.txt +0 -0
|
@@ -84,6 +84,8 @@ class BlockExecutor:
|
|
|
84
84
|
self,
|
|
85
85
|
analyze_outputs: bool = False,
|
|
86
86
|
block_run_id: int = None,
|
|
87
|
+
block_run_outputs_cache: Dict[str, List] = None,
|
|
88
|
+
cache_block_output_in_memory: bool = False,
|
|
87
89
|
callback_url: Union[str, None] = None,
|
|
88
90
|
global_vars: Union[Dict, None] = None,
|
|
89
91
|
input_from_output: Union[Dict, None] = None,
|
|
@@ -105,6 +107,10 @@ class BlockExecutor:
|
|
|
105
107
|
Args:
|
|
106
108
|
analyze_outputs: Whether to analyze the outputs of the block.
|
|
107
109
|
block_run_id: The ID of the block run.
|
|
110
|
+
block_run_outputs_cache: block uuid to block outputs mapping. It's used when
|
|
111
|
+
cache_block_output_in_memory is set to True.
|
|
112
|
+
cache_block_output_in_memory: Whether to cache the block output in memory. By default,
|
|
113
|
+
the block output is persisted on disk.
|
|
108
114
|
callback_url: The URL for the callback.
|
|
109
115
|
global_vars: Global variables for the block execution.
|
|
110
116
|
input_from_output: Input from the output of a previous block.
|
|
@@ -512,6 +518,8 @@ class BlockExecutor:
|
|
|
512
518
|
return self._execute(
|
|
513
519
|
analyze_outputs=analyze_outputs,
|
|
514
520
|
block_run_id=block_run_id,
|
|
521
|
+
block_run_outputs_cache=block_run_outputs_cache,
|
|
522
|
+
cache_block_output_in_memory=cache_block_output_in_memory,
|
|
515
523
|
callback_url=callback_url,
|
|
516
524
|
global_vars=global_vars,
|
|
517
525
|
update_status=update_status,
|
|
@@ -620,6 +628,8 @@ class BlockExecutor:
|
|
|
620
628
|
self,
|
|
621
629
|
analyze_outputs: bool = False,
|
|
622
630
|
block_run_id: int = None,
|
|
631
|
+
block_run_outputs_cache: Dict[str, List] = None,
|
|
632
|
+
cache_block_output_in_memory: bool = False,
|
|
623
633
|
callback_url: Union[str, None] = None,
|
|
624
634
|
global_vars: Union[Dict, None] = None,
|
|
625
635
|
update_status: bool = False,
|
|
@@ -640,7 +650,11 @@ class BlockExecutor:
|
|
|
640
650
|
|
|
641
651
|
Args:
|
|
642
652
|
analyze_outputs: Whether to analyze the outputs of the block.
|
|
653
|
+
block_run_outputs_cache: block uuid to block outputs mapping. It's used when
|
|
654
|
+
cache_block_output_in_memory is set to True.
|
|
643
655
|
callback_url: The URL for the callback.
|
|
656
|
+
cache_block_output_in_memory: Whether to cache the block output in memory. By default,
|
|
657
|
+
the block output is persisted on disk.
|
|
644
658
|
global_vars: Global variables for the block execution.
|
|
645
659
|
update_status: Whether to update the status of the block execution.
|
|
646
660
|
input_from_output: Input from the output of a previous block.
|
|
@@ -659,7 +673,10 @@ class BlockExecutor:
|
|
|
659
673
|
logging_tags = dict()
|
|
660
674
|
|
|
661
675
|
extra_options = {}
|
|
662
|
-
|
|
676
|
+
if cache_block_output_in_memory:
|
|
677
|
+
store_variables = False
|
|
678
|
+
else:
|
|
679
|
+
store_variables = True
|
|
663
680
|
is_data_integration = False
|
|
664
681
|
|
|
665
682
|
if self.project.is_feature_enabled(FeatureUUID.DATA_INTEGRATION_IN_BATCH_PIPELINE):
|
|
@@ -957,6 +974,7 @@ class BlockExecutor:
|
|
|
957
974
|
|
|
958
975
|
result = self.block.execute_sync(
|
|
959
976
|
analyze_outputs=analyze_outputs,
|
|
977
|
+
block_run_outputs_cache=block_run_outputs_cache,
|
|
960
978
|
execution_partition=self.execution_partition,
|
|
961
979
|
global_vars=global_vars,
|
|
962
980
|
logger=self.logger,
|
|
@@ -979,6 +997,7 @@ class BlockExecutor:
|
|
|
979
997
|
global_vars=global_vars,
|
|
980
998
|
logger=self.logger,
|
|
981
999
|
logging_tags=logging_tags,
|
|
1000
|
+
outputs=result if cache_block_output_in_memory else None,
|
|
982
1001
|
)
|
|
983
1002
|
elif PipelineType.INTEGRATION != self.pipeline.type and \
|
|
984
1003
|
(not is_data_integration or BlockLanguage.PYTHON == self.block.language):
|
|
@@ -987,6 +1006,7 @@ class BlockExecutor:
|
|
|
987
1006
|
global_vars=global_vars,
|
|
988
1007
|
logger=self.logger,
|
|
989
1008
|
logging_tags=logging_tags,
|
|
1009
|
+
outputs=result if cache_block_output_in_memory else None,
|
|
990
1010
|
update_tests=False,
|
|
991
1011
|
dynamic_block_uuid=dynamic_block_uuid,
|
|
992
1012
|
)
|
|
@@ -89,7 +89,10 @@ class PipelineExecutor:
|
|
|
89
89
|
if global_vars is None:
|
|
90
90
|
global_vars = dict()
|
|
91
91
|
|
|
92
|
-
def create_block_task(
|
|
92
|
+
def create_block_task(
|
|
93
|
+
block_run: BlockRun,
|
|
94
|
+
block_run_outputs_cache: Dict[str, List],
|
|
95
|
+
) -> asyncio.Task:
|
|
93
96
|
async def execute_block() -> None:
|
|
94
97
|
executor_kwargs = dict(
|
|
95
98
|
pipeline=self.pipeline,
|
|
@@ -102,22 +105,34 @@ class PipelineExecutor:
|
|
|
102
105
|
block_run_data['started_at'] = datetime.now(tz=pytz.UTC)
|
|
103
106
|
|
|
104
107
|
block_run.update(**block_run_data)
|
|
105
|
-
BlockExecutor(**executor_kwargs).execute(
|
|
108
|
+
return BlockExecutor(**executor_kwargs).execute(
|
|
106
109
|
block_run_id=block_run.id,
|
|
110
|
+
block_run_outputs_cache=block_run_outputs_cache,
|
|
111
|
+
cache_block_output_in_memory=self.pipeline.cache_block_output_in_memory,
|
|
107
112
|
global_vars=global_vars,
|
|
108
113
|
pipeline_run_id=pipeline_run.id,
|
|
109
114
|
)
|
|
110
115
|
|
|
111
116
|
return asyncio.create_task(execute_block())
|
|
112
117
|
|
|
118
|
+
block_run_outputs_cache = dict()
|
|
119
|
+
|
|
113
120
|
while not pipeline_run.all_blocks_completed(allow_blocks_to_fail):
|
|
121
|
+
# Update the statuses of the block runs to CONDITION_FAILED or UPSTREAM_FAILED.
|
|
122
|
+
pipeline_run.update_block_run_statuses(pipeline_run.initial_block_runs)
|
|
114
123
|
executable_block_runs = pipeline_run.executable_block_runs(
|
|
115
124
|
allow_blocks_to_fail=allow_blocks_to_fail,
|
|
116
125
|
)
|
|
117
126
|
if not executable_block_runs:
|
|
118
127
|
return
|
|
119
|
-
block_run_tasks = [
|
|
120
|
-
|
|
128
|
+
block_run_tasks = [
|
|
129
|
+
create_block_task(b, block_run_outputs_cache=block_run_outputs_cache)
|
|
130
|
+
for b in executable_block_runs]
|
|
131
|
+
block_run_outputs = await asyncio.gather(*block_run_tasks)
|
|
132
|
+
if self.pipeline.cache_block_output_in_memory:
|
|
133
|
+
for idx, block_run in enumerate(executable_block_runs):
|
|
134
|
+
block_run_outputs_cache[block_run.block_uuid] = \
|
|
135
|
+
block_run_outputs[idx].get('output', [])
|
|
121
136
|
|
|
122
137
|
def build_tags(self, **kwargs):
|
|
123
138
|
default_tags = dict(
|
|
@@ -978,6 +978,7 @@ class Block(DataIntegrationMixin, SparkBlock):
|
|
|
978
978
|
def execute_sync(
|
|
979
979
|
self,
|
|
980
980
|
analyze_outputs: bool = False,
|
|
981
|
+
block_run_outputs_cache: Dict[str, List] = None,
|
|
981
982
|
build_block_output_stdout: Callable[..., object] = None,
|
|
982
983
|
custom_code: str = None,
|
|
983
984
|
execution_partition: str = None,
|
|
@@ -1039,6 +1040,7 @@ class Block(DataIntegrationMixin, SparkBlock):
|
|
|
1039
1040
|
)
|
|
1040
1041
|
|
|
1041
1042
|
output = self.execute_block(
|
|
1043
|
+
block_run_outputs_cache=block_run_outputs_cache,
|
|
1042
1044
|
build_block_output_stdout=build_block_output_stdout,
|
|
1043
1045
|
custom_code=custom_code,
|
|
1044
1046
|
execution_partition=execution_partition,
|
|
@@ -1218,6 +1220,7 @@ class Block(DataIntegrationMixin, SparkBlock):
|
|
|
1218
1220
|
|
|
1219
1221
|
def execute_block(
|
|
1220
1222
|
self,
|
|
1223
|
+
block_run_outputs_cache: Dict[str, List] = None,
|
|
1221
1224
|
build_block_output_stdout: Callable[..., object] = None,
|
|
1222
1225
|
custom_code: str = None,
|
|
1223
1226
|
execution_partition: str = None,
|
|
@@ -1272,11 +1275,12 @@ class Block(DataIntegrationMixin, SparkBlock):
|
|
|
1272
1275
|
else:
|
|
1273
1276
|
input_vars, kwargs_vars, upstream_block_uuids = self.fetch_input_variables(
|
|
1274
1277
|
input_args,
|
|
1275
|
-
|
|
1276
|
-
global_vars,
|
|
1278
|
+
block_run_outputs_cache=block_run_outputs_cache,
|
|
1277
1279
|
dynamic_block_index=dynamic_block_index,
|
|
1278
1280
|
dynamic_upstream_block_uuids=dynamic_upstream_block_uuids,
|
|
1281
|
+
execution_partition=execution_partition,
|
|
1279
1282
|
from_notebook=from_notebook,
|
|
1283
|
+
global_vars=global_vars,
|
|
1280
1284
|
)
|
|
1281
1285
|
|
|
1282
1286
|
outputs_from_input_vars = {}
|
|
@@ -1535,24 +1539,48 @@ class Block(DataIntegrationMixin, SparkBlock):
|
|
|
1535
1539
|
def fetch_input_variables(
|
|
1536
1540
|
self,
|
|
1537
1541
|
input_args,
|
|
1538
|
-
|
|
1539
|
-
|
|
1542
|
+
block_run_outputs_cache: Dict[str, List] = None,
|
|
1543
|
+
data_integration_settings_mapping: Dict = None,
|
|
1540
1544
|
dynamic_block_index: int = None,
|
|
1541
1545
|
dynamic_upstream_block_uuids: List[str] = None,
|
|
1546
|
+
execution_partition: str = None,
|
|
1542
1547
|
from_notebook: bool = False,
|
|
1548
|
+
global_vars: Dict = None,
|
|
1543
1549
|
upstream_block_uuids: List[str] = None,
|
|
1544
|
-
data_integration_settings_mapping: Dict = None,
|
|
1545
1550
|
) -> Tuple[List, List, List]:
|
|
1551
|
+
"""
|
|
1552
|
+
Fetch input variables for the current block's execution.
|
|
1553
|
+
|
|
1554
|
+
Args:
|
|
1555
|
+
input_args: The input arguments required for the block's execution.
|
|
1556
|
+
block_run_outputs_cache (Optional[Dict[str, List]]): A dictionary mapping block run
|
|
1557
|
+
UUIDs to their outputs.
|
|
1558
|
+
data_integration_settings_mapping (Optional[Dict]): A dictionary containing data
|
|
1559
|
+
integration settings.
|
|
1560
|
+
dynamic_block_index (Optional[int]): The index of the dynamic block, if applicable.
|
|
1561
|
+
dynamic_upstream_block_uuids (Optional[List[str]]): The UUIDs of the dynamic upstream
|
|
1562
|
+
blocks.
|
|
1563
|
+
execution_partition (Optional[str]): The execution partition for the block.
|
|
1564
|
+
from_notebook (Optional[bool]): A boolean indicating whether the execution is
|
|
1565
|
+
triggered from a notebook.
|
|
1566
|
+
global_vars (Optional[Dict]): A dictionary containing global variables.
|
|
1567
|
+
upstream_block_uuids (Optional[List[str]]): List of UUIDs of upstream blocks.
|
|
1568
|
+
|
|
1569
|
+
Returns:
|
|
1570
|
+
Tuple[List, List, List]: A tuple containing the input variables, kwargs variables, and
|
|
1571
|
+
upstream block UUIDs.
|
|
1572
|
+
"""
|
|
1546
1573
|
variables = fetch_input_variables(
|
|
1547
1574
|
self.pipeline,
|
|
1548
1575
|
upstream_block_uuids or self.upstream_block_uuids,
|
|
1549
1576
|
input_args,
|
|
1550
|
-
|
|
1551
|
-
global_vars,
|
|
1552
|
-
dynamic_block_index,
|
|
1553
|
-
dynamic_upstream_block_uuids,
|
|
1554
|
-
from_notebook=from_notebook,
|
|
1577
|
+
block_run_outputs_cache=block_run_outputs_cache,
|
|
1555
1578
|
data_integration_settings_mapping=data_integration_settings_mapping,
|
|
1579
|
+
dynamic_block_index=dynamic_block_index,
|
|
1580
|
+
dynamic_upstream_block_uuids=dynamic_upstream_block_uuids,
|
|
1581
|
+
execution_partition=execution_partition,
|
|
1582
|
+
from_notebook=from_notebook,
|
|
1583
|
+
global_vars=global_vars,
|
|
1556
1584
|
)
|
|
1557
1585
|
|
|
1558
1586
|
return variables
|
|
@@ -2292,6 +2320,7 @@ df = get_variable('{self.pipeline.uuid}', '{block_uuid}', 'df')
|
|
|
2292
2320
|
global_vars: Dict = None,
|
|
2293
2321
|
logger: Logger = None,
|
|
2294
2322
|
logging_tags: Dict = None,
|
|
2323
|
+
outputs: List[Any] = None,
|
|
2295
2324
|
update_tests: bool = True,
|
|
2296
2325
|
dynamic_block_uuid: str = None,
|
|
2297
2326
|
) -> None:
|
|
@@ -2321,12 +2350,13 @@ df = get_variable('{self.pipeline.uuid}', '{block_uuid}', 'df')
|
|
|
2321
2350
|
else:
|
|
2322
2351
|
test_functions = self.test_functions
|
|
2323
2352
|
|
|
2324
|
-
outputs
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2353
|
+
if outputs is None:
|
|
2354
|
+
outputs = self.get_raw_outputs(
|
|
2355
|
+
dynamic_block_uuid or self.uuid,
|
|
2356
|
+
execution_partition=execution_partition,
|
|
2357
|
+
from_notebook=from_notebook,
|
|
2358
|
+
global_vars=global_vars,
|
|
2359
|
+
)
|
|
2330
2360
|
|
|
2331
2361
|
if logger and 'logger' not in global_vars:
|
|
2332
2362
|
global_vars['logger'] = logger
|
|
@@ -3095,8 +3125,8 @@ class ConditionalBlock(AddonBlock):
|
|
|
3095
3125
|
if parent_block is not None:
|
|
3096
3126
|
input_vars, kwargs_vars, _ = parent_block.fetch_input_variables(
|
|
3097
3127
|
None,
|
|
3098
|
-
execution_partition,
|
|
3099
|
-
global_vars,
|
|
3128
|
+
execution_partition=execution_partition,
|
|
3129
|
+
global_vars=global_vars,
|
|
3100
3130
|
dynamic_block_index=dynamic_block_index,
|
|
3101
3131
|
dynamic_upstream_block_uuids=dynamic_upstream_block_uuids,
|
|
3102
3132
|
)
|
|
@@ -3171,11 +3201,11 @@ class CallbackBlock(AddonBlock):
|
|
|
3171
3201
|
# Fetch input variables
|
|
3172
3202
|
input_vars, kwargs_vars, upstream_block_uuids = self.fetch_input_variables(
|
|
3173
3203
|
None,
|
|
3174
|
-
execution_partition,
|
|
3175
|
-
global_vars,
|
|
3176
3204
|
dynamic_block_index=dynamic_block_index,
|
|
3177
3205
|
dynamic_upstream_block_uuids=dynamic_upstream_block_uuids,
|
|
3206
|
+
execution_partition=execution_partition,
|
|
3178
3207
|
from_notebook=from_notebook,
|
|
3208
|
+
global_vars=global_vars,
|
|
3179
3209
|
upstream_block_uuids=[parent_block.uuid] if parent_block else None,
|
|
3180
3210
|
)
|
|
3181
3211
|
|
|
@@ -453,13 +453,13 @@ class DataIntegrationMixin:
|
|
|
453
453
|
# Get the output as inputs for this block
|
|
454
454
|
input_vars_fetched, kwargs_vars, up_block_uuids = self.fetch_input_variables(
|
|
455
455
|
input_vars,
|
|
456
|
-
|
|
457
|
-
global_vars,
|
|
456
|
+
data_integration_settings_mapping=data_integration_settings_mapping,
|
|
458
457
|
dynamic_block_index=dynamic_block_index,
|
|
459
458
|
dynamic_upstream_block_uuids=dynamic_upstream_block_uuids,
|
|
459
|
+
execution_partition=execution_partition,
|
|
460
460
|
from_notebook=from_notebook,
|
|
461
|
+
global_vars=global_vars,
|
|
461
462
|
upstream_block_uuids=block_uuids_to_fetch,
|
|
462
|
-
data_integration_settings_mapping=data_integration_settings_mapping,
|
|
463
463
|
)
|
|
464
464
|
|
|
465
465
|
if block_uuids_to_fetch and is_debug():
|
|
@@ -515,13 +515,13 @@ class DataIntegrationMixin:
|
|
|
515
515
|
kwargs_vars_inner, \
|
|
516
516
|
_up_block_uuids = self.fetch_input_variables(
|
|
517
517
|
None,
|
|
518
|
-
|
|
519
|
-
global_vars,
|
|
518
|
+
data_integration_settings_mapping=data_integration_settings_mapping,
|
|
520
519
|
dynamic_block_index=dynamic_block_index,
|
|
521
520
|
dynamic_upstream_block_uuids=dynamic_upstream_block_uuids,
|
|
521
|
+
execution_partition=execution_partition,
|
|
522
522
|
from_notebook=from_notebook,
|
|
523
|
+
global_vars=global_vars,
|
|
523
524
|
upstream_block_uuids=[up_uuid],
|
|
524
|
-
data_integration_settings_mapping=data_integration_settings_mapping,
|
|
525
525
|
)
|
|
526
526
|
|
|
527
527
|
if input_vars_inner:
|
|
@@ -662,11 +662,11 @@ def convert_block_output_data_for_destination(
|
|
|
662
662
|
input_vars_fetched, _kwargs_vars, upstream_block_uuids = \
|
|
663
663
|
block.fetch_input_variables(
|
|
664
664
|
None,
|
|
665
|
-
partition,
|
|
666
|
-
global_vars,
|
|
667
665
|
dynamic_block_index=dynamic_block_index,
|
|
668
666
|
dynamic_upstream_block_uuids=dynamic_upstream_block_uuids,
|
|
667
|
+
execution_partition=partition,
|
|
669
668
|
from_notebook=from_notebook,
|
|
669
|
+
global_vars=global_vars,
|
|
670
670
|
upstream_block_uuids=[stream],
|
|
671
671
|
)
|
|
672
672
|
|
|
@@ -29,8 +29,8 @@ def create_upstream_block_tables(
|
|
|
29
29
|
|
|
30
30
|
input_vars, kwargs_vars, upstream_block_uuids = block.fetch_input_variables(
|
|
31
31
|
None,
|
|
32
|
-
execution_partition,
|
|
33
|
-
None,
|
|
32
|
+
execution_partition=execution_partition,
|
|
33
|
+
global_vars=None,
|
|
34
34
|
dynamic_block_index=dynamic_block_index,
|
|
35
35
|
dynamic_upstream_block_uuids=dynamic_upstream_block_uuids,
|
|
36
36
|
)
|
|
@@ -35,8 +35,8 @@ def create_upstream_block_tables(
|
|
|
35
35
|
|
|
36
36
|
input_vars, kwargs_vars, upstream_block_uuids = block.fetch_input_variables(
|
|
37
37
|
None,
|
|
38
|
-
execution_partition,
|
|
39
|
-
None,
|
|
38
|
+
execution_partition=execution_partition,
|
|
39
|
+
global_vars=None,
|
|
40
40
|
dynamic_block_index=dynamic_block_index,
|
|
41
41
|
dynamic_upstream_block_uuids=dynamic_upstream_block_uuids,
|
|
42
42
|
)
|
|
@@ -32,8 +32,8 @@ def create_upstream_block_tables(
|
|
|
32
32
|
|
|
33
33
|
input_vars, kwargs_vars, upstream_block_uuids = block.fetch_input_variables(
|
|
34
34
|
None,
|
|
35
|
-
execution_partition,
|
|
36
|
-
None,
|
|
35
|
+
execution_partition=execution_partition,
|
|
36
|
+
global_vars=None,
|
|
37
37
|
dynamic_block_index=dynamic_block_index,
|
|
38
38
|
dynamic_upstream_block_uuids=dynamic_upstream_block_uuids,
|
|
39
39
|
)
|
|
@@ -370,8 +370,8 @@ def create_upstream_block_tables(
|
|
|
370
370
|
|
|
371
371
|
input_vars, kwargs_vars, upstream_block_uuids = block.fetch_input_variables(
|
|
372
372
|
None,
|
|
373
|
-
execution_partition,
|
|
374
|
-
None,
|
|
373
|
+
execution_partition=execution_partition,
|
|
374
|
+
global_vars=None,
|
|
375
375
|
dynamic_block_index=dynamic_block_index,
|
|
376
376
|
dynamic_upstream_block_uuids=dynamic_upstream_block_uuids,
|
|
377
377
|
)
|
|
@@ -647,12 +647,13 @@ def fetch_input_variables(
|
|
|
647
647
|
pipeline,
|
|
648
648
|
upstream_block_uuids: List[str],
|
|
649
649
|
input_args: List[Any],
|
|
650
|
-
|
|
651
|
-
|
|
650
|
+
block_run_outputs_cache: Dict[str, List] = None,
|
|
651
|
+
data_integration_settings_mapping: Dict = None,
|
|
652
652
|
dynamic_block_index: int = None,
|
|
653
653
|
dynamic_upstream_block_uuids: List[str] = None,
|
|
654
|
+
execution_partition: str = None,
|
|
654
655
|
from_notebook: bool = False,
|
|
655
|
-
|
|
656
|
+
global_vars: Dict = None,
|
|
656
657
|
) -> Tuple[List, List, List]:
|
|
657
658
|
"""
|
|
658
659
|
Fetches the input variables for a block.
|
|
@@ -683,6 +684,7 @@ def fetch_input_variables(
|
|
|
683
684
|
upstream_block_uuids_final = upstream_block_uuids
|
|
684
685
|
elif pipeline is not None:
|
|
685
686
|
input_vars = [None for i in range(len(upstream_block_uuids))]
|
|
687
|
+
# A mapping from upstream block UUID to a list of variable names
|
|
686
688
|
input_variables_by_uuid = input_variables(
|
|
687
689
|
pipeline,
|
|
688
690
|
upstream_block_uuids,
|
|
@@ -695,6 +697,7 @@ def fetch_input_variables(
|
|
|
695
697
|
input_args=input_args,
|
|
696
698
|
data_integration_settings_mapping=data_integration_settings_mapping,
|
|
697
699
|
)
|
|
700
|
+
# Block UUIDs
|
|
698
701
|
keys = input_variables_by_uuid.keys()
|
|
699
702
|
reduce_output_indexes = []
|
|
700
703
|
|
|
@@ -708,8 +711,10 @@ def fetch_input_variables(
|
|
|
708
711
|
input_vars[idx] = global_data_product.get_outputs()
|
|
709
712
|
continue
|
|
710
713
|
|
|
714
|
+
# Block output variables for upstream_block_uuid
|
|
711
715
|
variables = input_variables_by_uuid[upstream_block_uuid]
|
|
712
716
|
|
|
717
|
+
# Fetch variable values
|
|
713
718
|
if should_reduce:
|
|
714
719
|
variable_values = [reduce_output_from_block(
|
|
715
720
|
upstream_block,
|
|
@@ -722,19 +727,23 @@ def fetch_input_variables(
|
|
|
722
727
|
spark=spark,
|
|
723
728
|
) for variable_uuid in variables]
|
|
724
729
|
else:
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
730
|
+
# Getting input variables from cache the cache is not empty
|
|
731
|
+
if block_run_outputs_cache:
|
|
732
|
+
variable_values = block_run_outputs_cache.get(upstream_block_uuid, [])
|
|
733
|
+
else:
|
|
734
|
+
variable_values = [
|
|
735
|
+
pipeline.get_block_variable(
|
|
736
|
+
upstream_block_uuid,
|
|
737
|
+
var,
|
|
738
|
+
from_notebook=from_notebook,
|
|
739
|
+
global_vars=global_vars,
|
|
740
|
+
input_args=input_args,
|
|
741
|
+
partition=execution_partition,
|
|
742
|
+
raise_exception=True,
|
|
743
|
+
spark=spark,
|
|
744
|
+
)
|
|
745
|
+
for var in variables
|
|
746
|
+
]
|
|
738
747
|
|
|
739
748
|
upstream_in_dynamic_upstream = False
|
|
740
749
|
if dynamic_upstream_block_uuids:
|
|
@@ -64,6 +64,8 @@ class Pipeline:
|
|
|
64
64
|
def __init__(self, uuid, repo_path=None, config=None, repo_config=None, catalog=None):
|
|
65
65
|
self.block_configs = []
|
|
66
66
|
self.blocks_by_uuid = {}
|
|
67
|
+
# Can only be set True when run_pipeline_in_one_process is True
|
|
68
|
+
self.cache_block_output_in_memory = False
|
|
67
69
|
self.concurrency_config = dict()
|
|
68
70
|
self.created_at = None
|
|
69
71
|
self.data_integration = None
|
|
@@ -507,6 +509,7 @@ class Pipeline:
|
|
|
507
509
|
self.type = config.get('type') or self.type
|
|
508
510
|
|
|
509
511
|
self.block_configs = config.get('blocks') or []
|
|
512
|
+
self.cache_block_output_in_memory = config.get('cache_block_output_in_memory', False)
|
|
510
513
|
self.callback_configs = config.get('callbacks') or []
|
|
511
514
|
self.concurrency_config = config.get('concurrency_config') or dict()
|
|
512
515
|
self.conditional_configs = config.get('conditionals') or []
|
|
@@ -634,6 +637,7 @@ class Pipeline:
|
|
|
634
637
|
updated_at = updated_at.isoformat()
|
|
635
638
|
|
|
636
639
|
base = dict(
|
|
640
|
+
cache_block_output_in_memory=self.cache_block_output_in_memory,
|
|
637
641
|
concurrency_config=self.concurrency_config,
|
|
638
642
|
created_at=self.created_at,
|
|
639
643
|
data_integration=self.data_integration if not exclude_data_integration else None,
|
|
@@ -865,6 +869,7 @@ class Pipeline:
|
|
|
865
869
|
should_update_block_cache = True
|
|
866
870
|
|
|
867
871
|
for key in [
|
|
872
|
+
'cache_block_output_in_memory',
|
|
868
873
|
'data_integration',
|
|
869
874
|
'executor_type',
|
|
870
875
|
'retry_config',
|
mage_ai/io/chroma.py
CHANGED
|
@@ -61,7 +61,6 @@ class Chroma(BaseIO):
|
|
|
61
61
|
DataFrame: Data frame object loaded from the chroma query fuction.
|
|
62
62
|
Chroma query function requries dictionary contains number of results matched.
|
|
63
63
|
"""
|
|
64
|
-
print(f"Testing data: {data}")
|
|
65
64
|
converted_array = []
|
|
66
65
|
if data[column_name] is None:
|
|
67
66
|
for _ in range(item_length):
|
|
@@ -132,6 +131,8 @@ class Chroma(BaseIO):
|
|
|
132
131
|
df: DataFrame,
|
|
133
132
|
document_column: str,
|
|
134
133
|
collection: str = None,
|
|
134
|
+
id_column: str = None,
|
|
135
|
+
metadata_column: str = None,
|
|
135
136
|
**kwargs,
|
|
136
137
|
) -> None:
|
|
137
138
|
"""
|
|
@@ -143,11 +144,19 @@ class Chroma(BaseIO):
|
|
|
143
144
|
df (DataFrame): Data frame to export.
|
|
144
145
|
document_column (str): name of the document.
|
|
145
146
|
"""
|
|
146
|
-
docs = df[
|
|
147
|
-
|
|
147
|
+
docs = df[document_column].tolist()
|
|
148
|
+
if id_column is None:
|
|
149
|
+
ids = [str(x) for x in df.index.tolist()]
|
|
150
|
+
else:
|
|
151
|
+
ids = df[id_column].apply(str).tolist()
|
|
148
152
|
collection_client = self.client.get_or_create_collection(
|
|
149
153
|
name=self.collection if collection is None else collection)
|
|
150
|
-
|
|
154
|
+
insert_kwargs = dict(
|
|
151
155
|
documents=docs,
|
|
152
156
|
ids=ids,
|
|
153
157
|
)
|
|
158
|
+
if metadata_column:
|
|
159
|
+
insert_kwargs['metadatas'] = df[metadata_column].tolist()
|
|
160
|
+
return collection_client.add(
|
|
161
|
+
**insert_kwargs
|
|
162
|
+
)
|
|
@@ -902,6 +902,77 @@ class PipelineRun(BaseModel):
|
|
|
902
902
|
|
|
903
903
|
return executable_block_runs
|
|
904
904
|
|
|
905
|
+
def update_block_run_statuses(self, block_runs: List['BlockRun']) -> None:
|
|
906
|
+
"""Update the statuses of the block runs to CONDITION_FAILED or UPSTREAM_FAILED.
|
|
907
|
+
|
|
908
|
+
This method updates the statuses of the block runs based on the pipeline run's block runs.
|
|
909
|
+
It retrieves the block UUIDs for failed block runs and conditionally failed block runs.
|
|
910
|
+
It maps the block run statuses to their corresponding block UUIDs.
|
|
911
|
+
|
|
912
|
+
The method iterates overthe provided block runs and checks if their dynamic upstream block
|
|
913
|
+
UUIDs or upstream block UUIDs match the failed or conditionally failed block UUIDs.
|
|
914
|
+
* If there is a match, the block run's status is updated accordingly.
|
|
915
|
+
* If no updates are made for a block run, it is added to the list of not updated block runs.
|
|
916
|
+
|
|
917
|
+
The method refreshes the pipeline run and continues iterating through block runs until no
|
|
918
|
+
more updates can be made.
|
|
919
|
+
|
|
920
|
+
Args:
|
|
921
|
+
block_runs (List[BlockRun]): A list of block runs to update.
|
|
922
|
+
|
|
923
|
+
Returns:
|
|
924
|
+
None
|
|
925
|
+
"""
|
|
926
|
+
pipeline = self.pipeline
|
|
927
|
+
|
|
928
|
+
failed_block_uuids = set(
|
|
929
|
+
b.block_uuid for b in self.block_runs
|
|
930
|
+
if b.status in [
|
|
931
|
+
BlockRun.BlockRunStatus.UPSTREAM_FAILED,
|
|
932
|
+
BlockRun.BlockRunStatus.FAILED,
|
|
933
|
+
]
|
|
934
|
+
)
|
|
935
|
+
condition_failed_block_uuids = set(
|
|
936
|
+
b.block_uuid for b in self.block_runs
|
|
937
|
+
if b.status in [
|
|
938
|
+
BlockRun.BlockRunStatus.CONDITION_FAILED,
|
|
939
|
+
]
|
|
940
|
+
)
|
|
941
|
+
|
|
942
|
+
statuses = {
|
|
943
|
+
BlockRun.BlockRunStatus.CONDITION_FAILED: condition_failed_block_uuids,
|
|
944
|
+
BlockRun.BlockRunStatus.UPSTREAM_FAILED: failed_block_uuids,
|
|
945
|
+
}
|
|
946
|
+
not_updated_block_runs = []
|
|
947
|
+
for block_run in block_runs:
|
|
948
|
+
updated_status = False
|
|
949
|
+
dynamic_upstream_block_uuids = block_run.metrics and block_run.metrics.get(
|
|
950
|
+
'dynamic_upstream_block_uuids',
|
|
951
|
+
)
|
|
952
|
+
|
|
953
|
+
for status, block_uuids in statuses.items():
|
|
954
|
+
upstream_block_uuids = []
|
|
955
|
+
if dynamic_upstream_block_uuids:
|
|
956
|
+
upstream_block_uuids = dynamic_upstream_block_uuids
|
|
957
|
+
else:
|
|
958
|
+
block = pipeline.get_block(block_run.block_uuid)
|
|
959
|
+
if block:
|
|
960
|
+
upstream_block_uuids = block.upstream_block_uuids
|
|
961
|
+
if any(
|
|
962
|
+
b in block_uuids
|
|
963
|
+
for b in upstream_block_uuids
|
|
964
|
+
):
|
|
965
|
+
block_run.update(status=status)
|
|
966
|
+
updated_status = True
|
|
967
|
+
|
|
968
|
+
if not updated_status:
|
|
969
|
+
not_updated_block_runs.append(block_run)
|
|
970
|
+
|
|
971
|
+
self.refresh()
|
|
972
|
+
# keep iterating through block runs until no more updates can be made
|
|
973
|
+
if len(block_runs) != len(not_updated_block_runs):
|
|
974
|
+
self.update_block_run_statuses(not_updated_block_runs)
|
|
975
|
+
|
|
905
976
|
@classmethod
|
|
906
977
|
@safe_db_query
|
|
907
978
|
def active_runs_for_pipelines(
|