Feature request: support an explicit base and target commit for incremental publish

Đang mở
#345 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
azure, typescript
Lĩnh vực
cli, cloud

Hướng nghiên cứu

Start with the referenced src/services/git-diff-service.ts implementation and the incremental publish guide to trace how --commit-id selects artifact changes and deletions. Then follow the apiops publish entry point and its dry-run output. Done means an explicit base and target select the net changes and deletions for that range, with the requested validation and dry-run details.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem or use case

A deployment pipeline needs to promote all intended changes since the last successful deployment to a particular destination, not necessarily only the changes made by one commit.

In the reviewed implementation, --commit-id C selects the difference between C~1 and C. This is appropriate for publishing one commit when its parent is fully deployed, but does not cover releases that intentionally skip intermediate commits or batch several commits.

Version reviewed: @azure-tools/apiops-cli 1.0.4. This is a feature request based on documentation and source review. The following is a synthetic scenario, not a runtime reproduction.

Example scenario

Consider a linear history A -> B -> C:

  • A is the last successfully deployed commit.
  • B updates managed API X and removes the artifact for managed Product Y.
  • C updates managed API Z but does not change X or Y.
  • The pipeline intentionally skips deploying B and next deploys C.

With C checked out, incremental publish using --commit-id <C_SHA> --delete-unmatched considers B-to-C, not A-to-C. The intended change to X and deletion of Y are outside the selected difference.

Full publish without deletion does not address the missing deletion. Full publish with deletion is not an acceptable substitute when the destination contains resources outside the repository's management scope.

Proposed solution

Allow the caller to provide both an explicit comparison base and target commit, with the pipeline retaining the successful deployment SHA separately for each destination.

For the example above, publication should use the net A-to-C artifact changes and the actual files from C. Commit-scoped deletion should be computed from that same range, not from a comparison of the entire destination against repository contents.

Please document and validate:

  • The relationship between the target commit and checked-out artifact/override files.
  • The requirement that both commits and the required history are available.
  • The handling of invalid or unavailable commits, without silently reporting a successful no-op.
  • Whether the base must be an ancestor of the target, and how merge histories are treated.

The existing single-commit mode could remain unchanged for compatibility. No automatic discovery of deployment history is required; the pipeline can provide the base.

Desired outcome

Using A as the base and C as the target selects the intended update to X, deletion of Y, and update to Z. Unrelated destination resources remain untouched. Dry-run should display the selected base, target, updates, and deletions.

Affected command

apiops publish

References and related issues

If range publication is already supported in a newer release, please point to the relevant command and its deletion semantics.

Ngôn ngữ chính
TypeScript
Star
44
Fork
14
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Azure/apiops-cli

Tất cả issue của Azure/apiops-cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.