Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding API Review process and diagram #2433

Merged
merged 8 commits into from
Aug 23, 2018

Conversation

jdumars
Copy link
Member

@jdumars jdumars commented Jul 30, 2018

This PR represents a draft Google document which has been LGTM'd by the stakeholder reviewers, as well as reviewed by SIG Architecture.

@jdumars jdumars added the sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. label Jul 30, 2018
@jdumars jdumars requested a review from bgrant0607 July 30, 2018 04:37
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 30, 2018

* Any new version of a stable API

* Any major new functionality added to a stable API as defined by SIG Architecture and the API Reviewers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change "Any major new" to "Any change in"? I don't want to get into defining "major", and it is more than just "new"


* Any projects that produce APIs (including CRDs) that are intended to work with kubectl and/or kube-apiserver. (informational - intent is to ensure consistent user experience across the Kubernetes ecosystem)

* "Critical" or other “highly-integrated” APIs, such as our extension points in the node, apiserver, and controllers as defined by SIG Architecture [TBD]. (mandatory)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we sort all mandatory before all others?


* any other github projects in the kubernetes-* orgs (informational, for now - may make mandatory in future)

* Any projects that produce APIs (including CRDs) that are intended to work with kubectl and/or kube-apiserver. (informational - intent is to ensure consistent user experience across the Kubernetes ecosystem)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any kubernetes-style API that uses a *.k8s.io or *.kubernetes.io name, e.g. "storage.k8s.io" (mandatory)


As much as possible, we will automate the detection of PRs that require API reviews. Significant changes should be reviewed BEFORE they reach the PR stage, but this is the backstop for anything that gets missed. Such automation may miss cases, so any PR can be flagged as "needs API review", which triggers this process.

To begin the process, the proposer must produce:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest to strike "the proposer must produce


* Create an issue in the kubernetes-sigs/architecture-tracking repository that links to the relevant KEP or documentation

* The KEPs/documentation should include A clear and thoroughly-researched justification on why the change or addition is needed, including, upgrade/downgrade considerations, and alternatives considered.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/ A / a /


If **approved**/**reviewed**:

* Any non-blocking or nit suggestions should be documented in the review document that will be stored in the repository
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"the review document" is unclear - not defined. Are we keeping a separate doc for API review from the code or KEP PR? Should we require that API be cut-paste into a new PR just for API review? Do we want to keep those forever? Github's historical view is kind of useless for learning (because old state is obliterated).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had imagined the doc as something permanent in MD that would be iterated on between the reviewer(s) and submitter(s). If possible, I'd like to try that and see if it works, otherwise, I consider the other options you raise as viable alternatives.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A code review of a .md file is no different from a code review of a .go file. Github's history is not easy to follow. Just to be clear, you're proposing to create a new markdown file for every API change, which is NOT the actual code, and which we keep forever? Why not just link to the PR containing the proposed changes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thockin I think we can link in the tracking issue to the PR. It's just a little harder to follow after the fact IMO. But this process belongs to the reviewers/approvers, and we can tailor it as necessary over time.


* Any non-blocking or nit suggestions should be documented in the review document that will be stored in the repository

* The feedback should be made in the issue with APPROVED or REVIEWED (for externally-maintained CRDs or external components where there is only feedback, not approval)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is REJECTED a valid state?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A closed API PR == REJECTED in my estimation. But if the review team sees value in flagging something for reference purposes, I totally understand. I would tend to start without it.


* Ideally this process should lend itself to some automation. It currently does not. [ TBD: Create an umbrella issue for this ]

* [We already tag PRs with api-change](https://github.com/kubernetes/test-infra/blob/1611f3be80713f9df933e25e4cf9a2b538302ef5/mungegithub/misc-mungers/deployment/kubernetes/path-label.txt#L7-L17)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to get rid of mungegithub. This functionality is supported in prow today, it's just that nobody has setup an OWNERS file to implement it. We have (probably undocumented) support for regexes and labeling to accomplish this in one file.


* [We already tag PRs with api-change](https://github.com/kubernetes/test-infra/blob/1611f3be80713f9df933e25e4cf9a2b538302ef5/mungegithub/misc-mungers/deployment/kubernetes/path-label.txt#L7-L17)

* We should review whether this can be improved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to reduce the number of distinct kind/ github labels we use across the org down to 7 +/- 2. Could we consolidate kind/api-change, kind/new-api down to just kind/api-change? Or do we even need a separate kind label for these?

Current org-wide kind/ labels:

  • bug
  • cleanup
  • design
  • documentation
  • failing-test
  • feature
  • flake

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine with consolidation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

me too

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ghost
Copy link

ghost commented Aug 2, 2018

I would suggest adding concrete, albeit aspirational, timelines to the process, e.g:

time t: create PR in api-reviews
time t+1 week: prioritized and queued
time t+3 weeks: first review complete
time t+4 weeks: subsequent review complete
time t+6 weeks: approved or rejected

Otherwise it's unclear to submitters how much time to allocate in their project plans for the review process, and also unclear how to gauge whether or not reviewers are meeting realistic timeline goals.

Other than that, LGTM.


# Process Overview and Motivations

Due to the importance of preserving usability and consistency in Kubernetes APIs, all changes and additions require expert oversight. The API review process is intended to maintain logical and functional integrity of API implementations over time, the consistency of user experience and the ability of previously written tools to function with new APIs. Wherever possible, the API review process should help change submitters follow [established conventions](https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md), and not simply reject without cause.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/of API implementations/of the API/


* The proposer may follow one of two paths:

* Complete the coding of the API change. Create a PR. Request an API review on the PR. (In future, the request will be automated based on detecting API changes). The API reviewer will /approve the PR, assuming the change was satisfactory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small: if Clayton, or Brian, or I /approve a PR it is blanket wholly approved. We should not do that. Maybe we should say /lgtm here with final approval when the PR is fully LGTM'ed (in case code or other things are changed)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

@smarterclayton
Copy link
Contributor

This is lgtm for the purposes of iteration and I also approve it. I will not tag it until at least two other api approvers provide similar feedback.

@jdumars
Copy link
Member Author

jdumars commented Aug 15, 2018

thanks Clayton

@thockin
Copy link
Member

thockin commented Aug 16, 2018

/lgtm

2 down...

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 16, 2018

As much as possible, we will automate the detection of PRs that require API reviews. Significant changes should be reviewed BEFORE they reach the PR stage, but this is the backstop for anything that gets missed. Such automation may miss cases, so any PR can be flagged as "needs API review", which triggers this process.

To begin the process:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some overlap with the "Process mechanics" section below, might collapse these as a follow up

Copy link
Member

@liggitt liggitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a couple nits/suggestions, but lgtm for merge as-is


Ideally, reviews will happen as quickly as possible, but it is highly dependent on reviewer availability and bandwidth. In general, the following timeframe can be expected:

- time t: create PR in api-reviews
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: create issue in kubernetes-sigs/architecture-tracking


New APIs (groups or Kinds) or substantial changes require KEPs. Major changes without KEPs will be rejected.

1. Create an API Review request issue in [https://github.com/kubernetes-sigs/architecture-tracking](https://github.com/kubernetes-sigs/architecture-tracking) - the work will be tracked in the corresponding project board
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be helpful to link to the board. https://github.com/kubernetes-sigs/architecture-tracking/projects/3, right?

@thockin
Copy link
Member

thockin commented Aug 20, 2018 via email

@jdumars
Copy link
Member Author

jdumars commented Aug 23, 2018

@smarterclayton I think the requisite LGTMs are in

@thockin
Copy link
Member

thockin commented Aug 23, 2018

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: thockin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants