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

Issue 95: Adding first version of development process documentation. #106

Merged
merged 1 commit into from Feb 24, 2017

Conversation

twilmes
Copy link
Contributor

@twilmes twilmes commented Feb 10, 2017

Here is a first cut at developer process docs. The release policy section is pretty sparse but I think we can expand this when we go through our first release process. I imagine we'll also add explicit release steps and directions at that point also. I'm not wed to any of these particular policies but I think they're a good start. Specifically I'm curious if folks think we should allow CTR in limited cases like I've defined here.

@janusgraph-bot
Copy link

Please verify the committer name, email, and GitHub username association are all correct and match CLA records.

@janusgraph-bot janusgraph-bot added the cla: no This PR is not compliant with the CLA label Feb 10, 2017
@mbrukman
Copy link
Member

@twilmes — you seem to have the same issue as @blacknred0 did in PR #96, namely that GitHub is missing the metadata for your username in your commit, so the automated tool cannot tell who submitted this PR. @blacknred0 submitted a ticket to GitHub support and they fixed it; please do the same.

Once GitHub fixes it, @janusgraph-bot will flip the CLA bit for you automatically.

Copy link
Member

@ptgoetz ptgoetz left a comment

Choose a reason for hiding this comment

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

Looks like a good start. I added a few discussion points based on my experience with other projects.


Though not required, it is strongly recommended that contributors limit the amount of development work they
perform before their change is accepted. In the instance where the change is not approved or significant updates to
the proposal are made, we wish to minimize the amount of rework required.
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure I understand the impetus behind this paragraph. What would be an example?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is superfluous upon rereading so I'm taking it out. My intent was to discourage folks from spending a ton of time on development before seeking consensus on whether or not a change is a good idea or not but I think the process makes that clear already.

For features that involve only one developer, developers will work in their own JanusGraph forks, managing their
own branches, and submitting pull requests when ready. Feature branches in the main JanusGraph repository will be
created when more than one developer collaborates on a feature.

Copy link
Member

Choose a reason for hiding this comment

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

Do we see a problem with developers working together on individual forks outside of the main JanusGraph repository, as opposed to feature branches?

Maybe just have a simple process along the lines of "If multiple developers wish to collaborate on a feature, they may request a feature branch be created."

Another question that comes to mind is what if those working on a feature branch are not committers? Do we assign some sort of "shepherd" who can merge pull requests for that branch?

Copy link

Choose a reason for hiding this comment

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

Perhaps this means that the owner of a feature (=feature branch) should be a committer?

pull request process. In instances where the committer deems the full process
unnecessary, commit-then-review (CTR) may be employed. This should be used infrequently and only for extremely trivial
changes. Changes of this sort may include:

Copy link
Member

Choose a reason for hiding this comment

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

For CTR, we should have some wording around vetoing (-1) a commit, so if a committer objects to something already committed it can be rolled back.

* Documentation typo or small documentation addition
* Addition of a new test case

Any commit that is made following CTR shall include the fact that it is a CTR in the commit comments.
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to encourage some sort of notification in these cases? "Hey I just committed this, if anyone objects, let me know and I'll revert."

Copy link
Member

Choose a reason for hiding this comment

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

GitHub provides automated notifications: https://help.github.com/articles/managing-notifications-for-pushes-to-a-repository/

For example, we can create a list with the firehose of all commits / merges, e.g., janusgraph-commits@, and folks who want the firehose can subscribe to this. I've seen this done with the commit-then-review workflow in the LLVM project, it worked well.

I can set this up.

Copy link
Member

Choose a reason for hiding this comment

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


* Three +1 votes are required merge a pull request
* One or more -1 votes will veto the pull request until the noted issue(s) are addressed and the pull request
is resubmitted
Copy link
Member

Choose a reason for hiding this comment

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

maybe change to "and the -1 vote is withdrawn."

It would also be good to any -1 vote must include an explanation, and that a -1 without an explanation is not valid.

* Committers may vote on their own pull requests
* Pull requests that are limited to one component require at least one of the +1 votes to come from the relevant
TSC member. If TSC members are unable to review after 2 weeks, the pull request may be merged
after three +1 votes
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to codify a rule that requires a relevant TSC member to vote, and otherwise imposes a 2 week delay?

It might be simpler to just require +1s from committers knowing they will do the right thing, like giving the TSC member time or a nudge to review.

Also sometimes when projects are under heavy pull request load, it can be difficult to get 3 +1s. Some projects do something like "one +1 from a committer who is not the author of the pull request."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll remove the TSC requirement. I think that's too stringent to start and we always add it in later if need be.

consensus is reached, decide on a date to start the release code freeze. Allow for one week between the start of the
code freeze and the beginning of the release vote. During that week, a release manager shall create release
artifacts. Committers will be given seven days to review and vote on the release artifacts. Three +1 votes are required for a release to happen.
If one or more committers casts a -1 vote, the release will be halted.
Copy link
Member

Choose a reason for hiding this comment

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

In Apache projects, release votes can't be vetoed, they require at least 3 +1 votes and more +1s than -1s. Just pointing that out in case we want to follow suit.

https://groups.google.com/forum/#!forum/janusgraph-dev[janusgraph-dev] proposing the new release and requesting feedback on what should be included in the release. After
consensus is reached, decide on a date to start the release code freeze. Allow for one week between the start of the
code freeze and the beginning of the release vote. During that week, a release manager shall create release
artifacts. Committers will be given seven days to review and vote on the release artifacts. Three +1 votes are required for a release to happen.
Copy link
Member

Choose a reason for hiding this comment

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

Is a code freeze necessary? Couldn't we just create a release branch that forms the base for the release (i.e. so work on master can continue)?

We may also want to shorten the vote time (Apache uses min. 72hrs.). As currently worded it looks like there would be a minimum turnaround of two weeks for a release. What if, for example we need to rush out a security patch?

Copy link

Choose a reason for hiding this comment

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

I agree with the release branch approach, lets unblock ourselves.

Copy link

Choose a reason for hiding this comment

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

We need a break-glass mechanism for releases. If we are affected by a CVE, we would like to act even sooner. Usually CVE can be mitigated by updating dependency versions, so in that case the mechanics of creating a release would only be limited by TinkerPop test time? Currently I understand this to be 24 hours.

Copy link

@amcp amcp left a comment

Choose a reason for hiding this comment

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

some minor comments

https://groups.google.com/forum/#!forum/janusgraph-dev[janusgraph-dev] proposing the new release and requesting feedback on what should be included in the release. After
consensus is reached, decide on a date to start the release code freeze. Allow for one week between the start of the
code freeze and the beginning of the release vote. During that week, a release manager shall create release
artifacts. Committers will be given seven days to review and vote on the release artifacts. Three +1 votes are required for a release to happen.
Copy link

Choose a reason for hiding this comment

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

I agree with the release branch approach, lets unblock ourselves.

For features that involve only one developer, developers will work in their own JanusGraph forks, managing their
own branches, and submitting pull requests when ready. Feature branches in the main JanusGraph repository will be
created when more than one developer collaborates on a feature.

Copy link

Choose a reason for hiding this comment

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

Perhaps this means that the owner of a feature (=feature branch) should be a committer?

Pull Requests
-------------

Most changes to JanusGraph must be reviewed before they are committed (RTC). This workflow is performed using Github's
Copy link

Choose a reason for hiding this comment

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

s/(RTC)/(RTC - review-then-commit)/

https://groups.google.com/forum/#!forum/janusgraph-dev[janusgraph-dev] proposing the new release and requesting feedback on what should be included in the release. After
consensus is reached, decide on a date to start the release code freeze. Allow for one week between the start of the
code freeze and the beginning of the release vote. During that week, a release manager shall create release
artifacts. Committers will be given seven days to review and vote on the release artifacts. Three +1 votes are required for a release to happen.
Copy link

Choose a reason for hiding this comment

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

We need a break-glass mechanism for releases. If we are affected by a CVE, we would like to act even sooner. Usually CVE can be mitigated by updating dependency versions, so in that case the mechanics of creating a release would only be limited by TinkerPop test time? Currently I understand this to be 24 hours.

@janusgraph-bot janusgraph-bot added cla: yes This PR is compliant with the CLA and removed cla: no This PR is not compliant with the CLA labels Feb 11, 2017
Copy link

@amcp amcp left a comment

Choose a reason for hiding this comment

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

lgtm

For features that involve only one developer, developers will work in their own JanusGraph forks, managing their
own branches, and submitting pull requests when ready. If multiple developers wish to collaborate on a feature,
they may request that a feature branch be created in JanusGraph repository. If the developers are not committers, a
JanusGraph committer will be assigned as the shepard for that branch. The shepard will be responsible for merging
Copy link

Choose a reason for hiding this comment

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

s/shepard/shepherd/

@@ -0,0 +1,84 @@
[[development-process]]
JanusGraph Development Process
==============================
Copy link
Member

Choose a reason for hiding this comment

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

Please use Asciidoc best practices for section titles, as described in their docs.

Specifically, this line should be:

= JanusGraph Development Process

and other section headings should use the number of leading = equal to their header level.

