systemlink-cli 3.2.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.2.1 → systemlink_cli-3.3.0}/PKG-INFO +1 -1
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/pyproject.toml +1 -1
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/_version.py +1 -1
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/command.py +13 -5
- 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.2.1 → systemlink_cli-3.3.0}/slcli/migration/flows/discover.py +11 -5
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/flows/migrate.py +2 -2
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/summary.py +11 -2
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/testmonitor/discovery.py +12 -21
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/testmonitor/discovery_task.py +3 -5
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/workspace_task.py +3 -3
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/workspaces.py +6 -5
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/LICENSE +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/dff-editor/editor.js +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/dff-editor/index.html +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/__init__.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/__main__.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/alarm_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/asset_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/cli_formatters.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/cli_utils.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/comment_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/completion_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/config.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/config_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/credentials.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/dataframe_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/dff_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/dff_decorators.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/example_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/example_loader.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/example_provisioner.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/README.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/_schema/schema-v1.0.json +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/demo-data-1/README.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/demo-data-1/config.yaml +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/demo-data-2/README.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/demo-data-2/config.yaml +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/demo-data-3/config.yaml +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/demo-data-3/leakage-current-results.json +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/demo-data-3/overvoltage-results.json +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/demo-data-3/product-xyz-compliance-report.json +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/demo-data-3/product-xyz-specification.csv +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/demo-data-3/thermal-response-results.json +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/exercise-5-1-parametric-insights/README.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/exercise-5-1-parametric-insights/config.yaml +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/exercise-7-1-test-plans/README.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/exercise-7-1-test-plans/config.yaml +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/spec-compliance-notebooks/README.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/spec-compliance-notebooks/config.yaml +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/spec-compliance-notebooks/notebooks/SpecAnalysis_ComplianceCalculation.ipynb +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/spec-compliance-notebooks/notebooks/SpecComplianceCalculation.ipynb +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/spec-compliance-notebooks/notebooks/SpecfileExtractionAndIngestion.ipynb +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/examples/spec-compliance-notebooks/spec_template.xlsx +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/feed_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/file_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/function_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/function_templates.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/main.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/managed_client/__init__.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/managed_client/crypto.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/managed_client/handlers.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/managed_client/minion.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/managed_client/models.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/managed_client/protocol.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/managed_client/rest.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/managed_client/state.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/managed_client/transport.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/managed_client_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/mcp_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/mcp_reachability.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/mcp_server.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/mcp_skills.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migrate_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/__init__.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/annotations.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/api.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/connection.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/flows/__init__.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/flows/batching.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/flows/service.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/orchestration.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/prefect_server.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/schema.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/state.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/testmonitor/__init__.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/testmonitor/client.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/testmonitor/migration.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/testmonitor/migration_task.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/testmonitor/models.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/testmonitor/records.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/testmonitor/writer.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/migration/workspace_client.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/notebook_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/paths.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/pkce.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/platform.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/policy_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/policy_utils.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/profile_credentials.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/profiles.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/response_handlers.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/rich_output.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/routine_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skill_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/SKILL.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/evals/COPILOT_BATCH_RUN_PROMPT.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/evals/README.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/evals/evals.json +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/evals/evals.schema.json +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/evals/files/spec-import/battery-specs.csv +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/evals/files/webapp-package/icon.svg +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/evals/files/webapp-package/nipkg.config.json +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/evals/files/webapp-package/webapp-content/index.html +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/evals/trigger_evals.json +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/analysis-recipes.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/commands.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/datasheet-workflow.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/domain-concepts.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/example-authoring.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/filtering.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/import-specs.min.json +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/job-debugging/overview.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/nipkg/overview.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/notebook/interfaces.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/notebook/notebook-patterns.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/notebook/overview.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/python-test/overview.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/routine-examples.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/troubleshooting.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/webapp/angular-ui-packages.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/webapp/deployment.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/webapp/layout-patterns.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/webapp/nimble-angular.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/webapp/overview.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/webapp/systemlink-services.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/references/webapp/troubleshooting.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/scripts/benchmark_iteration.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/scripts/compare_iteration.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/scripts/eval_manifest.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/scripts/grade_eval_response.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/scripts/grade_iteration.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/scripts/prepare_eval_prompts.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/scripts/prepare_eval_workspace.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/scripts/render_eval_review.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/skills/slcli/scripts/spec_import_helper.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/spec_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/ssl_trust.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/state_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/system_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/system_query_utils.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/systemlink-logo.svg +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/table_utils.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/tag_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/templates_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/testmonitor_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/universal_handlers.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/user_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/utils.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/version_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/web_editor.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_bootstrap.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/.gitignore +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/README.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/angular.json +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/package.json +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/scripts/filter-sbom.js +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/app-routing.module.ts +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/app.component.html +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/app.component.scss +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/app.component.ts +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/app.module.ts +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/core/layout/app-shell.component.html +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/core/layout/app-shell.component.scss +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/core/layout/app-shell.component.ts +0 -0
- {systemlink_cli-3.2.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.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/core/systemlink/systemlink-context.service.ts +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/core/systemlink/systemlink-locale.ts +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/core/systemlink/theme-sync.service.ts +0 -0
- {systemlink_cli-3.2.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.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/assets/assets-page.component.html +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/assets/assets-page.component.scss +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/assets/assets-page.component.ts +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/datasets/datasets-page.component.html +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/datasets/datasets-page.component.scss +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/datasets/datasets-page.component.ts +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/home/home-page.component.html +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/home/home-page.component.scss +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/home/home-page.component.ts +0 -0
- {systemlink_cli-3.2.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.2.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.2.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.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/operations/operations-page.component.html +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/operations/operations-page.component.scss +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/operations/operations-page.component.ts +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/settings/settings-page.component.html +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/settings/settings-page.component.scss +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/features/settings/settings-page.component.ts +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/shared/components/empty-state.component.html +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/shared/components/empty-state.component.scss +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/shared/components/empty-state.component.ts +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/shared/components/error-banner.component.html +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/shared/components/error-banner.component.scss +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/shared/components/error-banner.component.ts +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/shared/components/loading-state.component.html +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/shared/components/loading-state.component.scss +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/shared/components/loading-state.component.ts +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/app/shared/states/view-state.model.ts +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/assets/README.md +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/index.html +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/locale/messages.de.json +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/locale/messages.en.json +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/locale/messages.es.json +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/locale/messages.fr.json +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/locale/messages.ja.json +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/locale/messages.ko.json +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/locale/messages.zh.json +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/localize.d.ts +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/main.ts +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/src/styles.scss +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/tsconfig.app.json +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/webapp_templates/angular/blank/tsconfig.json +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/workflow_preview.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/workflows_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/workitem_click.py +0 -0
- {systemlink_cli-3.2.1 → systemlink_cli-3.3.0}/slcli/workspace_click.py +0 -0
- {systemlink_cli-3.2.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" }]
|
|
@@ -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:
|
|
@@ -159,20 +163,24 @@ def _migrate(
|
|
|
159
163
|
],
|
|
160
164
|
)
|
|
161
165
|
test_monitor = outcome.discovery.test_monitor
|
|
166
|
+
files = outcome.discovery.files
|
|
162
167
|
migration = outcome.test_monitor
|
|
163
168
|
failed = len(failed_items(migration.products)) + len(failed_items(migration.results))
|
|
164
169
|
_logger.info(
|
|
165
|
-
"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",
|
|
166
172
|
len(test_monitor.products),
|
|
167
173
|
len(test_monitor.results),
|
|
174
|
+
len(files.files),
|
|
168
175
|
[failure.workspace for failure in test_monitor.failures],
|
|
176
|
+
[failure.workspace for failure in files.failures],
|
|
169
177
|
failed,
|
|
170
178
|
)
|
|
171
179
|
click.echo(format_workspace_mapping(outcome.mapping))
|
|
172
|
-
click.echo(format_summary(test_monitor))
|
|
180
|
+
click.echo(format_summary(test_monitor, files))
|
|
173
181
|
click.echo(format_migration_summary(migration))
|
|
174
182
|
click.echo(f"Log: {log_path}")
|
|
175
|
-
if _all_workspaces_failed(test_monitor):
|
|
183
|
+
if _all_workspaces_failed(test_monitor, files):
|
|
176
184
|
raise click.ClickException("Discovery failed for every workspace.")
|
|
177
185
|
if failed:
|
|
178
186
|
raise click.ClickException(f"{failed} items failed to migrate.")
|
|
@@ -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
|
)
|
|
@@ -55,10 +55,10 @@ def migrate_flow(
|
|
|
55
55
|
Raises:
|
|
56
56
|
WorkspaceMappingError: If a source workspace does not exist.
|
|
57
57
|
"""
|
|
58
|
-
|
|
58
|
+
explicit_workspace_selection: Optional[List[str]] = (
|
|
59
59
|
list(workspace_mappings) if workspace_mappings is not None else None
|
|
60
60
|
)
|
|
61
|
-
discovery = discover_flow(migration_id, source_profile,
|
|
61
|
+
discovery = discover_flow(migration_id, source_profile, explicit_workspace_selection)
|
|
62
62
|
mapping = synchronize_workspaces_task(
|
|
63
63
|
migration_id, destination_profile, discovery.workspaces, workspace_mappings
|
|
64
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
|
|
|
@@ -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,9 +88,7 @@ def infer_product_workspace(
|
|
|
88
88
|
|
|
89
89
|
def discover_test_monitor(
|
|
90
90
|
client: TestMonitorSource,
|
|
91
|
-
|
|
92
|
-
selected_workspaces: Collection[str],
|
|
93
|
-
disabled_workspaces: Collection[str],
|
|
91
|
+
workspaces: DiscoveredWorkspaces,
|
|
94
92
|
) -> TestMonitorDiscovery:
|
|
95
93
|
"""Discover products and terminal results owned by the selected workspaces.
|
|
96
94
|
|
|
@@ -103,24 +101,17 @@ def discover_test_monitor(
|
|
|
103
101
|
|
|
104
102
|
Args:
|
|
105
103
|
client: Test Monitor queries for the source server.
|
|
106
|
-
|
|
107
|
-
selected_workspaces: Names of workspaces in scope of the migration.
|
|
108
|
-
disabled_workspaces: Names of disabled source workspaces, which are never scanned.
|
|
109
|
-
Any disabled workspace may hold results, so products with no results are not
|
|
110
|
-
assigned to Default when this is non-empty.
|
|
104
|
+
workspaces: Discovered source workspaces.
|
|
111
105
|
"""
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
scan = _scan_results(
|
|
118
|
-
client, {name: id_ for name, id_ in all_workspaces.items() if name in selected}
|
|
119
|
-
)
|
|
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)
|
|
120
111
|
migrate_products_with_no_results = (
|
|
121
|
-
|
|
122
|
-
and DEFAULT_WORKSPACE in
|
|
123
|
-
and not
|
|
112
|
+
all_workspaces_selected
|
|
113
|
+
and DEFAULT_WORKSPACE in workspaces.source
|
|
114
|
+
and not workspaces.disabled
|
|
124
115
|
and not scan.failures
|
|
125
116
|
)
|
|
126
117
|
products: List[DiscoveredProduct] = []
|
|
@@ -144,7 +135,7 @@ def discover_test_monitor(
|
|
|
144
135
|
for workspace, result in scan.terminal
|
|
145
136
|
]
|
|
146
137
|
return TestMonitorDiscovery(
|
|
147
|
-
workspaces=tuple(sorted(selected)),
|
|
138
|
+
workspaces=tuple(sorted(workspaces.selected)),
|
|
148
139
|
products=tuple(sorted(products, key=lambda item: (item.workspace, item.id))),
|
|
149
140
|
results=tuple(sorted(results, key=lambda item: (item.workspace, item.id))),
|
|
150
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,7 +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,
|
|
35
|
-
workspaces.disabled,
|
|
33
|
+
workspaces,
|
|
36
34
|
)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from typing import Dict, List, Optional
|
|
4
4
|
|
|
5
5
|
from prefect import task
|
|
6
|
-
from prefect.cache_policies import INPUTS
|
|
6
|
+
from prefect.cache_policies import INPUTS, TASK_SOURCE
|
|
7
7
|
|
|
8
8
|
from slcli.migration.connection import resolve_migration_connection
|
|
9
9
|
from slcli.migration.workspace_client import WorkspaceClient
|
|
@@ -20,7 +20,7 @@ from slcli.migration.workspaces import (
|
|
|
20
20
|
persist_result=True,
|
|
21
21
|
result_serializer="json",
|
|
22
22
|
cache_result_in_memory=False,
|
|
23
|
-
cache_policy=INPUTS,
|
|
23
|
+
cache_policy=TASK_SOURCE + INPUTS,
|
|
24
24
|
)
|
|
25
25
|
def discover_workspaces_task(
|
|
26
26
|
migration_id: str, source_profile: str, explicit_workspace_selection: Optional[List[str]]
|
|
@@ -47,7 +47,7 @@ def discover_workspaces_task(
|
|
|
47
47
|
persist_result=True,
|
|
48
48
|
result_serializer="json",
|
|
49
49
|
cache_result_in_memory=False,
|
|
50
|
-
cache_policy=INPUTS,
|
|
50
|
+
cache_policy=TASK_SOURCE + INPUTS,
|
|
51
51
|
)
|
|
52
52
|
def synchronize_workspaces_task(
|
|
53
53
|
migration_id: str,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Discover source workspaces and synchronize them to destination workspaces."""
|
|
2
2
|
|
|
3
|
-
from typing import Callable, Iterable, Mapping, Optional, Sequence, Tuple
|
|
3
|
+
from typing import Callable, Dict, Iterable, Mapping, Optional, Sequence, Tuple
|
|
4
4
|
|
|
5
5
|
from pydantic import BaseModel, ConfigDict
|
|
6
6
|
|
|
@@ -8,11 +8,11 @@ from slcli.migration.workspace_client import Workspace
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class DiscoveredWorkspaces(BaseModel):
|
|
11
|
-
"""
|
|
11
|
+
"""Enabled source workspaces by name and the names in scope of a migration."""
|
|
12
12
|
|
|
13
13
|
model_config = ConfigDict(frozen=True)
|
|
14
14
|
|
|
15
|
-
source:
|
|
15
|
+
source: Dict[str, Workspace] = {}
|
|
16
16
|
selected: Tuple[str, ...] = ()
|
|
17
17
|
disabled: Tuple[str, ...] = ()
|
|
18
18
|
|
|
@@ -90,6 +90,7 @@ def discover_workspaces(
|
|
|
90
90
|
key=lambda workspace: workspace.name,
|
|
91
91
|
)
|
|
92
92
|
)
|
|
93
|
+
by_name = {workspace.name: workspace for workspace in enabled_workspaces}
|
|
93
94
|
enabled_workspace_names = [workspace.name for workspace in enabled_workspaces]
|
|
94
95
|
disabled_workspace_names = tuple(
|
|
95
96
|
workspace.name for workspace in enumerated_source_workspaces if not workspace.enabled
|
|
@@ -103,7 +104,7 @@ def discover_workspaces(
|
|
|
103
104
|
if missing:
|
|
104
105
|
raise WorkspaceMappingError(missing_source=missing)
|
|
105
106
|
return DiscoveredWorkspaces(
|
|
106
|
-
source=
|
|
107
|
+
source=by_name,
|
|
107
108
|
selected=tuple(names_to_include),
|
|
108
109
|
disabled=disabled_workspace_names,
|
|
109
110
|
)
|
|
@@ -149,7 +150,7 @@ def synchronize_workspaces(
|
|
|
149
150
|
for missing_name in sorted(needed_names - existing_names):
|
|
150
151
|
destination_workspaces_by_name[missing_name] = create_destination_workspace(missing_name)
|
|
151
152
|
|
|
152
|
-
source_ids = {workspace.name: workspace.id for workspace in source_workspaces.source}
|
|
153
|
+
source_ids = {workspace.name: workspace.id for workspace in source_workspaces.source.values()}
|
|
153
154
|
return WorkspaceMapping(
|
|
154
155
|
workspaces=tuple(
|
|
155
156
|
MappedWorkspace(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|