systemlink-cli 3.0.2__tar.gz → 3.1.1__tar.gz
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.
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/PKG-INFO +4 -2
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/pyproject.toml +3 -2
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/_version.py +1 -1
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/migrate_click.py +27 -5
- systemlink_cli-3.1.1/slcli/migration/annotations.py +10 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/migration/command.py +30 -32
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/migration/connection.py +66 -3
- systemlink_cli-3.1.1/slcli/migration/flows/batching.py +82 -0
- systemlink_cli-3.1.1/slcli/migration/flows/migrate.py +71 -0
- systemlink_cli-3.1.1/slcli/migration/flows/service.py +66 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/migration/orchestration.py +8 -2
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/migration/state.py +9 -0
- systemlink_cli-3.1.1/slcli/migration/summary.py +72 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/migration/testmonitor/client.py +59 -7
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/migration/testmonitor/discovery.py +3 -21
- systemlink_cli-3.1.1/slcli/migration/testmonitor/migration.py +345 -0
- systemlink_cli-3.1.1/slcli/migration/testmonitor/migration_task.py +136 -0
- systemlink_cli-3.1.1/slcli/migration/testmonitor/models.py +96 -0
- systemlink_cli-3.1.1/slcli/migration/testmonitor/records.py +87 -0
- systemlink_cli-3.1.1/slcli/migration/testmonitor/writer.py +101 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/migration/workspaces.py +11 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/python-test/overview.md +1 -1
- systemlink_cli-3.0.2/slcli/migration/flows/migrate.py +0 -53
- systemlink_cli-3.0.2/slcli/migration/testmonitor/models.py +0 -47
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/LICENSE +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/dff-editor/editor.js +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/dff-editor/index.html +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/__init__.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/__main__.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/alarm_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/asset_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/cli_formatters.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/cli_utils.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/comment_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/completion_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/config.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/config_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/credentials.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/dataframe_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/dff_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/dff_decorators.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/example_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/example_loader.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/example_provisioner.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/README.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/_schema/schema-v1.0.json +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/demo-data-1/README.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/demo-data-1/config.yaml +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/demo-data-2/README.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/demo-data-2/config.yaml +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/demo-data-3/config.yaml +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/demo-data-3/leakage-current-results.json +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/demo-data-3/overvoltage-results.json +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/demo-data-3/product-xyz-compliance-report.json +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/demo-data-3/product-xyz-specification.csv +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/demo-data-3/thermal-response-results.json +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/exercise-5-1-parametric-insights/README.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/exercise-5-1-parametric-insights/config.yaml +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/exercise-7-1-test-plans/README.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/exercise-7-1-test-plans/config.yaml +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/spec-compliance-notebooks/README.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/spec-compliance-notebooks/config.yaml +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/spec-compliance-notebooks/notebooks/SpecAnalysis_ComplianceCalculation.ipynb +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/spec-compliance-notebooks/notebooks/SpecComplianceCalculation.ipynb +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/spec-compliance-notebooks/notebooks/SpecfileExtractionAndIngestion.ipynb +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/examples/spec-compliance-notebooks/spec_template.xlsx +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/feed_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/file_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/function_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/function_templates.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/main.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/managed_client/__init__.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/managed_client/crypto.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/managed_client/handlers.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/managed_client/minion.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/managed_client/models.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/managed_client/protocol.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/managed_client/rest.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/managed_client/state.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/managed_client/transport.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/managed_client_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/mcp_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/mcp_reachability.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/mcp_server.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/mcp_skills.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/migration/__init__.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/migration/api.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/migration/flows/__init__.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/migration/flows/discover.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/migration/prefect_server.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/migration/schema.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/migration/testmonitor/__init__.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/migration/testmonitor/discovery_task.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/migration/workspace_client.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/migration/workspace_task.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/notebook_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/paths.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/pkce.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/platform.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/policy_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/policy_utils.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/profile_credentials.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/profiles.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/response_handlers.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/rich_output.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/routine_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skill_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/SKILL.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/evals/COPILOT_BATCH_RUN_PROMPT.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/evals/README.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/evals/evals.json +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/evals/evals.schema.json +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/evals/files/spec-import/battery-specs.csv +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/evals/files/webapp-package/icon.svg +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/evals/files/webapp-package/nipkg.config.json +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/evals/files/webapp-package/webapp-content/index.html +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/evals/trigger_evals.json +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/analysis-recipes.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/commands.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/datasheet-workflow.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/domain-concepts.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/example-authoring.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/filtering.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/import-specs.min.json +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/job-debugging/overview.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/nipkg/overview.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/notebook/interfaces.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/notebook/notebook-patterns.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/notebook/overview.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/routine-examples.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/troubleshooting.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/webapp/angular-ui-packages.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/webapp/deployment.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/webapp/layout-patterns.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/webapp/nimble-angular.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/webapp/overview.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/webapp/systemlink-services.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/references/webapp/troubleshooting.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/scripts/benchmark_iteration.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/scripts/compare_iteration.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/scripts/eval_manifest.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/scripts/grade_eval_response.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/scripts/grade_iteration.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/scripts/prepare_eval_prompts.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/scripts/prepare_eval_workspace.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/scripts/render_eval_review.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/skills/slcli/scripts/spec_import_helper.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/spec_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/ssl_trust.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/state_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/system_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/system_query_utils.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/systemlink-logo.svg +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/table_utils.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/tag_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/templates_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/testmonitor_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/universal_handlers.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/user_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/utils.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/version_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/web_editor.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_bootstrap.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/.gitignore +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/README.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/angular.json +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/package.json +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/scripts/filter-sbom.js +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/app-routing.module.ts +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/app.component.html +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/app.component.scss +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/app.component.ts +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/app.module.ts +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/core/layout/app-shell.component.html +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/core/layout/app-shell.component.scss +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/core/layout/app-shell.component.ts +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/core/state/app-view-state.service.ts +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/core/systemlink/systemlink-context.service.ts +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/core/systemlink/systemlink-locale.ts +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/core/systemlink/theme-sync.service.ts +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/core/systemlink/webapp-home-data.service.ts +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/features/assets/assets-page.component.html +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/features/assets/assets-page.component.scss +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/features/assets/assets-page.component.ts +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/features/datasets/datasets-page.component.html +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/features/datasets/datasets-page.component.scss +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/features/datasets/datasets-page.component.ts +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/features/home/home-page.component.html +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/features/home/home-page.component.scss +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/features/home/home-page.component.ts +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/features/master-detail/master-detail-page.component.html +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/features/master-detail/master-detail-page.component.scss +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/features/master-detail/master-detail-page.component.ts +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/features/operations/operations-page.component.html +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/features/operations/operations-page.component.scss +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/features/operations/operations-page.component.ts +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/features/settings/settings-page.component.html +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/features/settings/settings-page.component.scss +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/features/settings/settings-page.component.ts +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/shared/components/empty-state.component.html +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/shared/components/empty-state.component.scss +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/shared/components/empty-state.component.ts +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/shared/components/error-banner.component.html +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/shared/components/error-banner.component.scss +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/shared/components/error-banner.component.ts +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/shared/components/loading-state.component.html +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/shared/components/loading-state.component.scss +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/shared/components/loading-state.component.ts +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/app/shared/states/view-state.model.ts +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/assets/README.md +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/index.html +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/locale/messages.de.json +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/locale/messages.en.json +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/locale/messages.es.json +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/locale/messages.fr.json +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/locale/messages.ja.json +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/locale/messages.ko.json +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/locale/messages.zh.json +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/localize.d.ts +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/main.ts +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/src/styles.scss +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/tsconfig.app.json +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/webapp_templates/angular/blank/tsconfig.json +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/workflow_preview.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/workflows_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/workitem_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/workspace_click.py +0 -0
- {systemlink_cli-3.0.2 → systemlink_cli-3.1.1}/slcli/workspace_utils.py +0 -0
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: systemlink-cli
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.1.1
|
|
4
4
|
Summary: SystemLink Integrator CLI - cross-platform CLI for SystemLink workflows and templates.
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Author: Fred Visser
|
|
7
7
|
Author-email: fred.visser@emerson.com
|
|
8
|
-
Requires-Python: >=3.11.1,<3.
|
|
8
|
+
Requires-Python: >=3.11.1,<3.16
|
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.12
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.13
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.14
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
13
14
|
Provides-Extra: managed-client
|
|
14
15
|
Provides-Extra: mcp
|
|
15
16
|
Provides-Extra: migration
|
|
@@ -36,4 +37,5 @@ Requires-Dist: rich (>=15,<16)
|
|
|
36
37
|
Requires-Dist: rich-click (>=1.8,<2)
|
|
37
38
|
Requires-Dist: tabulate (>=0.10.0,<0.11.0)
|
|
38
39
|
Requires-Dist: truststore (>=0.9,<0.11)
|
|
40
|
+
Requires-Dist: urllib3 (>=2,<3)
|
|
39
41
|
Requires-Dist: watchdog (>=6.0.0,<7.0.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "systemlink-cli"
|
|
3
|
-
version = "3.
|
|
3
|
+
version = "3.1.1"
|
|
4
4
|
description = "SystemLink Integrator CLI - cross-platform CLI for SystemLink workflows and templates."
|
|
5
5
|
authors = ["Fred Visser <fred.visser@emerson.com>"]
|
|
6
6
|
packages = [{ include = "slcli" }]
|
|
@@ -23,12 +23,13 @@ release-from-changes = "scripts.towncrier_release:main"
|
|
|
23
23
|
lint = "scripts.lint:main"
|
|
24
24
|
|
|
25
25
|
[tool.poetry.dependencies]
|
|
26
|
-
python = ">=3.11.1,<3.
|
|
26
|
+
python = ">=3.11.1,<3.16"
|
|
27
27
|
# cli
|
|
28
28
|
click = ">=7.1.2"
|
|
29
29
|
filelock = ">=4,<5"
|
|
30
30
|
keyring = "^25.6.0"
|
|
31
31
|
requests = "^2.32.4"
|
|
32
|
+
urllib3 = ">=2,<3"
|
|
32
33
|
idna = ">=3.10,<4"
|
|
33
34
|
tabulate = "^0.10.0"
|
|
34
35
|
truststore = ">=0.9,<0.11"
|
|
@@ -82,7 +82,7 @@ def _validate_prefect_api_url(
|
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
def register_migrate_command(cli: click.Group) -> None:
|
|
85
|
-
"""Register the
|
|
85
|
+
"""Register the migrate command, hidden without the migration extra."""
|
|
86
86
|
|
|
87
87
|
@cli.command(name="migrate", hidden=not migration_extra_installed())
|
|
88
88
|
@click.option("--source-profile", help="Named source SystemLink profile for a new migration.")
|
|
@@ -100,7 +100,9 @@ def register_migrate_command(cli: click.Group) -> None:
|
|
|
100
100
|
"Destination workspaces must already exist."
|
|
101
101
|
),
|
|
102
102
|
)
|
|
103
|
-
@click.option("--migration-id", help="
|
|
103
|
+
@click.option("--migration-id", help="Resume an existing migration.")
|
|
104
|
+
@click.option("--product-batch-size", type=click.IntRange(min=1), default=None, hidden=True)
|
|
105
|
+
@click.option("--result-batch-size", type=click.IntRange(min=1), default=None, hidden=True)
|
|
104
106
|
@click.option(
|
|
105
107
|
"--prefect-api-url",
|
|
106
108
|
callback=_validate_prefect_api_url,
|
|
@@ -111,14 +113,22 @@ def register_migrate_command(cli: click.Group) -> None:
|
|
|
111
113
|
destination_profile: Optional[str],
|
|
112
114
|
workspace_mappings: Optional[Dict[str, str]],
|
|
113
115
|
migration_id: Optional[str],
|
|
116
|
+
product_batch_size: Optional[int],
|
|
117
|
+
result_batch_size: Optional[int],
|
|
114
118
|
prefect_api_url: Optional[str],
|
|
115
119
|
) -> None:
|
|
116
120
|
"""Discover and migrate resources from a SystemLink Server."""
|
|
117
|
-
new_run_options = (
|
|
121
|
+
new_run_options = (
|
|
122
|
+
source_profile,
|
|
123
|
+
destination_profile,
|
|
124
|
+
workspace_mappings,
|
|
125
|
+
product_batch_size,
|
|
126
|
+
result_batch_size,
|
|
127
|
+
)
|
|
118
128
|
if migration_id is not None and any(value is not None for value in new_run_options):
|
|
119
129
|
raise click.UsageError(
|
|
120
130
|
"--migration-id cannot be combined with --source-profile, "
|
|
121
|
-
"--destination-profile,
|
|
131
|
+
"--destination-profile, --workspace-mappings, or batch sizes"
|
|
122
132
|
)
|
|
123
133
|
if migration_id is None and (source_profile is None or destination_profile is None):
|
|
124
134
|
raise click.UsageError(
|
|
@@ -139,6 +149,18 @@ def register_migrate_command(cli: click.Group) -> None:
|
|
|
139
149
|
if migration_id is not None:
|
|
140
150
|
command.resume_migration(migration_id, prefect_api_url)
|
|
141
151
|
elif source_profile is not None and destination_profile is not None:
|
|
152
|
+
batch_sizes = {
|
|
153
|
+
key: value
|
|
154
|
+
for key, value in (
|
|
155
|
+
("product_batch_size", product_batch_size),
|
|
156
|
+
("result_batch_size", result_batch_size),
|
|
157
|
+
)
|
|
158
|
+
if value is not None
|
|
159
|
+
}
|
|
142
160
|
command.start_migration(
|
|
143
|
-
source_profile,
|
|
161
|
+
source_profile,
|
|
162
|
+
destination_profile,
|
|
163
|
+
workspace_mappings,
|
|
164
|
+
prefect_api_url,
|
|
165
|
+
**batch_sizes,
|
|
144
166
|
)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""Property annotations that mark migrated destination resources."""
|
|
2
|
+
|
|
3
|
+
SOURCE_ID = "Migration.SourceId"
|
|
4
|
+
SOURCE_HOSTNAME = "Migration.SourceHostname"
|
|
5
|
+
MIGRATION_ID = "Migration.Id"
|
|
6
|
+
STATUS = "Migration.Status"
|
|
7
|
+
STARTED_AT = "Migration.StartedAt"
|
|
8
|
+
COMPLETED_AT = "Migration.CompletedAt"
|
|
9
|
+
INCOMPLETE = "INCOMPLETE"
|
|
10
|
+
COMPLETE = "COMPLETE"
|
|
@@ -14,13 +14,21 @@ from slcli._version import __version__
|
|
|
14
14
|
from slcli.migration.connection import MigrationConnection, resolve_migration_connection
|
|
15
15
|
from slcli.migration.orchestration import prefect_server, run_migration
|
|
16
16
|
from slcli.migration.state import (
|
|
17
|
+
DEFAULT_PRODUCT_BATCH_SIZE,
|
|
18
|
+
DEFAULT_RESULT_BATCH_SIZE,
|
|
17
19
|
MigrationRun,
|
|
18
20
|
RunMetadata,
|
|
19
21
|
create_migration_run,
|
|
20
22
|
open_migration_run,
|
|
21
23
|
)
|
|
24
|
+
from slcli.migration.summary import (
|
|
25
|
+
failed_items,
|
|
26
|
+
format_migration_summary,
|
|
27
|
+
format_summary,
|
|
28
|
+
format_workspace_mapping,
|
|
29
|
+
)
|
|
22
30
|
from slcli.migration.testmonitor.models import TestMonitorDiscovery
|
|
23
|
-
from slcli.migration.workspaces import
|
|
31
|
+
from slcli.migration.workspaces import WorkspaceMappingError
|
|
24
32
|
from slcli.utils import handle_api_error
|
|
25
33
|
|
|
26
34
|
_logger = logging.getLogger("slcli.migration")
|
|
@@ -32,12 +40,20 @@ def start_migration(
|
|
|
32
40
|
destination_profile: str,
|
|
33
41
|
workspace_mappings: Optional[Dict[str, str]],
|
|
34
42
|
prefect_api_url: Optional[str],
|
|
43
|
+
product_batch_size: int = DEFAULT_PRODUCT_BATCH_SIZE,
|
|
44
|
+
result_batch_size: int = DEFAULT_RESULT_BATCH_SIZE,
|
|
35
45
|
) -> None:
|
|
36
|
-
"""Create a new migration run, then
|
|
46
|
+
"""Create a new migration run, then migrate resources."""
|
|
37
47
|
source = resolve_migration_connection(source_profile)
|
|
38
48
|
destination = resolve_migration_connection(destination_profile)
|
|
39
49
|
_echo_connections(source, destination)
|
|
40
|
-
run = create_migration_run(
|
|
50
|
+
run = create_migration_run(
|
|
51
|
+
source_profile,
|
|
52
|
+
destination_profile,
|
|
53
|
+
workspace_mappings,
|
|
54
|
+
product_batch_size=product_batch_size,
|
|
55
|
+
result_batch_size=result_batch_size,
|
|
56
|
+
)
|
|
41
57
|
_, metadata = open_migration_run(run.migration_id, run.directory.parent)
|
|
42
58
|
_migrate(run, metadata, source, destination, prefect_api_url)
|
|
43
59
|
|
|
@@ -54,37 +70,10 @@ def resume_migration(migration_id: str, prefect_api_url: Optional[str]) -> None:
|
|
|
54
70
|
_migrate(run, metadata, source, destination, prefect_api_url)
|
|
55
71
|
|
|
56
72
|
|
|
57
|
-
def format_summary(discovery: TestMonitorDiscovery) -> str:
|
|
58
|
-
"""Return deterministic Test Monitor discovery counts and failures."""
|
|
59
|
-
lines = [
|
|
60
|
-
"Test Monitor discovery:",
|
|
61
|
-
f" Products: {len(discovery.products)}",
|
|
62
|
-
f" Terminal results: {len(discovery.results)}",
|
|
63
|
-
f" Failed workspaces: {len(discovery.failures)}",
|
|
64
|
-
*(f" {failure.workspace}: {failure.error_type}" for failure in discovery.failures),
|
|
65
|
-
]
|
|
66
|
-
if discovery.failures:
|
|
67
|
-
lines.append(" Product workspaces were inferred without the failed workspaces.")
|
|
68
|
-
return "\n".join(lines)
|
|
69
|
-
|
|
70
|
-
|
|
71
73
|
def _all_workspaces_failed(discovery: TestMonitorDiscovery) -> bool:
|
|
72
74
|
return bool(discovery.workspaces) and len(discovery.failures) == len(discovery.workspaces)
|
|
73
75
|
|
|
74
76
|
|
|
75
|
-
def format_workspace_mapping(mapping: WorkspaceMapping) -> str:
|
|
76
|
-
"""Return each source workspace and the destination workspace it migrates to."""
|
|
77
|
-
return "\n".join(
|
|
78
|
-
[
|
|
79
|
-
"Workspace mapping:",
|
|
80
|
-
*(
|
|
81
|
-
f" {workspace.source_name} -> {workspace.destination_name}"
|
|
82
|
-
for workspace in mapping.workspaces
|
|
83
|
-
),
|
|
84
|
-
]
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
|
|
88
77
|
def _echo_connections(source: MigrationConnection, destination: MigrationConnection) -> None:
|
|
89
78
|
for role, connection in (("Source", source), ("Destination", destination)):
|
|
90
79
|
click.echo(f"{role}: {connection.profile_name} ({connection.base_url})")
|
|
@@ -140,7 +129,8 @@ def _migrate(
|
|
|
140
129
|
with _run_log(log_path):
|
|
141
130
|
_logger.info(
|
|
142
131
|
"Migration started: migration=%s cli=%s profile=%s endpoint=%s workspaces=%s "
|
|
143
|
-
"destination_profile=%s destination_endpoint=%s prefect_server=%s"
|
|
132
|
+
"destination_profile=%s destination_endpoint=%s prefect_server=%s "
|
|
133
|
+
"product_batch_size=%d result_batch_size=%d",
|
|
144
134
|
run.migration_id,
|
|
145
135
|
__version__,
|
|
146
136
|
source.profile_name,
|
|
@@ -149,6 +139,8 @@ def _migrate(
|
|
|
149
139
|
destination.profile_name,
|
|
150
140
|
destination.base_url,
|
|
151
141
|
server_mode,
|
|
142
|
+
metadata.product_batch_size,
|
|
143
|
+
metadata.result_batch_size,
|
|
152
144
|
)
|
|
153
145
|
try:
|
|
154
146
|
with prefect_server(run, prefect_api_url) as api_url:
|
|
@@ -171,17 +163,23 @@ def _migrate(
|
|
|
171
163
|
],
|
|
172
164
|
)
|
|
173
165
|
test_monitor = outcome.discovery.test_monitor
|
|
166
|
+
migration = outcome.test_monitor
|
|
167
|
+
failed = len(failed_items(migration.products)) + len(failed_items(migration.results))
|
|
174
168
|
_logger.info(
|
|
175
|
-
"
|
|
169
|
+
"Migration completed: products=%d results=%d failed_workspaces=%s failed_items=%d",
|
|
176
170
|
len(test_monitor.products),
|
|
177
171
|
len(test_monitor.results),
|
|
178
172
|
[failure.workspace for failure in test_monitor.failures],
|
|
173
|
+
failed,
|
|
179
174
|
)
|
|
180
175
|
click.echo(format_workspace_mapping(outcome.mapping))
|
|
181
176
|
click.echo(format_summary(test_monitor))
|
|
177
|
+
click.echo(format_migration_summary(migration))
|
|
182
178
|
click.echo(f"Log: {log_path}")
|
|
183
179
|
if _all_workspaces_failed(test_monitor):
|
|
184
180
|
raise click.ClickException("Discovery failed for every workspace.")
|
|
181
|
+
if failed:
|
|
182
|
+
raise click.ClickException(f"{failed} items failed to migrate.")
|
|
185
183
|
|
|
186
184
|
|
|
187
185
|
def _log_failure(exc: BaseException, log_path: Path) -> None:
|
|
@@ -1,20 +1,61 @@
|
|
|
1
1
|
"""Profile-explicit SystemLink connections for migration operations."""
|
|
2
2
|
|
|
3
|
+
import logging
|
|
3
4
|
from dataclasses import dataclass, field
|
|
5
|
+
from types import TracebackType
|
|
4
6
|
from typing import Any, Dict, Optional, Union
|
|
5
7
|
|
|
6
8
|
import click
|
|
7
9
|
import requests
|
|
8
10
|
from requests.adapters import HTTPAdapter
|
|
11
|
+
from urllib3.connectionpool import ConnectionPool
|
|
12
|
+
from urllib3.response import BaseHTTPResponse
|
|
9
13
|
from urllib3.util.retry import Retry
|
|
10
14
|
|
|
11
15
|
from slcli.profiles import Profile, ProfileConfig
|
|
12
16
|
from slcli.ssl_trust import use_standard_ssl_context
|
|
13
17
|
from slcli.utils import get_auth_headers, profile_ssl_verify, resolve_profile_auth
|
|
14
18
|
|
|
19
|
+
_logger = logging.getLogger(__name__)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class LoggingRetry(Retry):
|
|
23
|
+
"""Retry policy that logs every retry decision to the migration log."""
|
|
24
|
+
|
|
25
|
+
def increment(
|
|
26
|
+
self,
|
|
27
|
+
method: Optional[str] = None,
|
|
28
|
+
url: Optional[str] = None,
|
|
29
|
+
response: Optional[BaseHTTPResponse] = None,
|
|
30
|
+
error: Optional[Exception] = None,
|
|
31
|
+
_pool: Optional[ConnectionPool] = None,
|
|
32
|
+
_stacktrace: Optional[TracebackType] = None,
|
|
33
|
+
) -> "LoggingRetry":
|
|
34
|
+
"""Log the retry decision, then defer to :class:`Retry`."""
|
|
35
|
+
reason = f"status={response.status}" if response is not None else type(error).__name__
|
|
36
|
+
try:
|
|
37
|
+
retry = super().increment(method, url, response, error, _pool, _stacktrace)
|
|
38
|
+
except Exception:
|
|
39
|
+
_logger.warning(
|
|
40
|
+
"HTTP retry exhausted: %s %s %s",
|
|
41
|
+
method,
|
|
42
|
+
url,
|
|
43
|
+
reason,
|
|
44
|
+
)
|
|
45
|
+
raise
|
|
46
|
+
_logger.warning(
|
|
47
|
+
"HTTP retry: %s %s %s attempt=%d backoff=%.1fs",
|
|
48
|
+
method,
|
|
49
|
+
url,
|
|
50
|
+
reason,
|
|
51
|
+
len(retry.history),
|
|
52
|
+
retry.get_backoff_time(),
|
|
53
|
+
)
|
|
54
|
+
return retry
|
|
55
|
+
|
|
56
|
+
|
|
15
57
|
# Policy for read-only queries, including POST query endpoints, which are safe to replay.
|
|
16
|
-
|
|
17
|
-
_QUERY_RETRY = Retry(
|
|
58
|
+
_QUERY_RETRY = LoggingRetry(
|
|
18
59
|
total=5,
|
|
19
60
|
backoff_factor=0.5,
|
|
20
61
|
status_forcelist=(429, 500, 502, 503, 504),
|
|
@@ -23,6 +64,21 @@ _QUERY_RETRY = Retry(
|
|
|
23
64
|
raise_on_status=False,
|
|
24
65
|
)
|
|
25
66
|
|
|
67
|
+
# Policy for destination writes. Only failures where the server did not process the
|
|
68
|
+
# request are retried: refused connections and explicit 429/503 back-pressure. Read
|
|
69
|
+
# timeouts and other 5xx responses are ambiguous and are never replayed.
|
|
70
|
+
_WRITE_RETRY = LoggingRetry(
|
|
71
|
+
total=5,
|
|
72
|
+
connect=5,
|
|
73
|
+
read=0,
|
|
74
|
+
other=0,
|
|
75
|
+
backoff_factor=1.0,
|
|
76
|
+
status_forcelist=(429, 503),
|
|
77
|
+
allowed_methods=None,
|
|
78
|
+
respect_retry_after_header=True,
|
|
79
|
+
raise_on_status=False,
|
|
80
|
+
)
|
|
81
|
+
|
|
26
82
|
|
|
27
83
|
class _ProfileSession(requests.Session):
|
|
28
84
|
"""Session that evaluates an explicit CA bundle despite injected OS trust."""
|
|
@@ -49,9 +105,16 @@ class MigrationConnection:
|
|
|
49
105
|
|
|
50
106
|
def create_session(self) -> requests.Session:
|
|
51
107
|
"""Return a query session bound to this connection's credentials and TLS."""
|
|
108
|
+
return self._session(_QUERY_RETRY)
|
|
109
|
+
|
|
110
|
+
def create_write_session(self) -> requests.Session:
|
|
111
|
+
"""Return a session for non-idempotent writes that never replays ambiguous failures."""
|
|
112
|
+
return self._session(_WRITE_RETRY)
|
|
113
|
+
|
|
114
|
+
def _session(self, retry: Retry) -> requests.Session:
|
|
52
115
|
session = _ProfileSession(self.ssl_verify)
|
|
53
116
|
session.headers.update(self.headers)
|
|
54
|
-
adapter = HTTPAdapter(max_retries=
|
|
117
|
+
adapter = HTTPAdapter(max_retries=retry)
|
|
55
118
|
session.mount("https://", adapter)
|
|
56
119
|
session.mount("http://", adapter)
|
|
57
120
|
return session
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""Helpers shared by every resource type that migrates in batches."""
|
|
2
|
+
|
|
3
|
+
import logging
|
|
4
|
+
from typing import Any, Iterable, List, Protocol, Sequence, Tuple, TypeVar
|
|
5
|
+
|
|
6
|
+
from prefect import allow_failure, unmapped
|
|
7
|
+
from prefect.futures import PrefectFuture, PrefectFutureList
|
|
8
|
+
|
|
9
|
+
from slcli.migration.testmonitor.models import BatchResult, FailedItem
|
|
10
|
+
from slcli.migration.workspaces import WorkspaceMapping
|
|
11
|
+
|
|
12
|
+
_T = TypeVar("_T")
|
|
13
|
+
_logger = logging.getLogger(__name__)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Identified(Protocol):
|
|
17
|
+
"""An item that reports failures by its source ID."""
|
|
18
|
+
|
|
19
|
+
@property
|
|
20
|
+
def id(self) -> str:
|
|
21
|
+
"""Return the source ID."""
|
|
22
|
+
...
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def partition(items: Sequence[_T], size: int) -> List[List[_T]]:
|
|
26
|
+
"""Split items into stable, ordered batches of at most ``size``."""
|
|
27
|
+
if size < 1:
|
|
28
|
+
raise ValueError("batch size must be at least 1")
|
|
29
|
+
return [list(items[start : start + size]) for start in range(0, len(items), size)]
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def gather_batches(
|
|
33
|
+
resource: str,
|
|
34
|
+
batches: Sequence[Sequence[Identified]],
|
|
35
|
+
futures: PrefectFutureList[BatchResult],
|
|
36
|
+
) -> List[BatchResult]:
|
|
37
|
+
"""Wait for every batch; a batch that raised reports all of its items as failed."""
|
|
38
|
+
outcomes: List[BatchResult] = []
|
|
39
|
+
for index, (batch, future) in enumerate(zip(batches, futures)):
|
|
40
|
+
future.wait()
|
|
41
|
+
if future.state.is_completed():
|
|
42
|
+
outcomes.append(future.result())
|
|
43
|
+
continue
|
|
44
|
+
error = future.state.result(raise_on_failure=False)
|
|
45
|
+
error_type = type(error).__name__ if isinstance(error, BaseException) else "Failed"
|
|
46
|
+
_logger.error("Batch %s[%d] failed before migrating: %s", resource, index, error_type)
|
|
47
|
+
outcomes.append(
|
|
48
|
+
BatchResult(
|
|
49
|
+
resource=resource,
|
|
50
|
+
batch=index,
|
|
51
|
+
failed=tuple(
|
|
52
|
+
FailedItem(source_id=item.id, stage="batch", error_type=error_type)
|
|
53
|
+
for item in batch
|
|
54
|
+
),
|
|
55
|
+
)
|
|
56
|
+
)
|
|
57
|
+
return outcomes
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def after_all(futures: Iterable[PrefectFuture[Any]]) -> List[Any]:
|
|
61
|
+
"""Return ``wait_for`` dependencies that are met once every future finishes.
|
|
62
|
+
|
|
63
|
+
Unlike plain futures, these are met by failed and crashed futures too.
|
|
64
|
+
"""
|
|
65
|
+
# Prefect accepts allow_failure in wait_for but does not annotate it.
|
|
66
|
+
return [allow_failure(future) for future in futures]
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def shared_task_args(
|
|
70
|
+
migration_id: str, source_profile: str, destination_profile: str, mapping: WorkspaceMapping
|
|
71
|
+
) -> Tuple[Any, ...]:
|
|
72
|
+
"""Return the leading arguments every batch task receives.
|
|
73
|
+
|
|
74
|
+
``Task.map`` iterates sequence arguments; ``unmapped`` passes these unchanged
|
|
75
|
+
to every batch instead.
|
|
76
|
+
"""
|
|
77
|
+
return (
|
|
78
|
+
unmapped(migration_id),
|
|
79
|
+
unmapped(source_profile),
|
|
80
|
+
unmapped(destination_profile),
|
|
81
|
+
unmapped(mapping),
|
|
82
|
+
)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"""Migration flow: discover, synchronize workspaces, then migrate each resource type."""
|
|
2
|
+
|
|
3
|
+
from typing import Dict, Optional
|
|
4
|
+
|
|
5
|
+
from prefect import flow
|
|
6
|
+
from pydantic import ConfigDict
|
|
7
|
+
|
|
8
|
+
from slcli.migration.flows.discover import MigrationDiscovery, discover_flow
|
|
9
|
+
from slcli.migration.flows.service import migration_task_runner
|
|
10
|
+
from slcli.migration.schema import VersionedModel
|
|
11
|
+
from slcli.migration.testmonitor.migration_task import migrate_test_monitor_task
|
|
12
|
+
from slcli.migration.testmonitor.models import TestMonitorMigration
|
|
13
|
+
from slcli.migration.workspace_task import synchronize_workspaces_task
|
|
14
|
+
from slcli.migration.workspaces import WorkspaceMapping
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class MigrationOutcome(VersionedModel):
|
|
18
|
+
"""Workspace mapping, discovery, and migration outcomes of one run."""
|
|
19
|
+
|
|
20
|
+
model_config = ConfigDict(frozen=True)
|
|
21
|
+
|
|
22
|
+
mapping: WorkspaceMapping
|
|
23
|
+
discovery: MigrationDiscovery
|
|
24
|
+
test_monitor: TestMonitorMigration
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@flow(
|
|
28
|
+
name="systemlink-migration",
|
|
29
|
+
flow_run_name="migration-{migration_id}",
|
|
30
|
+
persist_result=True,
|
|
31
|
+
result_serializer="json",
|
|
32
|
+
task_runner=migration_task_runner(),
|
|
33
|
+
)
|
|
34
|
+
def migrate_flow(
|
|
35
|
+
migration_id: str,
|
|
36
|
+
source_profile: str,
|
|
37
|
+
destination_profile: str,
|
|
38
|
+
workspace_mappings: Optional[Dict[str, str]],
|
|
39
|
+
product_batch_size: int,
|
|
40
|
+
result_batch_size: int,
|
|
41
|
+
) -> MigrationOutcome:
|
|
42
|
+
"""Discover source resources, synchronize workspaces, then migrate resources.
|
|
43
|
+
|
|
44
|
+
Each resource type is a service task (see :func:`service_task`). Submitted
|
|
45
|
+
service tasks run in parallel; pass ``wait_for`` to sequence them.
|
|
46
|
+
|
|
47
|
+
Args:
|
|
48
|
+
migration_id: Migration that scopes task cache keys.
|
|
49
|
+
source_profile: Name of the source profile.
|
|
50
|
+
destination_profile: Name of the destination profile.
|
|
51
|
+
workspace_mappings: Source to destination workspace names; all by name when None.
|
|
52
|
+
product_batch_size: Products per migration task.
|
|
53
|
+
result_batch_size: Results, with their steps, per migration task.
|
|
54
|
+
"""
|
|
55
|
+
workspaces = list(workspace_mappings) if workspace_mappings is not None else None
|
|
56
|
+
discovery = discover_flow(migration_id, source_profile, workspaces)
|
|
57
|
+
mapping = synchronize_workspaces_task(
|
|
58
|
+
migration_id, destination_profile, discovery.workspaces, workspace_mappings
|
|
59
|
+
)
|
|
60
|
+
test_monitor = migrate_test_monitor_task.submit(
|
|
61
|
+
migration_id,
|
|
62
|
+
source_profile,
|
|
63
|
+
destination_profile,
|
|
64
|
+
mapping,
|
|
65
|
+
discovery.test_monitor,
|
|
66
|
+
product_batch_size,
|
|
67
|
+
result_batch_size,
|
|
68
|
+
)
|
|
69
|
+
return MigrationOutcome(
|
|
70
|
+
mapping=mapping, discovery=discovery, test_monitor=test_monitor.result()
|
|
71
|
+
)
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""Service tasks: one Prefect task per resource type that runs its own batch tasks."""
|
|
2
|
+
|
|
3
|
+
import functools
|
|
4
|
+
import sys
|
|
5
|
+
from typing import Any, Callable, List, Optional, ParamSpec, TypeVar, cast
|
|
6
|
+
|
|
7
|
+
from prefect import Task, task
|
|
8
|
+
from prefect.cache_policies import NO_CACHE
|
|
9
|
+
from prefect.futures import PrefectFuture
|
|
10
|
+
from prefect.task_runners import TaskRunner, ThreadPoolTaskRunner
|
|
11
|
+
from prefect.transactions import CommitMode, transaction
|
|
12
|
+
|
|
13
|
+
_P = ParamSpec("_P")
|
|
14
|
+
_R = TypeVar("_R")
|
|
15
|
+
|
|
16
|
+
SERVICE_TASKS: List[Task] = [] # type: ignore[type-arg]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def service_task(name: str) -> Callable[[Callable[_P, _R]], Task[_P, _R]]:
|
|
20
|
+
"""Declare the task that migrates one resource type through batch tasks.
|
|
21
|
+
|
|
22
|
+
The body runs in an eager transaction. By default, nested task results are
|
|
23
|
+
staged in the parent task's transaction and discarded if the parent does not
|
|
24
|
+
finish, so a resumed run would migrate completed batches again. Eager commits
|
|
25
|
+
persist each batch result as soon as that batch finishes.
|
|
26
|
+
|
|
27
|
+
Service tasks are registered so :func:`migration_task_runner` can reserve a
|
|
28
|
+
worker for each one while it waits for its batches.
|
|
29
|
+
|
|
30
|
+
Args:
|
|
31
|
+
name: Prefect task name.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
def decorate(fn: Callable[_P, _R]) -> Task[_P, _R]:
|
|
35
|
+
@functools.wraps(fn)
|
|
36
|
+
def run_eagerly(*args: _P.args, **kwargs: _P.kwargs) -> _R:
|
|
37
|
+
with transaction(commit_mode=CommitMode.EAGER):
|
|
38
|
+
return fn(*args, **kwargs)
|
|
39
|
+
|
|
40
|
+
# Batch tasks are the unit of caching; the service only composes them.
|
|
41
|
+
service: Task[_P, _R] = task(name=name, cache_policy=NO_CACHE)(run_eagerly)
|
|
42
|
+
SERVICE_TASKS.append(service)
|
|
43
|
+
return service
|
|
44
|
+
|
|
45
|
+
return decorate
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def migration_task_runner(batch_workers: Optional[int] = None) -> TaskRunner[PrefectFuture[Any]]:
|
|
49
|
+
"""Return the thread pool for the migration flow.
|
|
50
|
+
|
|
51
|
+
Each running service task holds a worker while it waits for its batches, so
|
|
52
|
+
a pool no larger than the number of services deadlocks. The pool reserves a
|
|
53
|
+
worker per registered service on top of ``batch_workers``.
|
|
54
|
+
|
|
55
|
+
Args:
|
|
56
|
+
batch_workers: Batch tasks that may run at once; unbounded when None,
|
|
57
|
+
regardless of Prefect's thread pool setting.
|
|
58
|
+
"""
|
|
59
|
+
if batch_workers is None:
|
|
60
|
+
max_workers = sys.maxsize
|
|
61
|
+
elif batch_workers < 1:
|
|
62
|
+
raise ValueError("batch_workers must be at least 1")
|
|
63
|
+
else:
|
|
64
|
+
max_workers = len(SERVICE_TASKS) + batch_workers
|
|
65
|
+
# The flow decorator's annotation does not accept ThreadPoolTaskRunner's future type.
|
|
66
|
+
return cast(TaskRunner[PrefectFuture[Any]], ThreadPoolTaskRunner(max_workers=max_workers))
|
|
@@ -69,12 +69,16 @@ def run_discovery(
|
|
|
69
69
|
return discover_flow(run.migration_id, source_profile, workspaces)
|
|
70
70
|
|
|
71
71
|
|
|
72
|
-
def run_migration(
|
|
72
|
+
def run_migration(
|
|
73
|
+
run: MigrationRun,
|
|
74
|
+
metadata: RunMetadata,
|
|
75
|
+
api_url: str,
|
|
76
|
+
) -> MigrationOutcome:
|
|
73
77
|
"""Run the migration flow for a run on a Prefect server.
|
|
74
78
|
|
|
75
79
|
Args:
|
|
76
80
|
run: Migration run that provides the client home and result storage.
|
|
77
|
-
metadata: Persisted run inputs, including profiles and
|
|
81
|
+
metadata: Persisted run inputs, including profiles and batch sizes.
|
|
78
82
|
api_url: Prefect API URL from :func:`prefect_server`.
|
|
79
83
|
"""
|
|
80
84
|
with _run_settings(run, api_url):
|
|
@@ -83,4 +87,6 @@ def run_migration(run: MigrationRun, metadata: RunMetadata, api_url: str) -> Mig
|
|
|
83
87
|
metadata.source_profile,
|
|
84
88
|
metadata.destination_profile,
|
|
85
89
|
metadata.workspace_mappings,
|
|
90
|
+
metadata.product_batch_size,
|
|
91
|
+
metadata.result_batch_size,
|
|
86
92
|
)
|
|
@@ -15,6 +15,8 @@ from slcli.migration.schema import VersionedModel
|
|
|
15
15
|
from slcli.paths import get_state_dir
|
|
16
16
|
|
|
17
17
|
STATE_DIR_ENV = "SLCLI_MIGRATION_STATE_DIR"
|
|
18
|
+
DEFAULT_PRODUCT_BATCH_SIZE = 500
|
|
19
|
+
DEFAULT_RESULT_BATCH_SIZE = 100
|
|
18
20
|
|
|
19
21
|
|
|
20
22
|
class RunMetadata(VersionedModel):
|
|
@@ -30,6 +32,9 @@ class RunMetadata(VersionedModel):
|
|
|
30
32
|
source_profile: str
|
|
31
33
|
destination_profile: str
|
|
32
34
|
workspace_mappings: Optional[Dict[str, str]]
|
|
35
|
+
product_batch_size: int = DEFAULT_PRODUCT_BATCH_SIZE
|
|
36
|
+
result_batch_size: int = DEFAULT_RESULT_BATCH_SIZE
|
|
37
|
+
"""Batch sizes define task cache identity, so a run keeps them for its lifetime."""
|
|
33
38
|
created_at: datetime
|
|
34
39
|
|
|
35
40
|
|
|
@@ -95,6 +100,8 @@ def create_migration_run(
|
|
|
95
100
|
destination_profile: str,
|
|
96
101
|
workspace_mappings: Optional[Dict[str, str]],
|
|
97
102
|
root: Optional[Path] = None,
|
|
103
|
+
product_batch_size: int = DEFAULT_PRODUCT_BATCH_SIZE,
|
|
104
|
+
result_batch_size: int = DEFAULT_RESULT_BATCH_SIZE,
|
|
98
105
|
) -> MigrationRun:
|
|
99
106
|
"""Create a new run directory, readable only by the current user."""
|
|
100
107
|
root = root or get_migration_root()
|
|
@@ -110,6 +117,8 @@ def create_migration_run(
|
|
|
110
117
|
source_profile=source_profile,
|
|
111
118
|
destination_profile=destination_profile,
|
|
112
119
|
workspace_mappings=workspace_mappings,
|
|
120
|
+
product_batch_size=product_batch_size,
|
|
121
|
+
result_batch_size=result_batch_size,
|
|
113
122
|
created_at=datetime.now(timezone.utc),
|
|
114
123
|
)
|
|
115
124
|
)
|