The current approach of using different types of characters on a line is complex (need to remember which character means which heading level) and error-prone (must equal in length to the heading, or else it breaks. This is the type of thing I had to deal with during the global s/Titan/Janusgraph/ cleanup; see this commit for more details.

I am working on a change to convert all existing headers to the Asciidoc-recommended approach, so it would be nice to not add any more of these anachronistic section titles.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. I'll also move back to sentence per line.


Users wishing to contribute to JanusGraph should fork the https://github.com/janusgraph/janusgraph[JanusGraph]
repository and then submit pull requests using the Github pull request process. Please include the relevant issue
number in the title of your pull request. A vote (-1, 0, +1) is required before a pull request may be merged.
Copy link
Member

Choose a reason for hiding this comment

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

Instead of +1 / 0 / -1, can we just use the GitHub approval flow? This makes the approvals stand out, and it's easy to count them: they show up as checkmarks in the right-hand side vs. having to scan for +1 in the message stream.

Only committers / maintainers will have the ability to approve a PR, which makes it easy to tell which ones are binding vs. non-binding +1s.

Non-committers are free, and encouraged to vote. Their votes will be non-binding, but can be taken into consideration
and are still very valuable community input. The following rules apply to the voting process.

* Three +1 votes are required merge a pull request
Copy link
Member

Choose a reason for hiding this comment

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

Is this standard practice for ASF projects to require three +1s for every commit? Is this not too many? I ask because a requirement of 3 reviewers with +1 may slow down the review / submit process for PRs. Thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

Have the same feeling that 3 sounds a little too much.
How about this? Two +1 or approvals from other than the author.
In this way, committer author does not needs to explicitly cast +1.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There isn't a standard across ASF projects so I was just going off what we do on TinkerPop in this case. Two +1 approvals from other than the author sounds good to me.

RTC process should be followed.

Users wishing to contribute to JanusGraph should fork the https://github.com/janusgraph/janusgraph[JanusGraph]
repository and then submit pull requests using the Github pull request process. Please include the relevant issue
Copy link
Member

Choose a reason for hiding this comment

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

Could you clarify the relationship between Issue and PR? Every PR needs to be associated with an Issue? I am for it.
Could we include some recommendations for the commits going into the pull request? i.e. the commit message, organize the commits.

Copy link
Member

Choose a reason for hiding this comment

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

In the PR, include a statement of how the Pull Request has been tested. e.g. unit test, new test, or other testing.

* Call a vote to approve the release on https://groups.google.com/forum/#!forum/janusgraph-dev[janusgraph-dev]

Committers will be given 72 hours to review and vote on the release artifacts. A minimum of three +1 votes and more
+1's than -1's are required for a release to be approved.
Copy link
Member

Choose a reason for hiding this comment

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

Could you clarify this? Is this more relaxed than the rule for a Pull Request? Should we just do the same -1 policy as for PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ptgoetz I know this was just a suggestion, you okay with me switching this back to a -1 vetoing a release? I'm on the fence with this one because in many cases, I would imagine if anyone felt there was a serious enough issue to warrant a veto, we'd probably be in agreement, but maybe not...

Copy link
Member

Choose a reason for hiding this comment

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

@twilmes Yes that's fine. The way it usually works on Apache projects is that the release manager takes a -1 seriously and usually cancels the release vote to address it. In my experience as a release manager I've never let a release proceed if there were binding -1 votes.

@twilmes
Copy link
Contributor Author

twilmes commented Feb 13, 2017

Pushed an update, I'll squash commits after we reach consensus and are ready to merge.

Copy link
Member

@ptgoetz ptgoetz left a comment

Choose a reason for hiding this comment

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

+1

However, for larger bodies of work and significant updates and additions, the following process shall be followed.
Significant work may include, but is not limited to:

* A major new feature or subproject eg. a new storage adapter
Copy link
Member

Choose a reason for hiding this comment

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

s/eg./, e.g.,/

* Start a DISCUSS thread on the https://groups.google.com/forum/#!forum/janusgraph-dev[janusgraph-dev] list where the proposed change may be discussed by committers
and other community members
* When the proposer feels it appropriate, a VOTE shall be called
* Three +1 votes are required for the change to be accepted.
Copy link
Member

Choose a reason for hiding this comment

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

Did you want to change this to be "Two +1 votes are required..."?

== Branching

For features that involve only one developer, developers will work in their own JanusGraph forks, managing their own branches, and submitting pull requests when ready. If multiple developers wish to collaborate on a feature,
they may request that a feature branch be created in JanusGraph repository. If the developers are not committers, a JanusGraph committer will be assigned as the sheperd for that branch. The sheperd will be responsible for merging pull requests to that branch.
Copy link
Member

Choose a reason for hiding this comment

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

s/sheperd/shepherd/g :-)

== Pull Requests

Most changes to JanusGraph must be reviewed before they are committed (RTC - review-then-commit).
This workflow is performed using Github's pull request process. In instances where the committer deems the full process unnecessary, commit-then-review (CTR) may be employed.
Copy link
Member

