Skip to content

ELM migrations: status compatibility, create-flow enhancements, and device auth UX#1494

Open
bhuvanshahMSFT wants to merge 18 commits intoAzure:masterfrom
bhuvanshahMSFT:elm-migrations-preview-1p
Open

ELM migrations: status compatibility, create-flow enhancements, and device auth UX#1494
bhuvanshahMSFT wants to merge 18 commits intoAzure:masterfrom
bhuvanshahMSFT:elm-migrations-preview-1p

Conversation

@bhuvanshahMSFT
Copy link
Copy Markdown
Contributor

@bhuvanshahMSFT bhuvanshahMSFT commented Apr 28, 2026

Summary

This PR now includes the combined ELM migrations updates for preview labeling, status compatibility, create-flow enhancements, and device auth UX.

What Changed

  1. Status compatibility:
  • Treat both succeeded and completed as success terminal states.
  1. Create migration enhancements:
  • Added optional --service-endpoint-id passthrough as serviceEndpointId (camelCase).
  • Kept --github-token support.
  • If token is not provided, CLI checks ELM_GITHUB_TOKEN, then falls back to GitHub device flow.
  1. Device flow UX:
  • Shows verification URL and device code.
  • Copies device code to clipboard when host OS supports it.
  1. UX improvements across migration commands:
  • Improved pause/cancel/abandon/list messaging.
  • Improved resume guidance and terminal-state handling.
  1. Preview label:
  • Keeps ELM migration command group marked as Preview.

Validation

  1. Migration unit tests passed: 65/65.
  2. Wheel rebuilt and installed: azure_devops-1.0.4-py2.py3-none-any.whl.
  3. CLI smoke checks passed for command help and merged arguments (--service-endpoint-id, --github-token).

Notes

  • serviceEndpointId is sent only when provided.
  • API contract confirmed camelCase and nullable GUID behavior.

- Add --github-token and ELM_GITHUB_TOKEN fallback

- Run GitHub device flow when token is not provided

- Keep target-owner-user-id optional for FF-off compatibility

- Add deviceFlowConfig endpoint fallback support

- Expand migration auth edge-case tests

- Update ELM docs for token/device-flow create behavior
- Translate generic 409 TF400898 during migration create into a clear active-migration message

- Keep non-conflict errors unchanged

- Add regression tests for conflict mapping and pass-through behavior
- Add troubleshooting entry in migrations.md

- Add pitfall row and dedicated 409 section in elm_migrations_tsg.md
- Show PAT guidance when both device-flow config endpoints return 404

- Validate interval/expires_in as positive integers and fail with explicit invalid response errors

- Add regression tests for new fallback and validation behavior
- Map 401/403 to generic app/service-unavailable message

- Preserve PAT fallback guidance in message

- Add unit test coverage for HTTP 401 handling
- Enforce target repository format as https://host/org/repo client-side

- Prefer PreCheckIssueType/validation issue messages from response body for CLI errors

- Keep non-TF400898 409 handling unchanged

- Add regression tests for new validation and error-detail extraction
Add is_preview for migrations command groups and align help/docs with preview and limited-availability messaging.
@bhuvanshahMSFT
Copy link
Copy Markdown
Contributor Author

Reviewer context: this change is metadata and docs only. It marks ELM migration command groups as Preview to reflect current limited 1P or allowlisted availability. Existing CLI usage is unchanged for eligible users; non-eligible users continue to be governed by service-side access controls.

@bhuvanshahMSFT
Copy link
Copy Markdown
Contributor Author

Update after branch refresh:

This PR branch now includes the merged ELM migration functional updates (not just preview metadata):

  1. Status compatibility:
  • Treats both succeeded and completed as success terminal states.
  1. Create migration enhancements:
  • Adds optional --service-endpoint-id passthrough as serviceEndpointId (camelCase).
  • Keeps --github-token support.
  • If token is not provided, CLI checks ELM_GITHUB_TOKEN, then falls back to GitHub device flow.
  1. Device flow UX:
  • Displays device verification URL and code.
  • Copies device code to clipboard when supported by host OS tooling.
  1. UX improvements across migration commands:
  • Better pause/cancel/abandon/list messaging.
  • Improved resume guidance and terminal-state handling.
  1. Validation done on this branch:
  • Migration unit tests passed: 65/65.
  • Wheel rebuilt and installed: azure_devops-1.0.4-py2.py3-none-any.whl.
  • CLI help smoke checks confirm merged args/commands (including --service-endpoint-id and --github-token).

If preferred, I can update PR title/description to match this expanded scope for easier review.

@bhuvanshahMSFT bhuvanshahMSFT changed the title Mark ELM migrations command group as preview ELM migrations: status compatibility, create-flow enhancements, and device auth UX Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants