mage-ai 0.9.69__py3-none-any.whl → 0.9.70__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/policies/BackfillPolicy.py +1 -0
- mage_ai/api/policies/PipelinePolicy.py +1 -0
- mage_ai/api/policies/WorkspacePolicy.py +1 -0
- mage_ai/api/presenters/BackfillPresenter.py +1 -0
- mage_ai/api/resources/GitBranchResource.py +56 -23
- mage_ai/api/resources/GitCustomBranchResource.py +29 -1
- mage_ai/api/resources/OauthResource.py +1 -1
- mage_ai/api/resources/PipelineResource.py +11 -5
- mage_ai/api/resources/PipelineRunResource.py +41 -4
- mage_ai/api/resources/PipelineScheduleResource.py +4 -0
- mage_ai/api/resources/PullRequestResource.py +6 -4
- mage_ai/api/resources/WorkspaceResource.py +5 -4
- mage_ai/cache/block_action_object/__init__.py +1 -1
- mage_ai/cluster_manager/kubernetes/workload_manager.py +52 -1
- mage_ai/cluster_manager/workspace/base.py +6 -0
- mage_ai/cluster_manager/workspace/kubernetes.py +22 -1
- mage_ai/command_center/applications/utils.py +2 -2
- mage_ai/command_center/presenters/text.py +1 -1
- mage_ai/data_preparation/executors/k8s_block_executor.py +30 -7
- mage_ai/data_preparation/executors/k8s_pipeline_executor.py +30 -7
- mage_ai/data_preparation/executors/streaming_pipeline_executor.py +1 -1
- mage_ai/data_preparation/git/__init__.py +50 -22
- mage_ai/data_preparation/git/api.py +62 -7
- mage_ai/data_preparation/git/utils.py +45 -21
- mage_ai/data_preparation/models/block/__init__.py +24 -5
- mage_ai/data_preparation/models/block/dynamic/utils.py +9 -4
- mage_ai/data_preparation/models/block/global_data_product/__init__.py +25 -2
- mage_ai/data_preparation/models/block/remote/__init__.py +0 -0
- mage_ai/data_preparation/models/block/remote/models.py +58 -0
- mage_ai/data_preparation/models/block/utils.py +38 -0
- mage_ai/data_preparation/models/constants.py +2 -0
- mage_ai/data_preparation/models/global_data_product/__init__.py +12 -0
- mage_ai/data_preparation/models/pipeline.py +9 -5
- mage_ai/data_preparation/models/triggers/__init__.py +4 -2
- mage_ai/data_preparation/storage/local_storage.py +12 -6
- mage_ai/orchestration/db/migrations/versions/42a14d6143f1_update_token_column_type.py +54 -0
- mage_ai/orchestration/db/models/oauth.py +10 -9
- mage_ai/orchestration/db/models/schedules.py +21 -0
- mage_ai/orchestration/notification/sender.py +37 -15
- mage_ai/orchestration/pipeline_scheduler_original.py +32 -25
- mage_ai/orchestration/triggers/api.py +29 -1
- mage_ai/orchestration/triggers/global_data_product.py +9 -4
- mage_ai/orchestration/triggers/utils.py +10 -1
- mage_ai/orchestration/utils/resources.py +3 -0
- mage_ai/server/api/downloads.py +4 -1
- mage_ai/server/api/runs.py +151 -0
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +6 -6
- mage_ai/server/frontend_dist/_next/static/{_krrrgup_C-dPOpX36S8I → RhDiJSkcjCsh4xxX4BFBk}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1557-b3502f3f1aa92ac7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{3548-fa0792ddb88f4646.js → 3548-9d26185b3fb663b1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7966-b9b85ba10667e654.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9624-8b8e100079ab69e1.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-2a69553d8c6eeb53.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-4bfc84ff07d7656f.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-3edc6270c5b0e962.js → frontend_dist/_next/static/chunks/pages/pipeline-runs-6d183f91a2ff6668.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-7181b086c93784d2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-38e1fbcfbfc1014e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-b645a6d13ab9fe3a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-eb11c5390c982b49.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-1bdfda8edc9cf4a8.js → triggers-4612d15a65c35912.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-32985f3f7c7dd3ab.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-349af617d05f001b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-60d01d3887e31136.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/triggers-9cba3211434a8966.js → frontend_dist/_next/static/chunks/pages/triggers-a599c6ac89be8c8d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-3433c8b22e8342aa.js +1 -0
- 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 +2 -2
- 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 +2 -2
- mage_ai/server/frontend_dist/platform/global-hooks.html +2 -2
- mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist/settings/platform/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/platform/settings.html +2 -2
- 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 +6 -6
- 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 +6 -6
- mage_ai/server/frontend_dist_base_path_template/_next/static/{KLL5mirre9d7_ZeEpaw3s → TdpLLFome13qvM0gXvpHs}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-b3502f3f1aa92ac7.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{3548-fa0792ddb88f4646.js → 3548-9d26185b3fb663b1.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-b9b85ba10667e654.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-8b8e100079ab69e1.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-2a69553d8c6eeb53.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-4bfc84ff07d7656f.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipeline-runs-3edc6270c5b0e962.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-6d183f91a2ff6668.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-7181b086c93784d2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-38e1fbcfbfc1014e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-b645a6d13ab9fe3a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-eb11c5390c982b49.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-1bdfda8edc9cf4a8.js → triggers-4612d15a65c35912.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-32985f3f7c7dd3ab.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-349af617d05f001b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-60d01d3887e31136.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/triggers-9cba3211434a8966.js → frontend_dist_base_path_template/_next/static/chunks/pages/triggers-a599c6ac89be8c8d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-3433c8b22e8342aa.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 +2 -2
- mage_ai/server/frontend_dist_base_path_template/files.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-hooks.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/files.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/oauth.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/overview.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +2 -2
- 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 +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/sign-in.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/templates.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/terminal.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/test.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/triggers.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/version-control.html +2 -2
- mage_ai/server/scheduler_manager.py +3 -1
- mage_ai/server/server.py +35 -12
- mage_ai/server/utils/output_display.py +2 -2
- mage_ai/services/aws/ecs/ecs.py +1 -0
- mage_ai/services/k8s/config.py +4 -4
- mage_ai/services/k8s/utils.py +97 -0
- mage_ai/shared/parsers.py +6 -1
- mage_ai/tests/api/operations/base/mixins.py +1 -1
- mage_ai/tests/api/resources/test_pipeline_resource.py +2 -2
- mage_ai/tests/authentication/oauth/test_utils.py +1 -1
- mage_ai/tests/data_preparation/models/block/test_global_data_product.py +2 -0
- mage_ai/tests/orchestration/triggers/test_global_data_product.py +138 -136
- mage_ai/tests/server/test_server.py +19 -0
- mage_ai/tests/services/k8s/test_job_manager.py +9 -6
- mage_ai/version_control/branch/utils.py +2 -1
- mage_ai/version_control/models.py +3 -2
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.70.dist-info}/METADATA +2 -2
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.70.dist-info}/RECORD +217 -212
- mage_ai/server/frontend_dist/_next/static/chunks/1557-df144fbd8b2208c3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7966-f07b2913f7326b50.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9624-59b2f803f9c88cd6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-d9c89527266296f7.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-852d403c7bda21b3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-f028ef3880ed856c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-df144fbd8b2208c3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-f07b2913f7326b50.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-59b2f803f9c88cd6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-d9c89527266296f7.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-852d403c7bda21b3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-f028ef3880ed856c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{_krrrgup_C-dPOpX36S8I → RhDiJSkcjCsh4xxX4BFBk}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{KLL5mirre9d7_ZeEpaw3s → TdpLLFome13qvM0gXvpHs}/_ssgManifest.js +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.70.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.70.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.70.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.70.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
from kubernetes import client
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def parse_affinity_config(affinity_config):
|
|
5
|
+
if not affinity_config:
|
|
6
|
+
return None
|
|
7
|
+
|
|
8
|
+
affinity = client.V1Affinity(
|
|
9
|
+
node_affinity=parse_node_affinity(affinity_config.get('nodeAffinity')),
|
|
10
|
+
pod_affinity=parse_pod_affinity(affinity_config.get('podAffinity')),
|
|
11
|
+
pod_anti_affinity=parse_pod_anti_affinity(affinity_config.get('podAntiAffinity'))
|
|
12
|
+
)
|
|
13
|
+
return affinity
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def parse_node_affinity(node_affinity_config):
|
|
17
|
+
if not node_affinity_config:
|
|
18
|
+
return None
|
|
19
|
+
|
|
20
|
+
required_terms = node_affinity_config.get(
|
|
21
|
+
'requiredDuringSchedulingIgnoredDuringExecution', {}).get('nodeSelectorTerms', [])
|
|
22
|
+
node_selector_terms = []
|
|
23
|
+
for term in required_terms:
|
|
24
|
+
match_expressions = [client.V1NodeSelectorRequirement(
|
|
25
|
+
key=expr.get('key'),
|
|
26
|
+
operator=expr.get('operator'),
|
|
27
|
+
values=expr.get('values')
|
|
28
|
+
) for expr in term.get('matchExpressions', [])]
|
|
29
|
+
|
|
30
|
+
node_selector_terms.append(client.V1NodeSelectorTerm(match_expressions=match_expressions))
|
|
31
|
+
|
|
32
|
+
return client.V1NodeAffinity(
|
|
33
|
+
required_during_scheduling_ignored_during_execution=client.V1NodeSelector(
|
|
34
|
+
node_selector_terms=node_selector_terms)
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def parse_pod_affinity(pod_affinity_config):
|
|
39
|
+
if not pod_affinity_config:
|
|
40
|
+
return None
|
|
41
|
+
|
|
42
|
+
required_terms = pod_affinity_config.get('requiredDuringSchedulingIgnoredDuringExecution', [])
|
|
43
|
+
preferred_terms = pod_affinity_config.get('preferredDuringSchedulingIgnoredDuringExecution', [])
|
|
44
|
+
|
|
45
|
+
required_affinity = parse_affinity_term_list(required_terms)
|
|
46
|
+
preferred_affinity = parse_affinity_term_list(preferred_terms)
|
|
47
|
+
|
|
48
|
+
return client.V1PodAffinity(
|
|
49
|
+
required_during_scheduling_ignored_during_execution=required_affinity,
|
|
50
|
+
preferred_during_scheduling_ignored_during_execution=preferred_affinity
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def parse_pod_anti_affinity(pod_anti_affinity_config):
|
|
55
|
+
if not pod_anti_affinity_config:
|
|
56
|
+
return None
|
|
57
|
+
|
|
58
|
+
required_terms = pod_anti_affinity_config.get(
|
|
59
|
+
'requiredDuringSchedulingIgnoredDuringExecution', [])
|
|
60
|
+
preferred_terms = pod_anti_affinity_config.get(
|
|
61
|
+
'preferredDuringSchedulingIgnoredDuringExecution', [])
|
|
62
|
+
|
|
63
|
+
required_affinity = parse_affinity_term_list(required_terms)
|
|
64
|
+
preferred_affinity = parse_affinity_term_list(preferred_terms)
|
|
65
|
+
|
|
66
|
+
return client.V1PodAntiAffinity(
|
|
67
|
+
required_during_scheduling_ignored_during_execution=required_affinity,
|
|
68
|
+
preferred_during_scheduling_ignored_during_execution=preferred_affinity
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def parse_affinity_term_list(term_list):
|
|
73
|
+
if not term_list:
|
|
74
|
+
return None
|
|
75
|
+
|
|
76
|
+
affinity_term_list = []
|
|
77
|
+
for term in term_list:
|
|
78
|
+
label_selector = client.V1LabelSelector(
|
|
79
|
+
match_labels=term.get('labelSelector', {}).get('matchLabels', {}),
|
|
80
|
+
match_expressions=[client.V1LabelSelectorRequirement(
|
|
81
|
+
key=expr.get('key'),
|
|
82
|
+
operator=expr.get('operator'),
|
|
83
|
+
values=expr.get('values')
|
|
84
|
+
) for expr in term.get('labelSelector', {}).get('matchExpressions', [])]
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
topology_key = term.get('topologyKey')
|
|
88
|
+
|
|
89
|
+
affinity_term_list.append(client.V1WeightedPodAffinityTerm(
|
|
90
|
+
weight=term.get('weight'),
|
|
91
|
+
pod_affinity_term=client.V1PodAffinityTerm(
|
|
92
|
+
label_selector=label_selector,
|
|
93
|
+
topology_key=topology_key
|
|
94
|
+
)
|
|
95
|
+
))
|
|
96
|
+
|
|
97
|
+
return affinity_term_list
|
mage_ai/shared/parsers.py
CHANGED
|
@@ -25,11 +25,13 @@ MAX_ITEMS_IN_SAMPLE_OUTPUT = 20
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
def encode_complex(obj):
|
|
28
|
+
from mage_ai.shared.models import BaseDataClass
|
|
29
|
+
|
|
28
30
|
if isinstance(obj, set):
|
|
29
31
|
return list(obj)
|
|
30
32
|
elif isinstance(obj, BaseModel):
|
|
31
33
|
return obj.__class__.__name__
|
|
32
|
-
elif obj.__class__.__name__ == 'BaseDataClass':
|
|
34
|
+
elif obj.__class__.__name__ == 'BaseDataClass' or isinstance(obj, BaseDataClass):
|
|
33
35
|
return obj.to_dict()
|
|
34
36
|
elif isinstance(obj, Enum):
|
|
35
37
|
return obj.value
|
|
@@ -59,6 +61,9 @@ def encode_complex(obj):
|
|
|
59
61
|
return obj.to_dict(orient='records')
|
|
60
62
|
elif isinstance(obj, pd.Series):
|
|
61
63
|
return obj.to_list()
|
|
64
|
+
# Convert pandas._libs.missing.NAType to None
|
|
65
|
+
elif isinstance(obj, pd._libs.missing.NAType):
|
|
66
|
+
return None
|
|
62
67
|
|
|
63
68
|
return obj
|
|
64
69
|
|
|
@@ -129,7 +129,7 @@ class PipelineResourceTest(BaseApiTestCase):
|
|
|
129
129
|
)
|
|
130
130
|
|
|
131
131
|
mock_get_async.assert_has_calls(
|
|
132
|
-
[call.get_async(uuid) for uuid in [
|
|
132
|
+
[call.get_async(uuid, repo_path=self.repo_path) for uuid in [
|
|
133
133
|
self.pipeline1.uuid,
|
|
134
134
|
self.pipeline2.uuid,
|
|
135
135
|
self.pipeline3.uuid,
|
|
@@ -172,7 +172,7 @@ class PipelineResourceTest(BaseApiTestCase):
|
|
|
172
172
|
)
|
|
173
173
|
|
|
174
174
|
mock_get_async.assert_has_calls(
|
|
175
|
-
[call.get_async(uuid) for uuid in [
|
|
175
|
+
[call.get_async(uuid, repo_path=self.repo_path) for uuid in [
|
|
176
176
|
self.pipeline3.uuid,
|
|
177
177
|
]],
|
|
178
178
|
any_order=True,
|
|
@@ -10,7 +10,7 @@ from mage_ai.authentication.oauth.utils import (
|
|
|
10
10
|
access_tokens_for_client,
|
|
11
11
|
refresh_token_for_client,
|
|
12
12
|
)
|
|
13
|
-
from mage_ai.data_preparation.git.
|
|
13
|
+
from mage_ai.data_preparation.git.utils import get_oauth_client_id
|
|
14
14
|
from mage_ai.orchestration.db.models.oauth import Oauth2AccessToken, Oauth2Application
|
|
15
15
|
from mage_ai.tests.base_test import AsyncDBTestCase
|
|
16
16
|
from mage_ai.tests.factory import create_user
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from datetime import datetime, timedelta, timezone
|
|
3
|
-
from unittest.mock import patch
|
|
4
3
|
|
|
5
4
|
from freezegun import freeze_time
|
|
6
5
|
|
|
@@ -9,13 +8,16 @@ from mage_ai.data_preparation.models.constants import BlockType
|
|
|
9
8
|
from mage_ai.data_preparation.models.global_data_product import GlobalDataProduct
|
|
10
9
|
from mage_ai.data_preparation.models.pipeline import Pipeline
|
|
11
10
|
from mage_ai.orchestration.db.models.schedules import PipelineRun, PipelineSchedule
|
|
12
|
-
|
|
11
|
+
|
|
12
|
+
# from mage_ai.orchestration.pipeline_scheduler import PipelineScheduler, schedule_all
|
|
13
13
|
from mage_ai.orchestration.triggers.global_data_product import (
|
|
14
14
|
fetch_or_create_pipeline_schedule,
|
|
15
15
|
trigger_and_check_status,
|
|
16
16
|
)
|
|
17
17
|
from mage_ai.tests.base_test import DBTestCase
|
|
18
18
|
|
|
19
|
+
# from unittest.mock import patch
|
|
20
|
+
|
|
19
21
|
|
|
20
22
|
class TriggerGlobalDataProductTest(DBTestCase):
|
|
21
23
|
def setUp(self):
|
|
@@ -204,140 +206,140 @@ class TriggerGlobalDataProductTest(DBTestCase):
|
|
|
204
206
|
count,
|
|
205
207
|
)
|
|
206
208
|
|
|
207
|
-
def test_trigger_and_check_status_when_there_are_more_running(self):
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
def test_trigger_and_check_status_should_create_new_pipeline_run(self):
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
def test_trigger_and_check_status_with_schedule_all(self):
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
209
|
+
# def test_trigger_and_check_status_when_there_are_more_running(self):
|
|
210
|
+
# now = datetime.utcnow().replace(tzinfo=timezone.utc)
|
|
211
|
+
|
|
212
|
+
# pipeline_schedule = fetch_or_create_pipeline_schedule(self.global_data_product)
|
|
213
|
+
# pipeline_run1 = PipelineRun.create(
|
|
214
|
+
# execution_date=now - timedelta(seconds=11),
|
|
215
|
+
# pipeline_schedule_id=pipeline_schedule.id,
|
|
216
|
+
# pipeline_uuid=self.global_data_product.pipeline.uuid,
|
|
217
|
+
# status=PipelineRun.PipelineRunStatus.RUNNING,
|
|
218
|
+
# )
|
|
219
|
+
# pipeline_run2 = PipelineRun.create(
|
|
220
|
+
# execution_date=now - timedelta(seconds=6),
|
|
221
|
+
# pipeline_schedule_id=pipeline_schedule.id,
|
|
222
|
+
# pipeline_uuid=self.global_data_product.pipeline.uuid,
|
|
223
|
+
# status=PipelineRun.PipelineRunStatus.RUNNING,
|
|
224
|
+
# )
|
|
225
|
+
# pipeline_run3 = PipelineRun.create(
|
|
226
|
+
# execution_date=now - timedelta(seconds=5),
|
|
227
|
+
# pipeline_schedule_id=pipeline_schedule.id,
|
|
228
|
+
# pipeline_uuid=self.global_data_product.pipeline.uuid,
|
|
229
|
+
# status=PipelineRun.PipelineRunStatus.RUNNING,
|
|
230
|
+
# )
|
|
231
|
+
# pipeline_run3_id = pipeline_run3.id
|
|
232
|
+
# pipeline_run4 = PipelineRun.create(
|
|
233
|
+
# execution_date=now - timedelta(seconds=0),
|
|
234
|
+
# pipeline_schedule_id=pipeline_schedule.id,
|
|
235
|
+
# pipeline_uuid=self.global_data_product.pipeline.uuid,
|
|
236
|
+
# status=PipelineRun.PipelineRunStatus.RUNNING,
|
|
237
|
+
# )
|
|
238
|
+
|
|
239
|
+
# count = PipelineRun.query.filter(
|
|
240
|
+
# PipelineRun.pipeline_schedule_id == pipeline_schedule.id,
|
|
241
|
+
# ).count()
|
|
242
|
+
|
|
243
|
+
# self.global_data_product.outdated_after = dict(seconds=5)
|
|
244
|
+
# self.global_data_product.outdated_starting_at = {}
|
|
245
|
+
|
|
246
|
+
# try:
|
|
247
|
+
# trigger_and_check_status(
|
|
248
|
+
# self.global_data_product,
|
|
249
|
+
# error_on_failure=False,
|
|
250
|
+
# poll_interval=1,
|
|
251
|
+
# poll_timeout=2,
|
|
252
|
+
# should_schedule=False,
|
|
253
|
+
# )
|
|
254
|
+
# except Exception:
|
|
255
|
+
# pass
|
|
256
|
+
|
|
257
|
+
# self.assertEqual(
|
|
258
|
+
# PipelineRun.query.filter(
|
|
259
|
+
# PipelineRun.pipeline_schedule_id == pipeline_schedule.id,
|
|
260
|
+
# ).count(),
|
|
261
|
+
# count - 1,
|
|
262
|
+
# )
|
|
263
|
+
|
|
264
|
+
# self.assertEqual(PipelineRun.query.filter(PipelineRun.id == pipeline_run1.id).count(), 1)
|
|
265
|
+
# self.assertEqual(PipelineRun.query.filter(PipelineRun.id == pipeline_run2.id).count(), 1)
|
|
266
|
+
# self.assertEqual(PipelineRun.query.filter(PipelineRun.id == pipeline_run3_id).count(), 0)
|
|
267
|
+
# self.assertEqual(PipelineRun.query.filter(PipelineRun.id == pipeline_run4.id).count(), 1)
|
|
268
|
+
|
|
269
|
+
# def test_trigger_and_check_status_should_create_new_pipeline_run(self):
|
|
270
|
+
# now = datetime.utcnow().replace(tzinfo=timezone.utc)
|
|
271
|
+
# pipeline_schedule = fetch_or_create_pipeline_schedule(self.global_data_product)
|
|
272
|
+
# PipelineRun.create(
|
|
273
|
+
# execution_date=now - timedelta(seconds=2),
|
|
274
|
+
# pipeline_schedule_id=pipeline_schedule.id,
|
|
275
|
+
# pipeline_uuid=self.global_data_product.pipeline.uuid,
|
|
276
|
+
# status=PipelineRun.PipelineRunStatus.COMPLETED,
|
|
277
|
+
# )
|
|
278
|
+
|
|
279
|
+
# count = PipelineRun.query.filter(
|
|
280
|
+
# PipelineRun.pipeline_schedule_id == pipeline_schedule.id,
|
|
281
|
+
# ).count()
|
|
282
|
+
|
|
283
|
+
# self.global_data_product.outdated_after = dict(seconds=2)
|
|
284
|
+
# self.global_data_product.outdated_starting_at = {}
|
|
285
|
+
|
|
286
|
+
# try:
|
|
287
|
+
# trigger_and_check_status(
|
|
288
|
+
# self.global_data_product,
|
|
289
|
+
# error_on_failure=False,
|
|
290
|
+
# poll_interval=1,
|
|
291
|
+
# poll_timeout=2,
|
|
292
|
+
# should_schedule=False,
|
|
293
|
+
# )
|
|
294
|
+
# except Exception:
|
|
295
|
+
# pass
|
|
296
|
+
|
|
297
|
+
# self.assertEqual(
|
|
298
|
+
# PipelineRun.query.filter(
|
|
299
|
+
# PipelineRun.pipeline_schedule_id == pipeline_schedule.id,
|
|
300
|
+
# ).count(),
|
|
301
|
+
# count + 1,
|
|
302
|
+
# )
|
|
303
|
+
|
|
304
|
+
# def test_trigger_and_check_status_with_schedule_all(self):
|
|
305
|
+
# pipeline_schedule = fetch_or_create_pipeline_schedule(self.global_data_product)
|
|
306
|
+
|
|
307
|
+
# count = PipelineRun.query.filter(
|
|
308
|
+
# PipelineRun.pipeline_schedule_id == pipeline_schedule.id,
|
|
309
|
+
# ).count()
|
|
310
|
+
|
|
311
|
+
# self.global_data_product.outdated_after = dict(seconds=2)
|
|
312
|
+
# self.global_data_product.outdated_starting_at = {}
|
|
313
|
+
|
|
314
|
+
# trigger_and_check_status(
|
|
315
|
+
# self.global_data_product,
|
|
316
|
+
# check_status=False,
|
|
317
|
+
# error_on_failure=False,
|
|
318
|
+
# poll_interval=1,
|
|
319
|
+
# poll_timeout=2,
|
|
320
|
+
# should_schedule=False,
|
|
321
|
+
# )
|
|
322
|
+
|
|
323
|
+
# with patch.object(PipelineScheduler, 'schedule') as _:
|
|
324
|
+
# schedule_all()
|
|
325
|
+
|
|
326
|
+
# pipeline_runs = PipelineRun.query.filter(
|
|
327
|
+
# PipelineRun.pipeline_schedule_id == pipeline_schedule.id,
|
|
328
|
+
# ).all()
|
|
329
|
+
|
|
330
|
+
# pipeline_runs.sort(key=lambda pr: pr.execution_date)
|
|
331
|
+
# pipeline_run = pipeline_runs[-1]
|
|
332
|
+
|
|
333
|
+
# self.assertEqual(
|
|
334
|
+
# pipeline_run.status,
|
|
335
|
+
# PipelineRun.PipelineRunStatus.RUNNING,
|
|
336
|
+
# )
|
|
337
|
+
# self.assertEqual(
|
|
338
|
+
# PipelineRun.query.filter(
|
|
339
|
+
# PipelineRun.pipeline_schedule_id == pipeline_schedule.id,
|
|
340
|
+
# ).count(),
|
|
341
|
+
# count + 1,
|
|
342
|
+
# )
|
|
341
343
|
|
|
342
344
|
def test_fetch_or_create_pipeline_schedule(self):
|
|
343
345
|
self.assertEqual(PipelineSchedule.query.filter(
|
|
@@ -178,3 +178,22 @@ class ServerTests(AsyncDBTestCase):
|
|
|
178
178
|
|
|
179
179
|
owner_user = User.query.filter(User.email == 'admin@admin.com').one_or_none()
|
|
180
180
|
self.assertIsNotNone(owner_user)
|
|
181
|
+
|
|
182
|
+
def test_initialize_user_authentication_subproject_admin_exists(self):
|
|
183
|
+
password_salt = generate_salt()
|
|
184
|
+
owner_role = Role.get_role(Role.DefaultRole.OWNER)
|
|
185
|
+
User.create(
|
|
186
|
+
email='admin@admin.com',
|
|
187
|
+
password_hash=create_bcrypt_hash('admin', password_salt),
|
|
188
|
+
password_salt=password_salt,
|
|
189
|
+
username='admin',
|
|
190
|
+
)
|
|
191
|
+
initialize_user_authentication(ProjectType.SUB)
|
|
192
|
+
|
|
193
|
+
project_uuid = get_project_uuid()
|
|
194
|
+
project_uuid_truncated = project_uuid[:8]
|
|
195
|
+
owner_role = Role.get_role(f'{Role.DefaultRole.OWNER}_{project_uuid_truncated}')
|
|
196
|
+
self.assertTrue(len(owner_role.users) == 0)
|
|
197
|
+
|
|
198
|
+
owner_user = User.query.filter(User.email == 'admin@admin.com').one_or_none()
|
|
199
|
+
self.assertIsNotNone(owner_user)
|
|
@@ -7,6 +7,10 @@ from kubernetes.client import (
|
|
|
7
7
|
V1Container,
|
|
8
8
|
V1EnvFromSource,
|
|
9
9
|
V1EnvVar,
|
|
10
|
+
V1NodeAffinity,
|
|
11
|
+
V1NodeSelector,
|
|
12
|
+
V1NodeSelectorRequirement,
|
|
13
|
+
V1NodeSelectorTerm,
|
|
10
14
|
V1Pod,
|
|
11
15
|
V1PodSpec,
|
|
12
16
|
V1SecretEnvSource,
|
|
@@ -377,13 +381,12 @@ class JobManagerTests(TestCase):
|
|
|
377
381
|
|
|
378
382
|
# Pod
|
|
379
383
|
self.assertEqual(job.spec.template.spec.affinity, V1Affinity(
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
required_during_scheduling_ignored_during_execution=dict(
|
|
384
|
+
node_affinity=V1NodeAffinity(
|
|
385
|
+
required_during_scheduling_ignored_during_execution=V1NodeSelector(
|
|
383
386
|
node_selector_terms=[
|
|
384
|
-
|
|
387
|
+
V1NodeSelectorTerm(
|
|
385
388
|
match_expressions=[
|
|
386
|
-
|
|
389
|
+
V1NodeSelectorRequirement(
|
|
387
390
|
key='kubernetes.io/os',
|
|
388
391
|
operator='In',
|
|
389
392
|
values=['linux']
|
|
@@ -394,7 +397,7 @@ class JobManagerTests(TestCase):
|
|
|
394
397
|
)
|
|
395
398
|
)
|
|
396
399
|
)
|
|
397
|
-
)
|
|
400
|
+
)
|
|
398
401
|
|
|
399
402
|
self.assertEqual(job.spec.template.spec.service_account_name, 'secretaccount')
|
|
400
403
|
self.assertEqual(job.spec.template.spec.image_pull_secrets,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
from typing import List
|
|
2
2
|
|
|
3
|
-
from mage_ai.data_preparation.git.api import push_raw
|
|
4
3
|
from mage_ai.shared.strings import capitalize_remove_underscore_lower
|
|
5
4
|
|
|
6
5
|
|
|
7
6
|
async def push(branch) -> List[str]:
|
|
8
7
|
from git.exc import GitCommandError
|
|
9
8
|
|
|
9
|
+
from mage_ai.data_preparation.git.api import push_raw
|
|
10
|
+
|
|
10
11
|
project = branch.project
|
|
11
12
|
user = project.user
|
|
12
13
|
provider = user.provider
|
|
@@ -10,11 +10,12 @@ from dataclasses import dataclass, field
|
|
|
10
10
|
from typing import Any, Callable, Dict, List
|
|
11
11
|
|
|
12
12
|
from mage_ai.authentication.oauth.constants import ProviderName
|
|
13
|
-
from mage_ai.data_preparation.git.api import
|
|
13
|
+
from mage_ai.data_preparation.git.api import get_user
|
|
14
14
|
from mage_ai.data_preparation.git.utils import (
|
|
15
15
|
execute_on_remote_branch,
|
|
16
16
|
get_access_token,
|
|
17
17
|
get_auth_type_from_url,
|
|
18
|
+
get_oauth_access_token_for_user,
|
|
18
19
|
get_provider_from_remote_url,
|
|
19
20
|
)
|
|
20
21
|
from mage_ai.data_preparation.preferences import Preferences, get_preferences
|
|
@@ -544,7 +545,7 @@ class ProjectUser(BaseVersionControl):
|
|
|
544
545
|
@property
|
|
545
546
|
def access_token(self) -> str:
|
|
546
547
|
if self.user and self.provider:
|
|
547
|
-
access_token =
|
|
548
|
+
access_token = get_oauth_access_token_for_user(self.user, provider=self.provider.name)
|
|
548
549
|
if access_token:
|
|
549
550
|
return access_token.token
|
|
550
551
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mage-ai
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.70
|
|
4
4
|
Summary: Mage is a tool for building and deploying data pipelines.
|
|
5
5
|
Home-page: https://github.com/mage-ai/mage-ai
|
|
6
6
|
Author: Mage
|
|
@@ -31,7 +31,7 @@ Requires-Dist: ipykernel ==6.15.0
|
|
|
31
31
|
Requires-Dist: ipython ==8.10.0
|
|
32
32
|
Requires-Dist: itsdangerous ~=1.1.0
|
|
33
33
|
Requires-Dist: joblib >=1.1.0
|
|
34
|
-
Requires-Dist: jupyter-server-proxy ==3.2.
|
|
34
|
+
Requires-Dist: jupyter-server-proxy ==3.2.3
|
|
35
35
|
Requires-Dist: jupyter-server ==1.23.5
|
|
36
36
|
Requires-Dist: jupyter-client ==7.4.4
|
|
37
37
|
Requires-Dist: ldap3 ==2.9.1
|