systemlink-cli 3.1.1__tar.gz → 3.3.0__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.1.1 → systemlink_cli-3.3.0}/PKG-INFO +1 -1
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/pyproject.toml +2 -1
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/_version.py +1 -1
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migrate_click.py +1 -1
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/command.py +18 -14
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/connection.py +25 -10
- systemlink_cli-3.3.0/slcli/migration/files/__init__.py +1 -0
- systemlink_cli-3.3.0/slcli/migration/files/client.py +82 -0
- systemlink_cli-3.3.0/slcli/migration/files/discovery.py +96 -0
- systemlink_cli-3.3.0/slcli/migration/files/discovery_task.py +34 -0
- systemlink_cli-3.3.0/slcli/migration/files/models.py +30 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/flows/discover.py +11 -5
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/flows/migrate.py +8 -3
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/summary.py +11 -2
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/testmonitor/client.py +5 -2
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/testmonitor/discovery.py +13 -15
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/testmonitor/discovery_task.py +3 -4
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/workspace_client.py +18 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/workspace_task.py +21 -15
- systemlink_cli-3.3.0/slcli/migration/workspaces.py +164 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/commands.md +5 -1
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/workspace_click.py +6 -6
- systemlink_cli-3.1.1/slcli/migration/workspaces.py +0 -125
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/LICENSE +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/dff-editor/editor.js +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/dff-editor/index.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/__init__.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/__main__.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/alarm_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/asset_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/cli_formatters.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/cli_utils.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/comment_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/completion_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/config.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/config_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/credentials.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/dataframe_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/dff_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/dff_decorators.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/example_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/example_loader.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/example_provisioner.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/README.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/_schema/schema-v1.0.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/demo-data-1/README.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/demo-data-1/config.yaml +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/demo-data-2/README.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/demo-data-2/config.yaml +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/demo-data-3/config.yaml +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/demo-data-3/leakage-current-results.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/demo-data-3/overvoltage-results.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/demo-data-3/product-xyz-compliance-report.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/demo-data-3/product-xyz-specification.csv +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/demo-data-3/thermal-response-results.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/exercise-5-1-parametric-insights/README.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/exercise-5-1-parametric-insights/config.yaml +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/exercise-7-1-test-plans/README.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/exercise-7-1-test-plans/config.yaml +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/spec-compliance-notebooks/README.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/spec-compliance-notebooks/config.yaml +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/spec-compliance-notebooks/notebooks/SpecAnalysis_ComplianceCalculation.ipynb +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/spec-compliance-notebooks/notebooks/SpecComplianceCalculation.ipynb +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/spec-compliance-notebooks/notebooks/SpecfileExtractionAndIngestion.ipynb +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/examples/spec-compliance-notebooks/spec_template.xlsx +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/feed_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/file_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/function_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/function_templates.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/main.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/managed_client/__init__.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/managed_client/crypto.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/managed_client/handlers.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/managed_client/minion.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/managed_client/models.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/managed_client/protocol.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/managed_client/rest.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/managed_client/state.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/managed_client/transport.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/managed_client_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/mcp_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/mcp_reachability.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/mcp_server.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/mcp_skills.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/__init__.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/annotations.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/api.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/flows/__init__.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/flows/batching.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/flows/service.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/orchestration.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/prefect_server.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/schema.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/state.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/testmonitor/__init__.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/testmonitor/migration.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/testmonitor/migration_task.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/testmonitor/models.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/testmonitor/records.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/migration/testmonitor/writer.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/notebook_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/paths.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/pkce.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/platform.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/policy_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/policy_utils.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/profile_credentials.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/profiles.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/response_handlers.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/rich_output.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/routine_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skill_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/SKILL.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/evals/COPILOT_BATCH_RUN_PROMPT.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/evals/README.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/evals/evals.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/evals/evals.schema.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/evals/files/spec-import/battery-specs.csv +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/evals/files/webapp-package/icon.svg +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/evals/files/webapp-package/nipkg.config.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/evals/files/webapp-package/webapp-content/index.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/evals/trigger_evals.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/analysis-recipes.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/datasheet-workflow.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/domain-concepts.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/example-authoring.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/filtering.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/import-specs.min.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/job-debugging/overview.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/nipkg/overview.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/notebook/interfaces.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/notebook/notebook-patterns.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/notebook/overview.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/python-test/overview.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/routine-examples.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/troubleshooting.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/webapp/angular-ui-packages.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/webapp/deployment.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/webapp/layout-patterns.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/webapp/nimble-angular.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/webapp/overview.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/webapp/systemlink-services.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/webapp/troubleshooting.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/scripts/benchmark_iteration.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/scripts/compare_iteration.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/scripts/eval_manifest.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/scripts/grade_eval_response.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/scripts/grade_iteration.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/scripts/prepare_eval_prompts.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/scripts/prepare_eval_workspace.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/scripts/render_eval_review.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/scripts/spec_import_helper.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/spec_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/ssl_trust.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/state_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/system_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/system_query_utils.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/systemlink-logo.svg +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/table_utils.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/tag_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/templates_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/testmonitor_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/universal_handlers.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/user_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/utils.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/version_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/web_editor.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_bootstrap.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/.gitignore +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/README.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/angular.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/package.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/scripts/filter-sbom.js +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/app-routing.module.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/app.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/app.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/app.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/app.module.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/core/layout/app-shell.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/core/layout/app-shell.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/core/layout/app-shell.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/core/state/app-view-state.service.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/core/systemlink/systemlink-context.service.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/core/systemlink/systemlink-locale.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/core/systemlink/theme-sync.service.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/core/systemlink/webapp-home-data.service.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/assets/assets-page.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/assets/assets-page.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/assets/assets-page.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/datasets/datasets-page.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/datasets/datasets-page.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/datasets/datasets-page.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/home/home-page.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/home/home-page.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/home/home-page.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/master-detail/master-detail-page.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/master-detail/master-detail-page.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/master-detail/master-detail-page.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/operations/operations-page.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/operations/operations-page.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/operations/operations-page.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/settings/settings-page.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/settings/settings-page.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/settings/settings-page.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/shared/components/empty-state.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/shared/components/empty-state.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/shared/components/empty-state.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/shared/components/error-banner.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/shared/components/error-banner.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/shared/components/error-banner.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/shared/components/loading-state.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/shared/components/loading-state.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/shared/components/loading-state.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/shared/states/view-state.model.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/assets/README.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/index.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/locale/messages.de.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/locale/messages.en.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/locale/messages.es.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/locale/messages.fr.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/locale/messages.ja.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/locale/messages.ko.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/locale/messages.zh.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/localize.d.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/main.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/styles.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/tsconfig.app.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/tsconfig.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/workflow_preview.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/workflows_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/workitem_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.3.0}/slcli/workspace_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "systemlink-cli"
|
|
3
|
-
version = "3.
|
|
3
|
+
version = "3.3.0"
|
|
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" }]
|
|
@@ -114,6 +114,7 @@ filterwarnings = [
|
|
|
114
114
|
markers = [
|
|
115
115
|
"e2e: marks tests as end-to-end tests (not run by default)",
|
|
116
116
|
"e2e_migration: marks migration end-to-end tests",
|
|
117
|
+
"e2e_migration_manual: marks opt-in migration E2E tests that must be run against a throw-away destination",
|
|
117
118
|
"full_os_client_matrix: marks tests requiring full supported-OS client coverage",
|
|
118
119
|
"slow: marks tests as slow running",
|
|
119
120
|
"notebook: marks tests as notebook-related",
|
|
@@ -97,7 +97,7 @@ def register_migrate_command(cli: click.Group) -> None:
|
|
|
97
97
|
"Comma-delimited SOURCE or SOURCE:DESTINATION workspace mappings. "
|
|
98
98
|
"Escape ',' or ':' in a workspace name with a backslash, for example Lab\\:A:Dest. "
|
|
99
99
|
"Only the listed source workspaces are migrated; all when omitted. "
|
|
100
|
-
"
|
|
100
|
+
"Missing destination workspaces are created unless the destination profile is readonly."
|
|
101
101
|
),
|
|
102
102
|
)
|
|
103
103
|
@click.option("--migration-id", help="Resume an existing migration.")
|
|
@@ -12,6 +12,7 @@ import requests
|
|
|
12
12
|
|
|
13
13
|
from slcli._version import __version__
|
|
14
14
|
from slcli.migration.connection import MigrationConnection, resolve_migration_connection
|
|
15
|
+
from slcli.migration.files.models import FileDiscovery
|
|
15
16
|
from slcli.migration.orchestration import prefect_server, run_migration
|
|
16
17
|
from slcli.migration.state import (
|
|
17
18
|
DEFAULT_PRODUCT_BATCH_SIZE,
|
|
@@ -70,8 +71,11 @@ def resume_migration(migration_id: str, prefect_api_url: Optional[str]) -> None:
|
|
|
70
71
|
_migrate(run, metadata, source, destination, prefect_api_url)
|
|
71
72
|
|
|
72
73
|
|
|
73
|
-
def _all_workspaces_failed(discovery: TestMonitorDiscovery) -> bool:
|
|
74
|
-
return
|
|
74
|
+
def _all_workspaces_failed(discovery: TestMonitorDiscovery, files: FileDiscovery) -> bool:
|
|
75
|
+
return any(
|
|
76
|
+
bool(resource.workspaces) and len(resource.failures) == len(resource.workspaces)
|
|
77
|
+
for resource in (discovery, files)
|
|
78
|
+
)
|
|
75
79
|
|
|
76
80
|
|
|
77
81
|
def _echo_connections(source: MigrationConnection, destination: MigrationConnection) -> None:
|
|
@@ -85,15 +89,11 @@ def _echo_connections(source: MigrationConnection, destination: MigrationConnect
|
|
|
85
89
|
)
|
|
86
90
|
|
|
87
91
|
|
|
88
|
-
def _mapping_error(
|
|
89
|
-
exc: WorkspaceMappingError, workspace_mappings: Optional[Dict[str, str]]
|
|
90
|
-
) -> click.ClickException:
|
|
91
|
-
# TODO(AB#4088608): Synchronize workspaces will create missing destination workspaces.
|
|
92
|
+
def _mapping_error(exc: WorkspaceMappingError) -> click.ClickException:
|
|
92
93
|
hint = (
|
|
93
|
-
"
|
|
94
|
-
if
|
|
95
|
-
else "
|
|
96
|
-
"--workspace-mappings. Destination workspaces are not created by migration."
|
|
94
|
+
"Check that the requested source workspaces exist."
|
|
95
|
+
if exc.missing_source
|
|
96
|
+
else "Check destination workspace access and retry."
|
|
97
97
|
)
|
|
98
98
|
return click.ClickException(f"{exc}. {hint}")
|
|
99
99
|
|
|
@@ -147,7 +147,7 @@ def _migrate(
|
|
|
147
147
|
outcome = run_migration(run, metadata, api_url)
|
|
148
148
|
except WorkspaceMappingError as exc:
|
|
149
149
|
_log_failure(exc, log_path)
|
|
150
|
-
raise _mapping_error(exc
|
|
150
|
+
raise _mapping_error(exc) from exc
|
|
151
151
|
except requests.RequestException as exc:
|
|
152
152
|
_log_failure(exc, log_path)
|
|
153
153
|
handle_api_error(exc)
|
|
@@ -163,20 +163,24 @@ def _migrate(
|
|
|
163
163
|
],
|
|
164
164
|
)
|
|
165
165
|
test_monitor = outcome.discovery.test_monitor
|
|
166
|
+
files = outcome.discovery.files
|
|
166
167
|
migration = outcome.test_monitor
|
|
167
168
|
failed = len(failed_items(migration.products)) + len(failed_items(migration.results))
|
|
168
169
|
_logger.info(
|
|
169
|
-
"Migration completed: products=%d results=%d failed_workspaces=%s
|
|
170
|
+
"Migration completed: products=%d results=%d files=%d failed_workspaces=%s "
|
|
171
|
+
"failed_file_workspaces=%s failed_items=%d",
|
|
170
172
|
len(test_monitor.products),
|
|
171
173
|
len(test_monitor.results),
|
|
174
|
+
len(files.files),
|
|
172
175
|
[failure.workspace for failure in test_monitor.failures],
|
|
176
|
+
[failure.workspace for failure in files.failures],
|
|
173
177
|
failed,
|
|
174
178
|
)
|
|
175
179
|
click.echo(format_workspace_mapping(outcome.mapping))
|
|
176
|
-
click.echo(format_summary(test_monitor))
|
|
180
|
+
click.echo(format_summary(test_monitor, files))
|
|
177
181
|
click.echo(format_migration_summary(migration))
|
|
178
182
|
click.echo(f"Log: {log_path}")
|
|
179
|
-
if _all_workspaces_failed(test_monitor):
|
|
183
|
+
if _all_workspaces_failed(test_monitor, files):
|
|
180
184
|
raise click.ClickException("Discovery failed for every workspace.")
|
|
181
185
|
if failed:
|
|
182
186
|
raise click.ClickException(f"{failed} items failed to migrate.")
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import logging
|
|
4
4
|
from dataclasses import dataclass, field
|
|
5
5
|
from types import TracebackType
|
|
6
|
-
from typing import Any, Dict, Optional, Union
|
|
6
|
+
from typing import Any, Dict, Iterable, Optional, Union
|
|
7
7
|
|
|
8
8
|
import click
|
|
9
9
|
import requests
|
|
@@ -54,15 +54,16 @@ class LoggingRetry(Retry):
|
|
|
54
54
|
return retry
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
_QUERY_RETRY = LoggingRetry(
|
|
57
|
+
_DEFAULT_RETRY = LoggingRetry(
|
|
59
58
|
total=5,
|
|
60
59
|
backoff_factor=0.5,
|
|
61
60
|
status_forcelist=(429, 500, 502, 503, 504),
|
|
62
|
-
allowed_methods=frozenset({"GET"
|
|
61
|
+
allowed_methods=frozenset({"GET"}),
|
|
63
62
|
respect_retry_after_header=True,
|
|
64
63
|
raise_on_status=False,
|
|
65
64
|
)
|
|
65
|
+
# Policy for read-only queries, including POST query endpoints, which are safe to replay.
|
|
66
|
+
_QUERY_RETRY = _DEFAULT_RETRY.new(allowed_methods=frozenset({"GET", "POST"}))
|
|
66
67
|
|
|
67
68
|
# Policy for destination writes. Only failures where the server did not process the
|
|
68
69
|
# request are retried: refused connections and explicit 429/503 back-pressure. Read
|
|
@@ -96,16 +97,30 @@ class _ProfileSession(requests.Session):
|
|
|
96
97
|
|
|
97
98
|
@dataclass(frozen=True)
|
|
98
99
|
class MigrationConnection:
|
|
99
|
-
"""Endpoint, authentication, and
|
|
100
|
+
"""Endpoint, authentication, TLS, and read-only settings from a named profile."""
|
|
100
101
|
|
|
101
102
|
profile_name: str
|
|
102
103
|
base_url: str
|
|
103
104
|
headers: Dict[str, str] = field(repr=False)
|
|
104
105
|
ssl_verify: Union[bool, str] = True
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
readonly: bool = False
|
|
107
|
+
|
|
108
|
+
def create_session(self, query_paths: Iterable[str] = ()) -> requests.Session:
|
|
109
|
+
"""Return a session bound to this connection's credentials and TLS.
|
|
110
|
+
|
|
111
|
+
Requests are matched to a retry policy by URL prefix. URLs under any
|
|
112
|
+
``query_paths`` entry use the query policy, which replays POST requests.
|
|
113
|
+
All other URLs use the default policy, which never replays POST requests.
|
|
114
|
+
|
|
115
|
+
Args:
|
|
116
|
+
query_paths: Route prefixes relative to ``base_url`` whose POST requests
|
|
117
|
+
are read-only queries, such as ``"nitestmonitor/v2/query-"``.
|
|
118
|
+
"""
|
|
119
|
+
session = self._session(_DEFAULT_RETRY)
|
|
120
|
+
base = self.base_url.rstrip("/")
|
|
121
|
+
for path in query_paths:
|
|
122
|
+
session.mount(f"{base}/{path.lstrip('/')}", HTTPAdapter(max_retries=_QUERY_RETRY))
|
|
123
|
+
return session
|
|
109
124
|
|
|
110
125
|
def create_write_session(self) -> requests.Session:
|
|
111
126
|
"""Return a session for non-idempotent writes that never replays ambiguous failures."""
|
|
@@ -157,4 +172,4 @@ def resolve_migration_connection(
|
|
|
157
172
|
if auth is None:
|
|
158
173
|
raise click.ClickException(f"Profile '{profile.name}' does not define an API key")
|
|
159
174
|
headers = get_auth_headers(auth.value, auth.scheme)
|
|
160
|
-
return MigrationConnection(profile.name, base_url, headers, ssl_verify)
|
|
175
|
+
return MigrationConnection(profile.name, base_url, headers, ssl_verify, profile.readonly)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""SLS file migration support."""
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""Profile-bound SLS file queries for migration discovery."""
|
|
2
|
+
|
|
3
|
+
from collections.abc import Iterator
|
|
4
|
+
from typing import Any, Dict, List, Optional
|
|
5
|
+
|
|
6
|
+
import requests
|
|
7
|
+
|
|
8
|
+
from slcli.migration.api import REQUEST_TIMEOUT_SECONDS, ApiModel
|
|
9
|
+
from slcli.migration.connection import MigrationConnection
|
|
10
|
+
|
|
11
|
+
PAGE_SIZE = 1000
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class SourceFile(ApiModel):
|
|
15
|
+
"""An SLS file. Its name is stored in the ``Name`` property."""
|
|
16
|
+
|
|
17
|
+
id: str
|
|
18
|
+
properties: Dict[str, Any] = {}
|
|
19
|
+
size: Optional[int] = None
|
|
20
|
+
size64: Optional[int] = None
|
|
21
|
+
|
|
22
|
+
@property
|
|
23
|
+
def name(self) -> Optional[str]:
|
|
24
|
+
"""The file name, or None when the server did not provide one."""
|
|
25
|
+
value = self.properties.get("Name")
|
|
26
|
+
return value if isinstance(value, str) and value else None
|
|
27
|
+
|
|
28
|
+
@property
|
|
29
|
+
def size_bytes(self) -> Optional[int]:
|
|
30
|
+
"""The file size in bytes, preferring the 64-bit field."""
|
|
31
|
+
# size == -1 means the file is larger than a 32-bit value can hold.
|
|
32
|
+
if self.size64 is not None and self.size64 >= 0:
|
|
33
|
+
return self.size64
|
|
34
|
+
if self.size is not None and self.size >= 0:
|
|
35
|
+
return self.size
|
|
36
|
+
return None
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class _FilePage(ApiModel):
|
|
40
|
+
available_files: List[SourceFile] = []
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class FilesClient:
|
|
44
|
+
"""Query SLS files using one profile-bound migration connection."""
|
|
45
|
+
|
|
46
|
+
def __init__(
|
|
47
|
+
self,
|
|
48
|
+
connection: MigrationConnection,
|
|
49
|
+
session: Optional[requests.Session] = None,
|
|
50
|
+
) -> None:
|
|
51
|
+
"""Initialize a file query client."""
|
|
52
|
+
self._base_url = f"{connection.base_url}/nifile/v1/service-groups/Default"
|
|
53
|
+
self._session = session or connection.create_session(
|
|
54
|
+
("nifile/v1/service-groups/Default/query-files",)
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
def query_files(self, workspace_id: str) -> Iterator[SourceFile]:
|
|
58
|
+
"""Yield every file in one workspace, paging with skip/take.
|
|
59
|
+
|
|
60
|
+
The server caps ``take`` at ``PAGE_SIZE`` and returns no continuation
|
|
61
|
+
token, so a page shorter than ``PAGE_SIZE`` marks the last page.
|
|
62
|
+
"""
|
|
63
|
+
skip = 0
|
|
64
|
+
while True:
|
|
65
|
+
params: Dict[str, Any] = {
|
|
66
|
+
"skip": skip,
|
|
67
|
+
"take": PAGE_SIZE,
|
|
68
|
+
"workspace": workspace_id,
|
|
69
|
+
}
|
|
70
|
+
response = self._session.post(
|
|
71
|
+
f"{self._base_url}/query-files",
|
|
72
|
+
params=params,
|
|
73
|
+
json={},
|
|
74
|
+
timeout=REQUEST_TIMEOUT_SECONDS,
|
|
75
|
+
)
|
|
76
|
+
response.raise_for_status()
|
|
77
|
+
page = _FilePage.model_validate(response.json())
|
|
78
|
+
yield from page.available_files
|
|
79
|
+
|
|
80
|
+
if len(page.available_files) < PAGE_SIZE:
|
|
81
|
+
return
|
|
82
|
+
skip += PAGE_SIZE
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"""File discovery and workspace assignment policy."""
|
|
2
|
+
|
|
3
|
+
import logging
|
|
4
|
+
import secrets
|
|
5
|
+
from collections import Counter
|
|
6
|
+
from typing import Dict, Iterable, List, Protocol, Set
|
|
7
|
+
|
|
8
|
+
from slcli.migration.files.client import SourceFile
|
|
9
|
+
from slcli.migration.files.models import DiscoveredFile, FileDiscovery
|
|
10
|
+
from slcli.migration.testmonitor.models import WorkspaceFailure
|
|
11
|
+
from slcli.migration.workspaces import DiscoveredWorkspaces
|
|
12
|
+
|
|
13
|
+
_logger = logging.getLogger(__name__)
|
|
14
|
+
_OBJECT_ID_BYTES = 12
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class FilesQuery(Protocol):
|
|
18
|
+
"""Queries required by file discovery."""
|
|
19
|
+
|
|
20
|
+
def query_files(self, workspace_id: str) -> Iterable[SourceFile]:
|
|
21
|
+
"""Return every file in one workspace."""
|
|
22
|
+
...
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def discover_files(
|
|
26
|
+
client: FilesQuery,
|
|
27
|
+
workspaces: DiscoveredWorkspaces,
|
|
28
|
+
) -> FileDiscovery:
|
|
29
|
+
"""Discover files in the selected workspaces.
|
|
30
|
+
|
|
31
|
+
A workspace that fails discovery is logged and contributes no files.
|
|
32
|
+
|
|
33
|
+
Args:
|
|
34
|
+
client: File queries for the source server.
|
|
35
|
+
workspaces: Discovered source workspaces.
|
|
36
|
+
"""
|
|
37
|
+
sorted_selected = tuple(sorted(workspaces.selected))
|
|
38
|
+
|
|
39
|
+
files: List[DiscoveredFile] = []
|
|
40
|
+
failures: List[WorkspaceFailure] = []
|
|
41
|
+
for workspace_name in sorted_selected:
|
|
42
|
+
try:
|
|
43
|
+
source_files = list(client.query_files(workspaces.source[workspace_name].id))
|
|
44
|
+
files.extend(
|
|
45
|
+
DiscoveredFile(
|
|
46
|
+
id=file.id,
|
|
47
|
+
workspace=workspace_name,
|
|
48
|
+
name=file.name,
|
|
49
|
+
size_bytes=file.size_bytes,
|
|
50
|
+
)
|
|
51
|
+
for file in source_files
|
|
52
|
+
)
|
|
53
|
+
except Exception as exc:
|
|
54
|
+
_logger.warning(
|
|
55
|
+
"Workspace %s file discovery failed: %s: %s",
|
|
56
|
+
workspace_name,
|
|
57
|
+
type(exc).__name__,
|
|
58
|
+
exc,
|
|
59
|
+
)
|
|
60
|
+
failures.append(
|
|
61
|
+
WorkspaceFailure(workspace=workspace_name, error_type=type(exc).__name__)
|
|
62
|
+
)
|
|
63
|
+
continue
|
|
64
|
+
|
|
65
|
+
_throw_if_duplicate_ids(files)
|
|
66
|
+
return FileDiscovery(
|
|
67
|
+
workspaces=sorted_selected,
|
|
68
|
+
files=tuple(sorted(files, key=lambda item: (item.workspace, item.id))),
|
|
69
|
+
source_to_destination_id_map=_generate_file_id_mappings(file.id for file in files),
|
|
70
|
+
failures=tuple(sorted(failures, key=lambda item: item.workspace)),
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def _throw_if_duplicate_ids(file_ids: Iterable[DiscoveredFile]) -> None:
|
|
75
|
+
counts = Counter(file.id for file in file_ids)
|
|
76
|
+
duplicates = [fid for fid, count in counts.items() if count > 1]
|
|
77
|
+
if duplicates:
|
|
78
|
+
raise ValueError(f"Duplicate SLS file IDs found: {', '.join(duplicates)}")
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def _generate_file_id_mappings(source_ids: Iterable[str]) -> Dict[str, str]:
|
|
82
|
+
"""Map each SLS file ID to a new, unique ID suitable for the destination file ingestion service.
|
|
83
|
+
|
|
84
|
+
Generated IDs are unique, 24-character hex strings (Mongo ObjectIds are 12-byte BSON).
|
|
85
|
+
"""
|
|
86
|
+
taken: Set[str] = set(source_ids)
|
|
87
|
+
mapping: Dict[str, str] = {}
|
|
88
|
+
# Since file IDs are 12 bytes rather than 16 (like typical GUIDs), collisions are more likely.
|
|
89
|
+
# To be safe, we check for collisions and retry generation as needed.
|
|
90
|
+
for source_id in sorted(taken):
|
|
91
|
+
new_id = secrets.token_hex(_OBJECT_ID_BYTES)
|
|
92
|
+
while new_id in taken:
|
|
93
|
+
new_id = secrets.token_hex(_OBJECT_ID_BYTES)
|
|
94
|
+
taken.add(new_id)
|
|
95
|
+
mapping[source_id] = new_id
|
|
96
|
+
return mapping
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""Persisted Prefect task for SLS file discovery."""
|
|
2
|
+
|
|
3
|
+
from prefect import task
|
|
4
|
+
from prefect.cache_policies import INPUTS, TASK_SOURCE
|
|
5
|
+
|
|
6
|
+
from slcli.migration.connection import resolve_migration_connection
|
|
7
|
+
from slcli.migration.files.client import FilesClient
|
|
8
|
+
from slcli.migration.files.discovery import discover_files
|
|
9
|
+
from slcli.migration.files.models import FileDiscovery
|
|
10
|
+
from slcli.migration.workspaces import DiscoveredWorkspaces
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@task(
|
|
14
|
+
name="discover-files",
|
|
15
|
+
persist_result=True,
|
|
16
|
+
result_serializer="json",
|
|
17
|
+
cache_result_in_memory=False,
|
|
18
|
+
cache_policy=TASK_SOURCE + INPUTS,
|
|
19
|
+
)
|
|
20
|
+
def discover_files_task(
|
|
21
|
+
migration_id: str,
|
|
22
|
+
source_profile: str,
|
|
23
|
+
workspaces: DiscoveredWorkspaces,
|
|
24
|
+
) -> FileDiscovery:
|
|
25
|
+
"""Discover SLS files in the discovered source workspaces.
|
|
26
|
+
|
|
27
|
+
Inputs are references, never credentials. ``migration_id`` is unused by the
|
|
28
|
+
body but scopes the cache key to one migration.
|
|
29
|
+
"""
|
|
30
|
+
connection = resolve_migration_connection(source_profile)
|
|
31
|
+
return discover_files(
|
|
32
|
+
FilesClient(connection),
|
|
33
|
+
workspaces,
|
|
34
|
+
)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""Versioned compact models for SLS file discovery."""
|
|
2
|
+
|
|
3
|
+
from typing import Dict, Optional, Tuple
|
|
4
|
+
|
|
5
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
6
|
+
|
|
7
|
+
from slcli.migration.schema import VersionedModel
|
|
8
|
+
from slcli.migration.testmonitor.models import WorkspaceFailure
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class _Persisted(BaseModel):
|
|
12
|
+
model_config = ConfigDict(frozen=True)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class DiscoveredFile(_Persisted):
|
|
16
|
+
"""Compact file metadata needed by later migration stages."""
|
|
17
|
+
|
|
18
|
+
id: str
|
|
19
|
+
workspace: str
|
|
20
|
+
name: Optional[str] = None
|
|
21
|
+
size_bytes: Optional[int] = None
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class FileDiscovery(_Persisted, VersionedModel):
|
|
25
|
+
"""Successful partial file discovery plus isolated workspace failures."""
|
|
26
|
+
|
|
27
|
+
workspaces: Tuple[str, ...] = ()
|
|
28
|
+
files: Tuple[DiscoveredFile, ...] = ()
|
|
29
|
+
source_to_destination_id_map: Dict[str, str] = Field(default_factory=dict)
|
|
30
|
+
failures: Tuple[WorkspaceFailure, ...] = ()
|
|
@@ -5,6 +5,8 @@ from typing import List, Optional
|
|
|
5
5
|
from prefect import flow
|
|
6
6
|
from pydantic import ConfigDict
|
|
7
7
|
|
|
8
|
+
from slcli.migration.files.discovery_task import discover_files_task
|
|
9
|
+
from slcli.migration.files.models import FileDiscovery
|
|
8
10
|
from slcli.migration.schema import VersionedModel
|
|
9
11
|
from slcli.migration.testmonitor.discovery_task import discover_test_monitor_task
|
|
10
12
|
from slcli.migration.testmonitor.models import TestMonitorDiscovery
|
|
@@ -18,6 +20,7 @@ class MigrationDiscovery(VersionedModel):
|
|
|
18
20
|
model_config = ConfigDict(frozen=True)
|
|
19
21
|
|
|
20
22
|
workspaces: DiscoveredWorkspaces
|
|
23
|
+
files: FileDiscovery
|
|
21
24
|
test_monitor: TestMonitorDiscovery
|
|
22
25
|
|
|
23
26
|
|
|
@@ -30,20 +33,23 @@ class MigrationDiscovery(VersionedModel):
|
|
|
30
33
|
def discover_flow(
|
|
31
34
|
migration_id: str,
|
|
32
35
|
source_profile: str,
|
|
33
|
-
|
|
36
|
+
explicit_workspace_selection: Optional[List[str]],
|
|
34
37
|
) -> MigrationDiscovery:
|
|
35
38
|
"""Discover source workspaces, then each supported resource type within them.
|
|
36
39
|
|
|
37
40
|
Args:
|
|
38
41
|
migration_id: Migration that scopes task cache keys.
|
|
39
42
|
source_profile: Name of the source profile.
|
|
40
|
-
|
|
43
|
+
explicit_workspace_selection: Source workspace names to discover; all workspaces when None.
|
|
41
44
|
|
|
42
45
|
Raises:
|
|
43
46
|
WorkspaceMappingError: If a requested workspace does not exist on the source.
|
|
44
47
|
"""
|
|
45
|
-
|
|
48
|
+
workspaces = discover_workspaces_task(
|
|
49
|
+
migration_id, source_profile, explicit_workspace_selection
|
|
50
|
+
)
|
|
46
51
|
return MigrationDiscovery(
|
|
47
|
-
workspaces=
|
|
48
|
-
|
|
52
|
+
workspaces=workspaces,
|
|
53
|
+
files=discover_files_task(migration_id, source_profile, workspaces),
|
|
54
|
+
test_monitor=discover_test_monitor_task(migration_id, source_profile, workspaces),
|
|
49
55
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Migration flow: discover, synchronize workspaces, then migrate each resource type."""
|
|
2
2
|
|
|
3
|
-
from typing import Dict, Optional
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
4
|
|
|
5
5
|
from prefect import flow
|
|
6
6
|
from pydantic import ConfigDict
|
|
@@ -51,9 +51,14 @@ def migrate_flow(
|
|
|
51
51
|
workspace_mappings: Source to destination workspace names; all by name when None.
|
|
52
52
|
product_batch_size: Products per migration task.
|
|
53
53
|
result_batch_size: Results, with their steps, per migration task.
|
|
54
|
+
|
|
55
|
+
Raises:
|
|
56
|
+
WorkspaceMappingError: If a source workspace does not exist.
|
|
54
57
|
"""
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
explicit_workspace_selection: Optional[List[str]] = (
|
|
59
|
+
list(workspace_mappings) if workspace_mappings is not None else None
|
|
60
|
+
)
|
|
61
|
+
discovery = discover_flow(migration_id, source_profile, explicit_workspace_selection)
|
|
57
62
|
mapping = synchronize_workspaces_task(
|
|
58
63
|
migration_id, destination_profile, discovery.workspaces, workspace_mappings
|
|
59
64
|
)
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from typing import List, Sequence
|
|
4
4
|
|
|
5
|
+
from slcli.migration.files.models import FileDiscovery
|
|
5
6
|
from slcli.migration.testmonitor.models import BatchResult, FailedItem, TestMonitorDiscovery
|
|
6
7
|
from slcli.migration.testmonitor.models import TestMonitorMigration
|
|
7
8
|
from slcli.migration.workspaces import WorkspaceMapping
|
|
@@ -22,8 +23,8 @@ def format_workspace_mapping(mapping: WorkspaceMapping) -> str:
|
|
|
22
23
|
)
|
|
23
24
|
|
|
24
25
|
|
|
25
|
-
def format_summary(discovery: TestMonitorDiscovery) -> str:
|
|
26
|
-
"""Return deterministic
|
|
26
|
+
def format_summary(discovery: TestMonitorDiscovery, files: FileDiscovery) -> str:
|
|
27
|
+
"""Return deterministic discovery counts and failures."""
|
|
27
28
|
lines = [
|
|
28
29
|
"Test Monitor discovery:",
|
|
29
30
|
f" Products: {len(discovery.products)}",
|
|
@@ -33,6 +34,14 @@ def format_summary(discovery: TestMonitorDiscovery) -> str:
|
|
|
33
34
|
]
|
|
34
35
|
if discovery.failures:
|
|
35
36
|
lines.append(" Product workspaces were inferred without the failed workspaces.")
|
|
37
|
+
lines.extend(
|
|
38
|
+
[
|
|
39
|
+
"File discovery:",
|
|
40
|
+
f" Files: {len(files.files)}",
|
|
41
|
+
f" Failed workspaces: {len(files.failures)}",
|
|
42
|
+
*(f" {failure.workspace}: {failure.error_type}" for failure in files.failures),
|
|
43
|
+
]
|
|
44
|
+
)
|
|
36
45
|
return "\n".join(lines)
|
|
37
46
|
|
|
38
47
|
|
|
@@ -10,6 +10,9 @@ from slcli.migration.api import REQUEST_TIMEOUT_SECONDS, ApiModel
|
|
|
10
10
|
from slcli.migration.connection import MigrationConnection
|
|
11
11
|
|
|
12
12
|
PAGE_SIZE = 1000
|
|
13
|
+
TEST_MONITOR_BASE_PATH = "nitestmonitor/v2"
|
|
14
|
+
# POST query-products and query-results are read-only, so their retries are safe.
|
|
15
|
+
TEST_MONITOR_QUERY_PATHS = (f"{TEST_MONITOR_BASE_PATH}/query-",)
|
|
13
16
|
|
|
14
17
|
|
|
15
18
|
class Product(ApiModel):
|
|
@@ -94,8 +97,8 @@ class TestMonitorClient:
|
|
|
94
97
|
session: Optional[requests.Session] = None,
|
|
95
98
|
) -> None:
|
|
96
99
|
"""Initialize a Test Monitor query client."""
|
|
97
|
-
self._base_url = f"{connection.base_url}/
|
|
98
|
-
self._session = session or connection.create_session()
|
|
100
|
+
self._base_url = f"{connection.base_url}/{TEST_MONITOR_BASE_PATH}"
|
|
101
|
+
self._session = session or connection.create_session(TEST_MONITOR_QUERY_PATHS)
|
|
99
102
|
|
|
100
103
|
def query_products(self) -> Iterator[Product]:
|
|
101
104
|
"""Yield every product."""
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import logging
|
|
4
4
|
from dataclasses import dataclass, field
|
|
5
5
|
from typing import (
|
|
6
|
-
Collection,
|
|
7
6
|
Dict,
|
|
8
7
|
Iterable,
|
|
9
8
|
List,
|
|
@@ -19,6 +18,7 @@ from slcli.migration.testmonitor.models import (
|
|
|
19
18
|
TestMonitorDiscovery,
|
|
20
19
|
WorkspaceFailure,
|
|
21
20
|
)
|
|
21
|
+
from slcli.migration.workspaces import DiscoveredWorkspaces
|
|
22
22
|
|
|
23
23
|
DEFAULT_WORKSPACE = "Default"
|
|
24
24
|
_logger = logging.getLogger(__name__)
|
|
@@ -88,8 +88,7 @@ def infer_product_workspace(
|
|
|
88
88
|
|
|
89
89
|
def discover_test_monitor(
|
|
90
90
|
client: TestMonitorSource,
|
|
91
|
-
|
|
92
|
-
selected_workspaces: Optional[Collection[str]] = None,
|
|
91
|
+
workspaces: DiscoveredWorkspaces,
|
|
93
92
|
) -> TestMonitorDiscovery:
|
|
94
93
|
"""Discover products and terminal results owned by the selected workspaces.
|
|
95
94
|
|
|
@@ -102,19 +101,18 @@ def discover_test_monitor(
|
|
|
102
101
|
|
|
103
102
|
Args:
|
|
104
103
|
client: Test Monitor queries for the source server.
|
|
105
|
-
|
|
106
|
-
selected_workspaces: Workspace names to discover; all workspaces when None.
|
|
104
|
+
workspaces: Discovered source workspaces.
|
|
107
105
|
"""
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
scan = _scan_results(
|
|
114
|
-
client, {name: id_ for name, id_ in all_workspaces.items() if name in selected}
|
|
115
|
-
)
|
|
106
|
+
selected_name_to_id_map = {
|
|
107
|
+
w.name: w.id for w in workspaces.source.values() if w.name in workspaces.selected
|
|
108
|
+
}
|
|
109
|
+
scan = _scan_results(client, selected_name_to_id_map)
|
|
110
|
+
all_workspaces_selected = len(workspaces.selected) == len(workspaces.source)
|
|
116
111
|
migrate_products_with_no_results = (
|
|
117
|
-
|
|
112
|
+
all_workspaces_selected
|
|
113
|
+
and DEFAULT_WORKSPACE in workspaces.source
|
|
114
|
+
and not workspaces.disabled
|
|
115
|
+
and not scan.failures
|
|
118
116
|
)
|
|
119
117
|
products: List[DiscoveredProduct] = []
|
|
120
118
|
product_ids_by_part_number: Dict[str, str] = {}
|
|
@@ -137,7 +135,7 @@ def discover_test_monitor(
|
|
|
137
135
|
for workspace, result in scan.terminal
|
|
138
136
|
]
|
|
139
137
|
return TestMonitorDiscovery(
|
|
140
|
-
workspaces=tuple(sorted(selected)),
|
|
138
|
+
workspaces=tuple(sorted(workspaces.selected)),
|
|
141
139
|
products=tuple(sorted(products, key=lambda item: (item.workspace, item.id))),
|
|
142
140
|
results=tuple(sorted(results, key=lambda item: (item.workspace, item.id))),
|
|
143
141
|
failures=tuple(sorted(scan.failures, key=lambda item: item.workspace)),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Persisted Prefect task for Test Monitor discovery."""
|
|
2
2
|
|
|
3
3
|
from prefect import task
|
|
4
|
-
from prefect.cache_policies import INPUTS
|
|
4
|
+
from prefect.cache_policies import INPUTS, TASK_SOURCE
|
|
5
5
|
|
|
6
6
|
from slcli.migration.connection import resolve_migration_connection
|
|
7
7
|
from slcli.migration.testmonitor.client import TestMonitorClient
|
|
@@ -15,7 +15,7 @@ from slcli.migration.workspaces import DiscoveredWorkspaces
|
|
|
15
15
|
persist_result=True,
|
|
16
16
|
result_serializer="json",
|
|
17
17
|
cache_result_in_memory=False,
|
|
18
|
-
cache_policy=INPUTS,
|
|
18
|
+
cache_policy=TASK_SOURCE + INPUTS,
|
|
19
19
|
)
|
|
20
20
|
def discover_test_monitor_task(
|
|
21
21
|
migration_id: str,
|
|
@@ -30,6 +30,5 @@ def discover_test_monitor_task(
|
|
|
30
30
|
connection = resolve_migration_connection(source_profile)
|
|
31
31
|
return discover_test_monitor(
|
|
32
32
|
TestMonitorClient(connection),
|
|
33
|
-
|
|
34
|
-
workspaces.selected,
|
|
33
|
+
workspaces,
|
|
35
34
|
)
|