Closed mikekistler closed 7 months ago
@mikekistler to go and propose the labels. Plus mention that "new api version required" approves a change, not a breaking change.
Here's my proposal for revised/expanded labels for breaking change approvals:
BreakingChange-Benign
BreakingChange-Correction
SameApiVersion-Approved
BreakingChange-Approved
cc: @JeffreyRichter @josefree
I am thinking that the automation, once it detects that the breaking changes have been approved (due to any of the scenarios you listed above) should have another mechanism to determine the PR author can proceed to the next stage, which, in case of ARM PRs, is ARM review. I am thinking a PR that requires ARM review but has unaddressed breaking changes should have a (new) label NotReadyForARMReview
which get removed when the breaking changes are approved.
Re implementation, the work I see to get this done includes:
and support for the new approval labels in:
Related doc:
TODO: I need to compile the final guidance from all the various conversations I had. Specifically see email thread with Subject: RE: Streamlining Breaking Change reviews
and Re: "one pager" on Breaking Changes for CTO Forum
.
We will also add another label for issue with the tool, as explained in:
We may also need a label like Approved-TentingInProduction
. For context, see email thread Re: Requesting review and approval for the breaking change in Enterprise Billing Service
.
There is a related idea of having BreakingChange-ToolingIssue
mentioned in the email thread with subject RE: REST API Tools planning
. In addition, there is more infor about preview from on the thread Re: API versions: What is the policy for releasing updated private or public API preview when there is no GA?
.
To elaborate on "self-served" based on my chat with Jeff R.: appropriate message should be added to the PR, so that PR author knows they can add appropriate comment, resulting in appropriate approval, like e.g. label or suppression file, thus unblocking the PR.
The implementation of such flow must play well with:
@mikekistler @JeffreyRichter after my chat with @weshaggard we have few questions.
First off, here is the more recent proposal from the email thread with subject RE: Streamlining Breaking Change reviews
:
=== Proposal start ===
A PR showing NewApiVersionRequired means a non-breaking change to an existing api-version:
A PR showing BreakingChangeReviewRequired means a breaking change introduced to an existing or new api-version:
In PR, have a comment with 2 (or 3) links:
=== Proposal end ===
I see some scenarios can be auto-approved, but some can not. From the implementation point of view, we cannot clearly delineate these cases. For example, if the breaking change is a bugfix then the automation cannot know "ah, this is a bugfix, so the PR author can auto-approve". All the automation knows it is a breaking change, and all we can do is to either allow to auto-approve all the breaking changes [1] or none of the breaking changes. Similar with non-breaking changes to given API version (like a optional property addition). Either we allow to auto-approve all the non-breaking same-API-version changes or none of them.
Knowing that, do you still want for us to implement the auto-approval / self-service capability?
If we allow people to auto-approve changes to given API version to match service behavior, they can abuse it in the following way:
This scenario kind of completely circumvents the system, and yet is not obviously wrong in any way.
Given this, do you still want for us to allow people to auto-approve same-API version changes under this pretense?
Is the following correct?
"Same API version change" means: this change is allowed, but you must create a new API version for it [2]. E.g. new property.
"Breaking change" means: this change is not allowed, not even in a new API version [3]. E.g. a property removal. If it really has to happen, it must follow the strict approval process and the deprecation policy must be followed.
[1]: For example, if there would be BreakingChangeReviewRequired
, the PR author could always add BreakingChange-BugFix
and the automation has no way of determining this is actually not a bugfix, but other kind of breaking change that cannot be auto-approved.
[2]: Except the same API version changes that are allowed by the special cases as listed in the proposal.
[3]: Except the breaking changes that are allowed by the special cases as listed in the proposal.
This is a good summary but I have a few minor tweaks:
I find that many teams do not have a clear understanding of what "private preview" means. I’ve had to explain this often enough that I captured my explanation so I don’t have to recreate it every time:
An API version is "in preview” when it has been made available to customers, either under AFEC control ("private preview") or open to all customers ("public preview"). If an API version is not available to customers, it isn’t in preview – it is still in development.
So before a team self-approves "SameApiVersion" because they claim it is in private preview, we need to make sure they are really in private preview.
Following on the previous point, I think we need a separate label for the case of "testing in a production branch". This happens all the time and we have to tell teams that they should not be doing this, but they still do. In some cases it is justified but ARM is working on new support that should make it possible to test effectively without merging to RPSaaSMaster.
Some suggestions for this label: "SameApiVersion-InTest", "SameApiVersion-NotReleased".
Likewise, I think we need a "BreakingChange-NotReleased" label, and maybe this can replace the "BreakingChange-NoCustomers" label.
Please don’t use the term "swagger" in the text of the PR comments — use "API defintion" or something similar. "Swagger" is a trademark of the SmartBear company and while I know many at Microsoft use it as a synonym for "API definition" I think we should set an example of using correct terminology particularly in public spaces such as the azure-rest-api-specs repo.
https://swagger.io/blog/api-strategy/difference-between-swagger-and-openapi/
As for your questions:
I think we still want the self-service approval.
Yes, it should be offered on every PR with a "NewApiVersionRequired" or "BreakingChangeReviewRequired" label.
And yes, it could easily be abused, but
Regarding your second question, we should clarify what qualifies as a "BugFix". A "BugFix" means that the behavior of the service at the time of the original GA of the feature was not correctly described in the API definition. Another way to say this is that the API definition does not correctly describe the service behavior at any point in time.
@mikekistler thank you! I consolidated my understanding of all the requirements for this work and proposed a new convention for label naming. Can I kindly ask you to review the document and provide your input? I want to get your sign-off before I start the implementation work to avoid rework.
CC @JeffreyRichter @weshaggard @heaths
Per our chat on 1/4/2024, we concluded that for now we will implement the support for the labels and perhaps add additional support for suppressions later. Details here:
I also updated the issue description with an implementation plan:
I left comments in the doc and also tried to summarize my (loosely held) opinions on label names and descriptions in this gist.
Per our chat today:
BreakingChangeReviewRequired
label should be decommissioned. Now the label BreakingChange
will have mean the review is required.
BreakingChange
label.There have been few more updates. Newest proposals:
Note the documents above are parts of the suppressions logic discussion. All relevant docs:
VersioningReviewRequired
instead of NewApiVersionRequired
. Assorted refactoring and new breaking changes types for labels.Pull Request 9668189: Updated guidance around breaking changes process and relevant labels | Updated file(s) from Engineering Hub for content: Service Lifecycle & Actions Team
Related breaking changes confusion matrix:
Related work:
Doc capturing info from this thread, and more:
I reached out over email to APEX team and Sharif Abassi about deduping these two docs:
Update: over email Shashank said he will deduplicate the docs.
@mikekistler @JeffreyRichter @weshaggard overall this was tons of work, mostly in writing, updating and clarifying the relevant docs. I am waiting for Shashank to update relevant APEX wiki about breaking changes intake process (see here). But my part of the work is finally done! Migration to new labels is done, code is done and deployed, etc.
Closing.
Implementation plan
By @konrad-jamrozik
Implementation plan for the design in this gist with extra details in this Word design doc (see also this comment):
Approved-BreakingChange
labelNewApiVersion
labelrequiredLabelsRules.ts
file to use the new labels abstractions (base it on the relevant open PR by Tianen)VersioningReviewRequried
andBreakingChangeReviewRequired
are present.Prerequisite implementation tasks
openapi-alps
code, likeLabel
orPrKey
, intoswagger-validation-common
package.No-op docs work
Most recent proposal
For most recent proposal, see the most recent comment on this issue.
Original description 6/20/2023
By @mikekistler:
The current breaking change process uses the "BreakingChangeReviewRequired" or "NewApiVersionRequired" labels to signal that a breaking change review is required, but only one label "Approved-BreakingChange" for approval by the Breaking Change review board. But there are several different reasons that the board may approve, and we'd like to use the label to designate the reason for approval.
Related work: