mage-ai 0.9.67__py3-none-any.whl → 0.9.69__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/monitors/BaseMonitor.py +1 -2
- mage_ai/api/policies/PipelinePolicy.py +2 -0
- mage_ai/api/resources/BlockLayoutItemResource.py +2 -2
- mage_ai/api/resources/BlockResource.py +4 -3
- mage_ai/api/resources/CacheItemResource.py +1 -1
- mage_ai/api/resources/GitBranchResource.py +3 -5
- mage_ai/api/resources/PageBlockLayoutResource.py +2 -2
- mage_ai/api/resources/PipelineResource.py +13 -0
- mage_ai/api/resources/PipelineRunResource.py +10 -1
- mage_ai/api/resources/SeedResource.py +2 -1
- mage_ai/api/resources/SessionResource.py +13 -1
- mage_ai/authentication/permissions/constants.py +2 -0
- mage_ai/authentication/permissions/seed.py +32 -21
- mage_ai/authentication/providers/active_directory.py +4 -3
- mage_ai/authentication/providers/okta.py +22 -83
- mage_ai/cache/tag.py +3 -0
- mage_ai/cluster_manager/manage.py +4 -1
- mage_ai/data_preparation/executors/k8s_block_executor.py +8 -1
- mage_ai/data_preparation/executors/k8s_pipeline_executor.py +12 -1
- mage_ai/data_preparation/executors/streaming_pipeline_executor.py +77 -7
- mage_ai/data_preparation/logging/gcs_logger_manager.py +7 -4
- mage_ai/data_preparation/models/block/__init__.py +28 -71
- mage_ai/data_preparation/models/block/block_factory.py +77 -0
- mage_ai/data_preparation/models/block/data_integration/mixins.py +16 -5
- mage_ai/data_preparation/models/block/dbt/block.py +5 -7
- mage_ai/data_preparation/models/block/dynamic/child.py +3 -0
- mage_ai/data_preparation/models/block/dynamic/variables.py +2 -2
- mage_ai/data_preparation/models/block/extension/utils.py +1 -0
- mage_ai/data_preparation/models/block/global_data_product/__init__.py +9 -3
- mage_ai/data_preparation/models/block/integration/__init__.py +13 -9
- mage_ai/data_preparation/models/block/platform/mixins.py +1 -1
- mage_ai/data_preparation/models/block/sql/__init__.py +1 -1
- mage_ai/data_preparation/models/pipeline.py +102 -19
- mage_ai/data_preparation/models/utils.py +6 -0
- mage_ai/data_preparation/models/variable.py +18 -4
- mage_ai/data_preparation/repo_manager.py +3 -2
- mage_ai/data_preparation/shared/utils.py +1 -1
- mage_ai/data_preparation/storage/gcs_storage.py +1 -1
- mage_ai/data_preparation/templates/constants.py +7 -0
- mage_ai/data_preparation/templates/data_exporters/mysql.py +2 -2
- mage_ai/data_preparation/templates/data_exporters/oracledb.py +27 -0
- mage_ai/data_preparation/templates/repo/metadata.yaml +1 -0
- mage_ai/io/bigquery.py +131 -58
- mage_ai/io/export_utils.py +3 -0
- mage_ai/io/mysql.py +38 -6
- mage_ai/io/oracledb.py +138 -3
- mage_ai/io/snowflake.py +152 -29
- mage_ai/io/sql.py +4 -0
- mage_ai/orchestration/db/__init__.py +2 -2
- mage_ai/orchestration/db/models/oauth.py +4 -4
- mage_ai/orchestration/db/models/schedules.py +10 -3
- mage_ai/orchestration/job_manager.py +6 -0
- mage_ai/orchestration/notification/sender.py +8 -0
- mage_ai/orchestration/pipeline_scheduler_original.py +26 -7
- mage_ai/orchestration/queue/celery_queue.py +8 -1
- mage_ai/orchestration/queue/process_queue.py +67 -4
- mage_ai/orchestration/queue/queue.py +8 -0
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/{frontend_dist_base_path_template/_next/static/khKiaJtwrslgMmp4YSa1f → frontend_dist/_next/static/_krrrgup_C-dPOpX36S8I}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1557-df144fbd8b2208c3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2717-d9200be634dd6766.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3548-fa0792ddb88f4646.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/4241-ccd0126f5750cc35.js → frontend_dist/_next/static/chunks/4241-4499461184ba0d23.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5627-237a3de578538022.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5699-6d708c6b2153ea08.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7361-8a23dd8360593e7a.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/7966-5c1786fb7e7a48f5.js → frontend_dist/_next/static/chunks/7966-f07b2913f7326b50.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-d9c89527266296f7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/index-4e12783b064c1cfe.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-8bbfa0c19b5e4cb3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-852d403c7bda21b3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-597b74828bf105db.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipeline-runs-a66b4c7641ae03eb.js → pipeline-runs-3edc6270c5b0e962.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-90abafc7ed61c582.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-1bdfda8edc9cf4a8.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-3591d035bb3bb2b8.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-79a4cf66a623e667.js → frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-86814e581acaf5db.js → users-a4db8710f703c729.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-7d38b2f7c3e918a1.js → frontend_dist/_next/static/chunks/pages/sign-in-09414a8b66fb6f06.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-9cba3211434a8966.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 +3 -3
- mage_ai/server/frontend_dist/overview.html +2 -2
- mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist/pipelines.html +2 -2
- mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +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 +5 -5
- 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 +2 -2
- mage_ai/server/{frontend_dist/_next/static/vPsMu6Fi2zrHaf2fRXKRO → frontend_dist_base_path_template/_next/static/KLL5mirre9d7_ZeEpaw3s}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-df144fbd8b2208c3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-d9200be634dd6766.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-fa0792ddb88f4646.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/4241-ccd0126f5750cc35.js → frontend_dist_base_path_template/_next/static/chunks/4241-4499461184ba0d23.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5627-237a3de578538022.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-6d708c6b2153ea08.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-8a23dd8360593e7a.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/7966-5c1786fb7e7a48f5.js → frontend_dist_base_path_template/_next/static/chunks/7966-f07b2913f7326b50.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-d9c89527266296f7.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-4e12783b064c1cfe.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-8bbfa0c19b5e4cb3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-852d403c7bda21b3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-597b74828bf105db.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{pipeline-runs-a66b4c7641ae03eb.js → pipeline-runs-3edc6270c5b0e962.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-90abafc7ed61c582.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-1bdfda8edc9cf4a8.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-3591d035bb3bb2b8.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-79a4cf66a623e667.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-86814e581acaf5db.js → users-a4db8710f703c729.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/sign-in-7d38b2f7c3e918a1.js → frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-09414a8b66fb6f06.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-9cba3211434a8966.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 +3 -3
- 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 +5 -5
- 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 +7 -0
- mage_ai/server/server.py +12 -5
- mage_ai/server/websocket_server.py +1 -0
- mage_ai/services/k8s/job_manager.py +8 -0
- mage_ai/services/slack/slack.py +10 -1
- mage_ai/services/spark/spark.py +9 -2
- mage_ai/settings/backends.py +8 -8
- mage_ai/settings/keys/auth.py +2 -0
- mage_ai/settings/models/configuration_option.py +10 -9
- mage_ai/settings/server.py +1 -1
- mage_ai/shared/files.py +19 -1
- mage_ai/shared/path_fixer.py +3 -0
- mage_ai/streaming/sources/base.py +5 -0
- mage_ai/streaming/sources/influxdb.py +2 -0
- mage_ai/streaming/sources/kafka.py +2 -1
- mage_ai/streaming/sources/mongodb.py +4 -0
- mage_ai/tests/api/endpoints/mixins.py +10 -9
- mage_ai/tests/api/endpoints/test_seeds.py +24 -0
- mage_ai/tests/api/operations/test_sessions.py +53 -2
- mage_ai/tests/authentication/providers/test_okta.py +43 -0
- mage_ai/tests/data_preparation/models/block/dbt/test_block.py +2 -2
- mage_ai/tests/data_preparation/models/block/dbt/test_block_sql.py +1 -1
- mage_ai/tests/data_preparation/models/block/dbt/test_block_yaml.py +1 -1
- mage_ai/tests/data_preparation/models/test_block.py +2 -1
- mage_ai/tests/orchestration/db/models/test_oauth.py +3 -3
- mage_ai/tests/orchestration/queue/test_process_queue.py +1 -0
- mage_ai/tests/orchestration/test_pipeline_scheduler.py +2 -0
- mage_ai/tests/server/test_server.py +8 -4
- mage_ai/tests/settings/models/test_configuration_option.py +2 -2
- {mage_ai-0.9.67.dist-info → mage_ai-0.9.69.dist-info}/METADATA +6 -6
- {mage_ai-0.9.67.dist-info → mage_ai-0.9.69.dist-info}/RECORD +263 -259
- mage_ai/server/frontend_dist/_next/static/chunks/1557-01f0843dc6ac4971.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/181-e61915415a976861.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2717-b5f9575799b594d5.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3548-13563a1ff815f922.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5699-6efc749f2f8ddd20.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7361-18d9d8be96e1ce97.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-1c1ffd928f5a00f7.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/index-b7b8695a7f9efde2.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-d3a5fd3119fdb1e4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-42789d698d28a92f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-d05040edba41b2ac.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-aaf393c86fc1bda3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-36377e679da2cd91.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1b688d61f8efe07a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-ed3331d22d5cff7d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-d94e48bad89ba1e0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-f508c2f261297724.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-f99e99aa8f45529c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-6826000cdffc36b8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/settings-74d76300942dcee8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-dde29a463495cebb.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-ab98a7b3a678669e.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-01f0843dc6ac4971.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/181-e61915415a976861.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-b5f9575799b594d5.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-13563a1ff815f922.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-6efc749f2f8ddd20.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-18d9d8be96e1ce97.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-1c1ffd928f5a00f7.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-b7b8695a7f9efde2.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-d3a5fd3119fdb1e4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-42789d698d28a92f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-d05040edba41b2ac.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-aaf393c86fc1bda3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-36377e679da2cd91.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1b688d61f8efe07a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-ed3331d22d5cff7d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-d94e48bad89ba1e0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-f508c2f261297724.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-f99e99aa8f45529c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-6826000cdffc36b8.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-74d76300942dcee8.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-dde29a463495cebb.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-ab98a7b3a678669e.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{vPsMu6Fi2zrHaf2fRXKRO → _krrrgup_C-dPOpX36S8I}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{khKiaJtwrslgMmp4YSa1f → KLL5mirre9d7_ZeEpaw3s}/_ssgManifest.js +0 -0
- {mage_ai-0.9.67.dist-info → mage_ai-0.9.69.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.67.dist-info → mage_ai-0.9.69.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.67.dist-info → mage_ai-0.9.69.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.67.dist-info → mage_ai-0.9.69.dist-info}/top_level.txt +0 -0
mage_ai/shared/files.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import glob
|
|
2
2
|
import os
|
|
3
3
|
from pathlib import Path
|
|
4
|
-
from typing import Callable, List, Tuple
|
|
4
|
+
from typing import Callable, Dict, List, Tuple
|
|
5
5
|
|
|
6
6
|
import aiofiles
|
|
7
7
|
|
|
@@ -63,6 +63,24 @@ def get_full_file_paths_containing_item(root_full_path: str, comparator: Callabl
|
|
|
63
63
|
return configfiles
|
|
64
64
|
|
|
65
65
|
|
|
66
|
+
def get_full_file_paths_containing_multi_items(
|
|
67
|
+
root_full_path: str,
|
|
68
|
+
comparators: Dict[str, Callable],
|
|
69
|
+
exclude_hidden_dir: bool = False,
|
|
70
|
+
) -> Dict[str, List]:
|
|
71
|
+
configfiles = dict()
|
|
72
|
+
for key, _ in comparators.items():
|
|
73
|
+
configfiles[key] = []
|
|
74
|
+
for dirpath, dirnames, files in os.walk(root_full_path):
|
|
75
|
+
if exclude_hidden_dir:
|
|
76
|
+
dirnames[:] = [d for d in dirnames if not d.startswith('.')]
|
|
77
|
+
for f in files:
|
|
78
|
+
for key, comparator in comparators.items():
|
|
79
|
+
if comparator(f):
|
|
80
|
+
configfiles[key].append(os.path.join(dirpath, f))
|
|
81
|
+
return configfiles
|
|
82
|
+
|
|
83
|
+
|
|
66
84
|
def find_directory(top_level_path: str, comparator: Callable) -> str:
|
|
67
85
|
for path, _subdirs, files in os.walk(top_level_path):
|
|
68
86
|
for name in files:
|
mage_ai/shared/path_fixer.py
CHANGED
|
@@ -29,6 +29,9 @@ def add_absolute_path(file_path: str, add_base_repo_path: bool = True) -> str:
|
|
|
29
29
|
full_path = os.path.join(repo_path, parts[0])
|
|
30
30
|
if os.path.exists(full_path):
|
|
31
31
|
full_path = os.path.join(repo_path, file_path)
|
|
32
|
+
elif os.path.exists(os.path.join(repo_path, 'dbt', parts[0])):
|
|
33
|
+
# DBT v1 paths
|
|
34
|
+
full_path = os.path.join(repo_path, 'dbt', file_path)
|
|
32
35
|
else:
|
|
33
36
|
full_path = find_directory(repo_path, lambda x: x.endswith(file_path))
|
|
34
37
|
|
|
@@ -3,6 +3,8 @@ from abc import ABC, abstractmethod
|
|
|
3
3
|
from enum import Enum
|
|
4
4
|
from typing import Callable, Dict
|
|
5
5
|
|
|
6
|
+
from mage_ai.shared.environments import is_test
|
|
7
|
+
|
|
6
8
|
|
|
7
9
|
class SourceConsumeMethod(str, Enum):
|
|
8
10
|
BATCH_READ = 'BATCH_READ'
|
|
@@ -22,6 +24,9 @@ class BaseSource(ABC):
|
|
|
22
24
|
self.checkpoint_path = kwargs.get('checkpoint_path')
|
|
23
25
|
self.checkpoint = self.read_checkpoint()
|
|
24
26
|
self.init_client()
|
|
27
|
+
if not is_test():
|
|
28
|
+
# Not test the connection in unit tests
|
|
29
|
+
self.test_connection()
|
|
25
30
|
|
|
26
31
|
@abstractmethod
|
|
27
32
|
def init_client(self):
|
|
@@ -164,6 +164,7 @@ class InfluxDbSource(BaseSource):
|
|
|
164
164
|
'data': {record.get_field(): record.get_value()},
|
|
165
165
|
'metadata': {
|
|
166
166
|
'time': int(1e3 * record.get_time().timestamp()),
|
|
167
|
+
'measurement': record['_measurement'],
|
|
167
168
|
'tags': {
|
|
168
169
|
k: v
|
|
169
170
|
for k, v in record.values.items()
|
|
@@ -201,6 +202,7 @@ class InfluxDbSource(BaseSource):
|
|
|
201
202
|
'data': {record.get_field(): record.get_value()},
|
|
202
203
|
'metadata': {
|
|
203
204
|
'time': int(1e3 * record.get_time().timestamp()),
|
|
205
|
+
'measurement': record['_measurement'],
|
|
204
206
|
'tags': {
|
|
205
207
|
k: v
|
|
206
208
|
for k, v in record.values.items()
|
|
@@ -256,7 +256,8 @@ class KafkaSource(BaseSource):
|
|
|
256
256
|
handler(message_values)
|
|
257
257
|
|
|
258
258
|
def test_connection(self):
|
|
259
|
-
|
|
259
|
+
self.consumer._client.check_version(timeout=5)
|
|
260
|
+
self._print('Test connection successfully.')
|
|
260
261
|
|
|
261
262
|
def __deserialize_message(self, message):
|
|
262
263
|
if self.config.serde_config is None:
|
|
@@ -18,6 +18,7 @@ class MongoDBConfig(BaseConfig):
|
|
|
18
18
|
pipeline: Optional[_Pipeline] = None
|
|
19
19
|
operation_time: Optional[Timestamp] = None
|
|
20
20
|
start_after: Optional[Mapping[str, Any]] = None
|
|
21
|
+
full_document: Optional[str] = None
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
class MongoSource(BaseSource):
|
|
@@ -46,6 +47,9 @@ class MongoSource(BaseSource):
|
|
|
46
47
|
if hasattr(self.config, 'start_after') and self.config.start_after is not None:
|
|
47
48
|
watch_args['start_after'] = self.config.start_after
|
|
48
49
|
|
|
50
|
+
if hasattr(self.config, 'full_document'):
|
|
51
|
+
watch_args['full_document'] = self.config.full_document
|
|
52
|
+
|
|
49
53
|
return watch_args
|
|
50
54
|
|
|
51
55
|
def batch_read(self, handler: Callable):
|
|
@@ -813,7 +813,7 @@ class BaseAPIEndpointTest(AsyncDBTestCase):
|
|
|
813
813
|
validation = assert_after_create_count(self)
|
|
814
814
|
self.assertTrue(validation)
|
|
815
815
|
else:
|
|
816
|
-
after_count = len(get_resource().model_class.all())
|
|
816
|
+
after_count = len(get_resource(resource).model_class.all())
|
|
817
817
|
self.assertEqual(
|
|
818
818
|
after_count,
|
|
819
819
|
before_count + 1 if after_create_count is None else after_create_count,
|
|
@@ -1096,7 +1096,7 @@ class BaseAPIEndpointTest(AsyncDBTestCase):
|
|
|
1096
1096
|
|
|
1097
1097
|
self.assertTrue(validation)
|
|
1098
1098
|
else:
|
|
1099
|
-
after_count = len(get_resource().model_class.all())
|
|
1099
|
+
after_count = len(get_resource(resource).model_class.all())
|
|
1100
1100
|
self.assertEqual(
|
|
1101
1101
|
after_count,
|
|
1102
1102
|
before_count - 1 if after_delete_count is None else after_delete_count,
|
|
@@ -1132,15 +1132,16 @@ class BaseAPIEndpointTest(AsyncDBTestCase):
|
|
|
1132
1132
|
)
|
|
1133
1133
|
RolePermission.create(permission_id=permission.id, role_id=role.id)
|
|
1134
1134
|
else:
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1135
|
+
e_name = entity_name(resource)
|
|
1136
|
+
if getattr(EntityName, e_name, None) is not None:
|
|
1137
|
+
permission = Permission.create(
|
|
1138
|
+
access=access_for_permissions,
|
|
1139
|
+
entity_name=EntityName(e_name),
|
|
1140
|
+
options=permission_options,
|
|
1141
|
+
)
|
|
1142
|
+
RolePermission.create(permission_id=permission.id, role_id=role.id)
|
|
1140
1143
|
|
|
1141
1144
|
if permission_settings:
|
|
1142
1145
|
for permission_setting in permission_settings:
|
|
1143
1146
|
permission_more = Permission.create(**permission_setting)
|
|
1144
1147
|
RolePermission.create(permission_id=permission_more.id, role_id=role.id)
|
|
1145
|
-
|
|
1146
|
-
RolePermission.create(permission_id=permission.id, role_id=role.id)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from mage_ai.authentication.permissions.constants import PermissionAccess
|
|
2
|
+
from mage_ai.tests.api.endpoints.mixins import (
|
|
3
|
+
BaseAPIEndpointTest,
|
|
4
|
+
build_create_endpoint_tests,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SeedAPIEndpointTest(BaseAPIEndpointTest):
|
|
9
|
+
pass
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
build_create_endpoint_tests(
|
|
13
|
+
SeedAPIEndpointTest,
|
|
14
|
+
resource='seed',
|
|
15
|
+
authentication_accesses=[PermissionAccess.OWNER],
|
|
16
|
+
permissions_accesses=[PermissionAccess.OWNER],
|
|
17
|
+
build_payload=lambda self: dict(
|
|
18
|
+
roles=True,
|
|
19
|
+
permissions=True,
|
|
20
|
+
policy_names=['Block', 'Pipeline', 'Download'],
|
|
21
|
+
),
|
|
22
|
+
assert_before_create_count=lambda self: True,
|
|
23
|
+
assert_after_create_count=lambda self: True,
|
|
24
|
+
)
|
|
@@ -178,7 +178,9 @@ class SessionOperationTests(BaseApiTestCase):
|
|
|
178
178
|
@patch('mage_ai.api.resources.SessionResource.AUTHENTICATION_MODE', 'ldap')
|
|
179
179
|
@patch.object(LDAPConnection, 'authorize')
|
|
180
180
|
@patch.object(LDAPConnection, 'authenticate')
|
|
181
|
-
async def test_ldap_login_with_role_mapping(
|
|
181
|
+
async def test_ldap_login_with_role_mapping(
|
|
182
|
+
self, mock_authenticate, mock_authorize
|
|
183
|
+
):
|
|
182
184
|
mock_authenticate.return_value = (
|
|
183
185
|
True,
|
|
184
186
|
"Yami_Sukehiro",
|
|
@@ -188,7 +190,9 @@ class SessionOperationTests(BaseApiTestCase):
|
|
|
188
190
|
|
|
189
191
|
Role.create_default_roles()
|
|
190
192
|
|
|
191
|
-
with patch.dict(
|
|
193
|
+
with patch.dict(
|
|
194
|
+
os.environ, dict(LDAP_ROLES_MAPPING=json.dumps(dict(Admin=['Admin'])))
|
|
195
|
+
):
|
|
192
196
|
username = self.faker.email()
|
|
193
197
|
operation = self.build_operation(
|
|
194
198
|
action=constants.CREATE,
|
|
@@ -208,3 +212,50 @@ class SessionOperationTests(BaseApiTestCase):
|
|
|
208
212
|
user = User.query.filter(User.username == username).first()
|
|
209
213
|
self.assertIsNotNone(user)
|
|
210
214
|
self.assertEqual(user.roles_new[0].name, 'Admin')
|
|
215
|
+
|
|
216
|
+
@patch('mage_ai.api.resources.SessionResource.AUTHENTICATION_MODE', 'ldap')
|
|
217
|
+
@patch.object(LDAPConnection, 'authorize')
|
|
218
|
+
@patch.object(LDAPConnection, 'authenticate')
|
|
219
|
+
async def test_ldap_update_roles_on_login(self, mock_authenticate, mock_authorize):
|
|
220
|
+
mock_authenticate.return_value = (
|
|
221
|
+
True,
|
|
222
|
+
"Yami_Sukehiro",
|
|
223
|
+
dict(memberOf=['Admin']),
|
|
224
|
+
)
|
|
225
|
+
mock_authorize.return_value = True
|
|
226
|
+
|
|
227
|
+
Role.create_default_roles()
|
|
228
|
+
|
|
229
|
+
username = self.faker.email()
|
|
230
|
+
|
|
231
|
+
User.create(
|
|
232
|
+
username=username,
|
|
233
|
+
email=username,
|
|
234
|
+
roles_new=[Role.query.filter(Role.name == 'Admin').first()],
|
|
235
|
+
)
|
|
236
|
+
|
|
237
|
+
with patch.dict(
|
|
238
|
+
os.environ,
|
|
239
|
+
dict(
|
|
240
|
+
LDAP_ROLES_MAPPING=json.dumps(dict(Admin=['Editor'])),
|
|
241
|
+
UPDATE_ROLES_ON_LOGIN='1',
|
|
242
|
+
),
|
|
243
|
+
):
|
|
244
|
+
operation = self.build_operation(
|
|
245
|
+
action=constants.CREATE,
|
|
246
|
+
payload=dict(
|
|
247
|
+
session=dict(
|
|
248
|
+
email=username,
|
|
249
|
+
password="black bull",
|
|
250
|
+
)
|
|
251
|
+
),
|
|
252
|
+
resource='sessions',
|
|
253
|
+
user=None,
|
|
254
|
+
)
|
|
255
|
+
await operation.execute()
|
|
256
|
+
|
|
257
|
+
mock_authenticate.assert_called_once_with(username, "black bull")
|
|
258
|
+
mock_authorize.assert_called_once_with("Yami_Sukehiro")
|
|
259
|
+
user = User.query.filter(User.username == username).first()
|
|
260
|
+
self.assertIsNotNone(user)
|
|
261
|
+
self.assertEqual(user.roles_new[0].name, 'Editor')
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import unittest
|
|
3
|
+
from unittest.mock import patch
|
|
4
|
+
|
|
5
|
+
from mage_ai.authentication.providers.okta import OktaProvider
|
|
6
|
+
|
|
7
|
+
test_parameters = [
|
|
8
|
+
('https://samples.auth0.com', 'test-client-id', 'test-client-secret'),
|
|
9
|
+
('samples.auth0.com', 'test-client-id', 'test-client-secret'),
|
|
10
|
+
('', 'test-client-id', 'test-client-secret'),
|
|
11
|
+
('samples.auth0.com', '', ''),
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class OktaProviderTest(unittest.TestCase):
|
|
16
|
+
def setUp(self):
|
|
17
|
+
self.authorization_endpoint = 'https://samples.auth0.com/authorize'
|
|
18
|
+
self.token_endpoint = 'https://samples.auth0.com/oauth/token'
|
|
19
|
+
self.userinfo_endpoint = 'https://samples.auth0.com/userinfo'
|
|
20
|
+
|
|
21
|
+
def test_okta_provider_initialization(self):
|
|
22
|
+
for url, id, secret in test_parameters:
|
|
23
|
+
with self.subTest():
|
|
24
|
+
with patch.dict(
|
|
25
|
+
os.environ,
|
|
26
|
+
dict(
|
|
27
|
+
OKTA_DOMAIN_URL=url,
|
|
28
|
+
OKTA_CLIENT_ID=id,
|
|
29
|
+
OKTA_CLIENT_SECRET=secret,
|
|
30
|
+
),
|
|
31
|
+
):
|
|
32
|
+
if not all([url, id]):
|
|
33
|
+
with self.assertRaises(ValueError):
|
|
34
|
+
provider = OktaProvider()
|
|
35
|
+
else:
|
|
36
|
+
provider = OktaProvider()
|
|
37
|
+
self.assertEqual(
|
|
38
|
+
provider.authorization_endpoint, self.authorization_endpoint
|
|
39
|
+
)
|
|
40
|
+
self.assertEqual(provider.token_endpoint, self.token_endpoint)
|
|
41
|
+
self.assertEqual(
|
|
42
|
+
provider.userinfo_endpoint, self.userinfo_endpoint
|
|
43
|
+
)
|
|
@@ -38,7 +38,7 @@ class DBTBlockTest(AsyncDBTestCase):
|
|
|
38
38
|
self.block_sql.language = BlockLanguage.SQL
|
|
39
39
|
self.block_sql.pipeline = pipeline
|
|
40
40
|
|
|
41
|
-
self.dbt_block_sql = DBTBlock(
|
|
41
|
+
self.dbt_block_sql = DBTBlock.create(
|
|
42
42
|
name='test_dbt_block_sql',
|
|
43
43
|
uuid='test_dbt_block_sql',
|
|
44
44
|
block_type=BlockType.DBT,
|
|
@@ -50,7 +50,7 @@ class DBTBlockTest(AsyncDBTestCase):
|
|
|
50
50
|
pipeline=pipeline,
|
|
51
51
|
)
|
|
52
52
|
|
|
53
|
-
self.dbt_block_yaml = DBTBlock(
|
|
53
|
+
self.dbt_block_yaml = DBTBlock.create(
|
|
54
54
|
name='test_dbt_block_yaml',
|
|
55
55
|
uuid='test_dbt_block_yaml',
|
|
56
56
|
block_type=BlockType.DBT,
|
|
@@ -8,6 +8,7 @@ from pandas.testing import assert_frame_equal
|
|
|
8
8
|
|
|
9
9
|
# from mage_ai.data_cleaner.column_types.constants import ColumnType
|
|
10
10
|
from mage_ai.data_preparation.models.block import Block, BlockType, CallbackBlock
|
|
11
|
+
from mage_ai.data_preparation.models.block.block_factory import BlockFactory
|
|
11
12
|
from mage_ai.data_preparation.models.block.errors import HasDownstreamDependencies
|
|
12
13
|
from mage_ai.data_preparation.models.pipeline import Pipeline
|
|
13
14
|
from mage_ai.data_preparation.repo_manager import get_repo_config
|
|
@@ -606,7 +607,7 @@ SELECT 1 AS id;
|
|
|
606
607
|
upstream_block_uuids=['test_data_loader'],
|
|
607
608
|
)
|
|
608
609
|
|
|
609
|
-
test_block =
|
|
610
|
+
test_block = BlockFactory.get_block('test_data_loader', 'test_data_loader', 'data_loader')
|
|
610
611
|
|
|
611
612
|
self.assertRaises(HasDownstreamDependencies, block1.delete)
|
|
612
613
|
self.assertRaises(HasDownstreamDependencies, test_block.delete)
|
|
@@ -17,7 +17,7 @@ class RoleTests(DBTestCase):
|
|
|
17
17
|
Role.create_default_roles(
|
|
18
18
|
entity=Entity.PROJECT,
|
|
19
19
|
entity_id=test_entity_id,
|
|
20
|
-
|
|
20
|
+
name_func=lambda x: f'test_{x}',
|
|
21
21
|
)
|
|
22
22
|
owner = Role.query.filter(Role.name == 'test_Owner').one_or_none()
|
|
23
23
|
|
|
@@ -29,12 +29,12 @@ class RoleTests(DBTestCase):
|
|
|
29
29
|
Role.create_default_roles(
|
|
30
30
|
entity=Entity.PROJECT,
|
|
31
31
|
entity_id=test_entity_id,
|
|
32
|
-
|
|
32
|
+
name_func=lambda x: f'test-2_{x}',
|
|
33
33
|
)
|
|
34
34
|
Role.create_default_roles(
|
|
35
35
|
entity=Entity.PROJECT,
|
|
36
36
|
entity_id=test_entity_id2,
|
|
37
|
-
|
|
37
|
+
name_func=lambda x: f'test-2_{x}',
|
|
38
38
|
)
|
|
39
39
|
owner = Role.query.filter(Role.name == 'test-2_Owner').one_or_none()
|
|
40
40
|
|
|
@@ -13,6 +13,7 @@ class ProcessQueueTests(TestCase):
|
|
|
13
13
|
def setUp(self):
|
|
14
14
|
queue_config = QueueConfig.load(config=dict(concurrency=100))
|
|
15
15
|
self.queue = ProcessQueue(queue_config=queue_config)
|
|
16
|
+
self.queue.start()
|
|
16
17
|
|
|
17
18
|
def test_init(self):
|
|
18
19
|
self.assertEqual(self.queue.size, 100)
|
|
@@ -396,6 +396,7 @@ class PipelineSchedulerTests(DBTestCase):
|
|
|
396
396
|
error=f'Failed blocks: {block_runs[0].block_uuid}.',
|
|
397
397
|
pipeline=scheduler.pipeline,
|
|
398
398
|
pipeline_run=pipeline_run,
|
|
399
|
+
stacktrace=None,
|
|
399
400
|
)
|
|
400
401
|
|
|
401
402
|
def test_schedule_with_block_failures(self):
|
|
@@ -419,6 +420,7 @@ class PipelineSchedulerTests(DBTestCase):
|
|
|
419
420
|
error=f'Failed blocks: {block_runs[0].block_uuid}.',
|
|
420
421
|
pipeline=scheduler.pipeline,
|
|
421
422
|
pipeline_run=pipeline_run,
|
|
423
|
+
stacktrace=None,
|
|
422
424
|
)
|
|
423
425
|
|
|
424
426
|
@patch('mage_ai.orchestration.pipeline_scheduler_original.run_pipeline')
|
|
@@ -8,7 +8,7 @@ import tornado.ioloop
|
|
|
8
8
|
|
|
9
9
|
import mage_ai.server.server as server_module
|
|
10
10
|
from mage_ai.authentication.passwords import create_bcrypt_hash, generate_salt
|
|
11
|
-
from mage_ai.data_preparation.repo_manager import ProjectType
|
|
11
|
+
from mage_ai.data_preparation.repo_manager import ProjectType, get_project_uuid
|
|
12
12
|
from mage_ai.orchestration.db.models.oauth import (
|
|
13
13
|
Oauth2Application,
|
|
14
14
|
Permission,
|
|
@@ -21,7 +21,6 @@ from mage_ai.server.server import (
|
|
|
21
21
|
make_app,
|
|
22
22
|
replace_base_path,
|
|
23
23
|
)
|
|
24
|
-
from mage_ai.settings.repo import get_repo_name
|
|
25
24
|
from mage_ai.tests.base_test import AsyncDBTestCase
|
|
26
25
|
|
|
27
26
|
|
|
@@ -150,7 +149,10 @@ class ServerTests(AsyncDBTestCase):
|
|
|
150
149
|
def test_initialize_user_authentication_subproject(self):
|
|
151
150
|
initialize_user_authentication(ProjectType.SUB)
|
|
152
151
|
|
|
153
|
-
|
|
152
|
+
project_uuid = get_project_uuid()
|
|
153
|
+
project_uuid_truncated = project_uuid[:8]
|
|
154
|
+
|
|
155
|
+
owner_role = Role.get_role(f'{Role.DefaultRole.OWNER}_{project_uuid_truncated}')
|
|
154
156
|
self.assertTrue(len(owner_role.users) > 0)
|
|
155
157
|
|
|
156
158
|
owner_user = User.query.filter(User.email == 'admin@admin.com').one_or_none()
|
|
@@ -169,7 +171,9 @@ class ServerTests(AsyncDBTestCase):
|
|
|
169
171
|
)
|
|
170
172
|
initialize_user_authentication(ProjectType.SUB)
|
|
171
173
|
|
|
172
|
-
|
|
174
|
+
project_uuid = get_project_uuid()
|
|
175
|
+
project_uuid_truncated = project_uuid[:8]
|
|
176
|
+
owner_role = Role.get_role(f'{Role.DefaultRole.OWNER}_{project_uuid_truncated}')
|
|
173
177
|
self.assertTrue(len(owner_role.users) == 0)
|
|
174
178
|
|
|
175
179
|
owner_user = User.query.filter(User.email == 'admin@admin.com').one_or_none()
|
|
@@ -100,7 +100,7 @@ class ConfigurationOptionTest(AsyncDBTestCase):
|
|
|
100
100
|
self.faker.unique.name(),
|
|
101
101
|
os.path.join(self.repo_path, 'mage_platform'),
|
|
102
102
|
)
|
|
103
|
-
block = DBTBlock(
|
|
103
|
+
block = DBTBlock.create(
|
|
104
104
|
block_type='dbt',
|
|
105
105
|
configuration=dict(file_path='dir2/mage.sql'),
|
|
106
106
|
language='sql',
|
|
@@ -139,7 +139,7 @@ class ConfigurationOptionTest(AsyncDBTestCase):
|
|
|
139
139
|
self.faker.unique.name(),
|
|
140
140
|
os.path.join(self.repo_path, 'mage_platform'),
|
|
141
141
|
)
|
|
142
|
-
block = DBTBlock(
|
|
142
|
+
block = DBTBlock.create(
|
|
143
143
|
block_type='dbt',
|
|
144
144
|
configuration=dict(file_path='dir2/mage.sql'),
|
|
145
145
|
language='sql',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mage-ai
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.69
|
|
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
|
|
@@ -24,7 +24,7 @@ Requires-Dist: cryptography ==41.0.6
|
|
|
24
24
|
Requires-Dist: dask >=2022.2.0
|
|
25
25
|
Requires-Dist: datadog ==0.44.0
|
|
26
26
|
Requires-Dist: freezegun ==1.2.2
|
|
27
|
-
Requires-Dist: great-expectations ==0.
|
|
27
|
+
Requires-Dist: great-expectations ==0.18.12
|
|
28
28
|
Requires-Dist: httpx ==0.23.1
|
|
29
29
|
Requires-Dist: inflection ==0.5.1
|
|
30
30
|
Requires-Dist: ipykernel ==6.15.0
|
|
@@ -57,7 +57,7 @@ Requires-Dist: terminado ==0.17.1
|
|
|
57
57
|
Requires-Dist: thefuzz[speedup] ==0.19.0
|
|
58
58
|
Requires-Dist: tornado ==6.3.3
|
|
59
59
|
Requires-Dist: typer[all] ==0.9.0
|
|
60
|
-
Requires-Dist: typing-extensions ==4.
|
|
60
|
+
Requires-Dist: typing-extensions ==4.10.0
|
|
61
61
|
Requires-Dist: watchdog ==4.0.0
|
|
62
62
|
Provides-Extra: ai
|
|
63
63
|
Requires-Dist: astor >=0.8.1 ; extra == 'ai'
|
|
@@ -98,7 +98,7 @@ Requires-Dist: google-cloud-iam ~=2.13.0 ; extra == 'all'
|
|
|
98
98
|
Requires-Dist: google-cloud-pubsub ~=2.19.0 ; extra == 'all'
|
|
99
99
|
Requires-Dist: google-cloud-run ~=0.10.1 ; extra == 'all'
|
|
100
100
|
Requires-Dist: google-cloud-storage ~=2.5.0 ; extra == 'all'
|
|
101
|
-
Requires-Dist: great-expectations ==0.
|
|
101
|
+
Requires-Dist: great-expectations ==0.18.12 ; extra == 'all'
|
|
102
102
|
Requires-Dist: gspread ==5.7.2 ; extra == 'all'
|
|
103
103
|
Requires-Dist: influxdb-client ==1.36.1 ; extra == 'all'
|
|
104
104
|
Requires-Dist: kafka-python ==2.0.2 ; extra == 'all'
|
|
@@ -128,7 +128,7 @@ Requires-Dist: pyodbc ==4.0.35 ; extra == 'all'
|
|
|
128
128
|
Requires-Dist: redshift-connector ==2.0.915 ; extra == 'all'
|
|
129
129
|
Requires-Dist: lxml ==4.9.4 ; extra == 'all'
|
|
130
130
|
Requires-Dist: requests-aws4auth ==1.1.2 ; extra == 'all'
|
|
131
|
-
Requires-Dist: snowflake-connector-python ==3.
|
|
131
|
+
Requires-Dist: snowflake-connector-python ==3.5.0 ; extra == 'all'
|
|
132
132
|
Requires-Dist: sshtunnel ==0.4.0 ; extra == 'all'
|
|
133
133
|
Requires-Dist: stomp.py ==8.1.0 ; extra == 'all'
|
|
134
134
|
Requires-Dist: thefuzz[speedup] ==0.19.0 ; extra == 'all'
|
|
@@ -183,7 +183,7 @@ Provides-Extra: s3
|
|
|
183
183
|
Requires-Dist: boto3 ==1.26.60 ; extra == 's3'
|
|
184
184
|
Requires-Dist: botocore ==1.29.60 ; extra == 's3'
|
|
185
185
|
Provides-Extra: snowflake
|
|
186
|
-
Requires-Dist: snowflake-connector-python ==3.
|
|
186
|
+
Requires-Dist: snowflake-connector-python ==3.5.0 ; extra == 'snowflake'
|
|
187
187
|
Provides-Extra: spark
|
|
188
188
|
Requires-Dist: boto3 ==1.26.60 ; extra == 'spark'
|
|
189
189
|
Requires-Dist: botocore ==1.29.60 ; extra == 'spark'
|