Add interactive prompt for migrating from APIOps Toolkit to APIOps CLI

未关闭
#146 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
azure, github-actions, typescript
领域
api, ci-cd, cli, cloud

调研方向

未指定文件或测试。首先定位 CLI 命令入口点,以及现有的 Toolkit 和 CLI 配置、工件和流水线处理;然后将验收标准映射到迁移阶段。当交互式 apiops migrate 流程可以审核并确认转换、环境数据、覆盖项、流水线变更和摘要报告时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

P2

Problem

Customers currently using the APIOps Toolkit have no guided path to migrate to APIOps CLI. Migration requires manually converting configuration files, understanding schema differences, identifying missing properties, and rewriting CI/CD pipelines — all of which is error-prone and requires deep knowledge of both tools.

Context — Migration Challenges

  1. Configuration file format differences — Toolkit and CLI use different file structures and schemas; manual conversion is tedious and easy to get wrong
  2. Missing properties — The CLI may require properties that don't exist in Toolkit configuration files, and these need to be discovered from the running APIM environment
  3. Override files — Newly fetched properties need to be intelligently categorized into override files (e.g., environment-specific values, secrets, backend URLs)
  4. Pipeline migration — Existing CI/CD pipelines reference Toolkit-specific steps/tasks that must be replaced with APIOps CLI equivalents

Proposed Solution

Add a new interactive prompt (e.g., apiops migrate or similar) that guides users through a full migration from APIOps Toolkit to APIOps CLI. The prompt should:

1. Detect & Convert Existing Toolkit Files
  • Scan the repository for existing APIOps Toolkit configuration and artifact files
  • Map Toolkit file formats and schemas to their APIOps CLI equivalents
  • Convert configuration files (extraction config, publisher config, etc.) to the CLI format
  • Report any values that cannot be automatically mapped and prompt the user for input
2. Query Running APIM Environment for Missing Properties
  • Connect to the user's Azure APIM instance to fetch any properties or resources that exist in the live environment but are absent from the Toolkit files
  • Compare live state against the converted files to identify gaps
  • Pull down missing artifacts as needed to produce a complete CLI-compatible artifact set
3. Smart Override File Generation
  • For any additional properties pulled from the live environment, make intelligent decisions about what belongs in override files vs. base configuration
  • Identify environment-specific values (e.g., backend URLs, named value secrets, diagnostic settings) and route them to the appropriate per-environment override files
  • Use {#[TOKEN_NAME]#} placeholder syntax for secrets (per #117)
  • Present recommendations to the user for review and confirmation before writing
4. Pipeline Migration
  • Detect existing CI/CD pipeline files (GitHub Actions workflows, Azure DevOps pipelines)
  • Identify and remove APIOps Toolkit-specific steps/tasks
  • Replace them with the equivalent APIOps CLI steps
  • Preserve any custom steps or configuration the user has added around the Toolkit steps
  • Present a diff or summary of pipeline changes for user confirmation
5. Interactive & Best-Effort
  • The prompt should be conversational — guide the user through each migration phase rather than requiring upfront knowledge
  • Make sensible defaults and best-effort suggestions throughout
  • Allow the user to review and confirm before writing any files
  • Provide a summary report at the end listing what was migrated, what was added, and any manual steps remaining

Acceptance Criteria

  • New interactive prompt is available (e.g., apiops migrate)
  • Detects existing APIOps Toolkit configuration and artifact files in the repo
  • Converts Toolkit configuration files to APIOps CLI format
  • Connects to a running APIM environment to fetch missing properties/artifacts
  • Intelligently assigns newly fetched properties to base config vs. override files
  • Generates per-environment override files with {#[TOKEN_NAME]#} placeholder syntax for secrets
  • Detects and migrates CI/CD pipelines (GitHub Actions and/or Azure DevOps)
  • Removes Toolkit-specific pipeline steps and replaces with CLI equivalents
  • Preserves custom pipeline steps during migration
  • Provides interactive review and confirmation at each phase
  • Produces a summary report of migration actions taken and any remaining manual steps
  • Documentation explains how to run the migration prompt and what to expect
主要语言
TypeScript
星标
29
派生
10
平均合并
1 天 14 小时
30 天内合并 PR
22

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Azure/apiops-cli 的其他 Issue

查看 Azure/apiops-cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。