Choose a reason for hiding this comment

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

s/Github/GitHub/g

* Documentation typo or small documentation addition
* Addition of a new test case

Any commit that is made following CTR shall include the fact that it is a CTR in the commit comments.
Copy link
Member

Choose a reason for hiding this comment

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

GitHub provides automated notifications: https://help.github.com/articles/managing-notifications-for-pushes-to-a-repository/

For example, we can create a list with the firehose of all commits / merges, e.g., janusgraph-commits@, and folks who want the firehose can subscribe to this. I've seen this done with the commit-then-review workflow in the LLVM project, it worked well.

I can set this up.

* Prepare the release artifacts
* Call a vote to approve the release on https://groups.google.com/forum/#!forum/janusgraph-dev[janusgraph-dev]

Committers will be given 72 hours to review and vote on the release artifacts.
Copy link
Member

Choose a reason for hiding this comment

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

This paragraph is written as a bulleted list (each sentence starts on a new line), but that's not how it will be rendered in HTML. If you'd like it to become a bulleted list, please make it so. Otherwise, please reflow the paragraph so that it reads as it will be rendered.

Copy link
Contributor Author

@twilmes twilmes Feb 13, 2017

Choose a reason for hiding this comment

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

Hm, not sure if I understand. When I build the docs this renders as a bulleted list as I expected.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not referring to "Prepare" and "Call", I'm referring to "Committers will be given ..." and following sentences. That also renders as a bulleted list?


* A major new feature or subproject eg. a new storage adapter
* Incrementing the version of a core dependency such as a Apache TinkerPop
* Addition or deprecation of a public API
Copy link
Member

Choose a reason for hiding this comment

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

Bringing in a major dependency.

Copy link

@amcp amcp left a comment

Choose a reason for hiding this comment

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

Minor updates

Their review will be non-binding, but can be taken into consideration and are still very valuable community input.
The following rules apply to the voting process.

* Two committer approvals are required merge a pull request
Copy link

Choose a reason for hiding this comment

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

s/required merge/required to merge/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, fixed.


=== Branch Naming Conventions

All branch names shall be prepended with `Issue_#_`.
Copy link

Choose a reason for hiding this comment

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

For example, if there was an issue 114 to add Tupl support to JanusGraph, and people needed to collaborate on this branch, then it could be named Issue_114_Tupl. This naming convention only applies to hosted branches created for collaboration, not to branches in forks created for normal pull requests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to note that this only applies to the main JanusGraph repo.


Users wishing to contribute to JanusGraph should fork the https://github.com/janusgraph/janusgraph[JanusGraph] repository and then submit pull requests using the GitHub pull request process.
Every pull request must be associated with an existing issue.
Be sure to include the relevant issue number in the title of your pull request and a description of what test suites were run to validate the pull request.
Copy link

Choose a reason for hiding this comment

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

CI will run tests for you (ideally). Eventually, we should probably ask for contributors to note any special testing steps they took.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. I think we should leave this in for now and then when CI is in good shape, we can update.

@twilmes
Copy link
Contributor Author

twilmes commented Feb 18, 2017

I made a few updates based upon @amcp feedback. At this point there has been good review of this so I cleaned up the commits. Are we ready to merge?

@amcp
Copy link

amcp commented Feb 18, 2017

I'm ok with the changes, how about @mbrukman ?

@twilmes
Copy link
Contributor Author

twilmes commented Feb 23, 2017

@mbrukman you okay with leaving the CTR text as is and then when we get the janusgraph-commits firehose setup, I'll make an update to remove the requirement to notify the dev list? If so, I think we can go ahead and merge and close this issue out.

@mbrukman
Copy link
Member

@twilmeshttps://groups.google.com/forum/#!forum/janusgraph-commits is now being populated.

Copy link
Member

@mbrukman mbrukman left a comment

Choose a reason for hiding this comment

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

Consider adding a link to the new commits list in the doc.

* Documentation typo or small documentation addition
* Addition of a new test case

Any commit that is made following CTR shall include the fact that it is a CTR in the commit comments.
Copy link
Member

Choose a reason for hiding this comment

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

@twilmes
Copy link
Contributor Author

twilmes commented Feb 24, 2017

Thanks for creating the list @mbrukman. I'll add the link in and get this merged.

@twilmes twilmes merged commit 8c34655 into JanusGraph:master Feb 24, 2017
@twilmes twilmes deleted the issue_95_developer_docs branch February 24, 2017 23:50
bwatson-rti-org pushed a commit to bwatson-rti-org/janusgraph that referenced this pull request Mar 9, 2019
Issue 95: Adding first version of development process documentation.
micpod pushed a commit to micpod/janusgraph that referenced this pull request Nov 5, 2019
Issue 95: Adding first version of development process documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This PR is compliant with the CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants