2015-06-07 23:07:20 -04:00
|
|
|
<!--[metadata]>
|
|
|
|
+++
|
|
|
|
title = "Advanced contributing"
|
|
|
|
description = "Explains workflows for refactor and design proposals"
|
|
|
|
keywords = ["contribute, project, design, refactor, proposal"]
|
|
|
|
[menu.main]
|
|
|
|
parent = "smn_contribute"
|
2015-06-16 09:04:13 -04:00
|
|
|
weight=6
|
2015-06-07 23:07:20 -04:00
|
|
|
+++
|
|
|
|
<![end-metadata]-->
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
# Advanced contributing
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
In this section, you learn about the more advanced contributions you can make.
|
|
|
|
They are advanced because they have a more involved workflow or require greater
|
|
|
|
programming experience. Don't be scared off though, if you like to stretch and
|
|
|
|
challenge yourself, this is the place for you.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
This section gives generalized instructions for advanced contributions. You'll
|
|
|
|
read about the workflow but there are not specific descriptions of commands.
|
|
|
|
Your goal should be to understand the processes described.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
At this point, you should have read and worked through the earlier parts of
|
|
|
|
the project contributor guide. You should also have
|
|
|
|
<a href="../make-a-contribution/" target="_blank"> made at least one project contribution</a>.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
## Refactor or cleanup proposal
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
A refactor or cleanup proposal changes Docker's internal structure without
|
|
|
|
altering the external behavior. To make this type of proposal:
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
1. Fork `docker/docker`.
|
|
|
|
|
|
|
|
2. Make your changes in a feature branch.
|
|
|
|
|
|
|
|
3. Sync and rebase with `master` as you work.
|
|
|
|
|
|
|
|
3. Run the full test suite.
|
|
|
|
|
|
|
|
4. Submit your code through a pull request (PR).
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
The PR's title should have the format:
|
|
|
|
|
|
|
|
**Cleanup:** _short title_
|
|
|
|
|
|
|
|
If your changes required logic changes, note that in your request.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
5. Work through Docker's review process until merge.
|
|
|
|
|
|
|
|
|
|
|
|
## Design proposal
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
A design proposal solves a problem or adds a feature to the Docker software.
|
|
|
|
The process for submitting design proposals requires two pull requests, one
|
|
|
|
for the design and one for the implementation.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
![Simple process](/project/images/proposal.png)
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
The important thing to notice is that both the design pull request and the
|
|
|
|
implementation pull request go through a review. In other words, there is
|
|
|
|
considerable time commitment in a design proposal; so, you might want to pair
|
|
|
|
with someone on design work.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
The following provides greater detail on the process:
|
|
|
|
|
|
|
|
1. Come up with an idea.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
Ideas usually come from limitations users feel working with a product. So,
|
|
|
|
take some time to really use Docker. Try it on different platforms; explore
|
|
|
|
how it works with different web applications. Go to some community events
|
|
|
|
and find out what other users want.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
2. Review existing issues and proposals to make sure no other user is proposing a similar idea.
|
|
|
|
|
|
|
|
The design proposals are <a
|
|
|
|
href="https://github.com/docker/docker/pulls?q=is%3Aopen+is%3Apr+label%
|
2015-04-23 03:43:04 -04:00
|
|
|
3Akind%2Fproposal" target="_blank">all online in our GitHub pull requests</a>.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
3. Talk to the community about your idea.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
We have lots of <a href="../get-help/" target="_blank">community forums</a>
|
|
|
|
where you can get feedback on your idea. Float your idea in a forum or two
|
|
|
|
to get some commentary going on it.
|
|
|
|
|
2015-03-06 13:01:31 -05:00
|
|
|
4. Fork `docker/docker` and clone the repo to your local host.
|
|
|
|
|
|
|
|
5. Create a new Markdown file in the area you wish to change.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
For example, if you want to redesign our daemon create a new file under the
|
|
|
|
`daemon/` folder.
|
|
|
|
|
|
|
|
6. Name the file descriptively, for example `redesign-daemon-proposal.md`.
|
2015-03-06 13:01:31 -05:00
|
|
|
|
|
|
|
7. Write a proposal for your change into the file.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
This is a Markdown file that describes your idea. Your proposal
|
|
|
|
should include information like:
|
|
|
|
|
2015-04-15 17:11:58 -04:00
|
|
|
* Why is this change needed or what are the use cases?
|
2015-03-07 08:06:40 -05:00
|
|
|
* What are the requirements this change should meet?
|
|
|
|
* What are some ways to design/implement this feature?
|
|
|
|
* Which design/implementation do you think is best and why?
|
|
|
|
* What are the risks or limitations of your proposal?
|
|
|
|
|
|
|
|
This is your chance to convince people your idea is sound.
|
|
|
|
|
2015-03-06 13:01:31 -05:00
|
|
|
8. Submit your proposal in a pull request to `docker/docker`.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
The title should have the format:
|
|
|
|
|
|
|
|
**Proposal:** _short title_
|
|
|
|
|
|
|
|
The body of the pull request should include a brief summary of your change
|
|
|
|
and then say something like "_See the file for a complete description_".
|
|
|
|
|
2015-03-06 13:01:31 -05:00
|
|
|
9. Refine your proposal through review.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
The maintainers and the community review your proposal. You'll need to
|
|
|
|
answer questions and sometimes explain or defend your approach. This is
|
|
|
|
chance for everyone to both teach and learn.
|
|
|
|
|
2015-03-06 13:01:31 -05:00
|
|
|
10. Pull request accepted.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
Your request may also be rejected. Not every idea is a good fit for Docker.
|
|
|
|
Let's assume though your proposal succeeded.
|
|
|
|
|
2015-03-06 13:01:31 -05:00
|
|
|
11. Implement your idea.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
Implementation uses all the standard practices of any contribution.
|
|
|
|
|
|
|
|
* fork `docker/docker`
|
|
|
|
* create a feature branch
|
|
|
|
* sync frequently back to master
|
|
|
|
* test as you go and full test before a PR
|
|
|
|
|
|
|
|
If you run into issues, the community is there to help.
|
|
|
|
|
2015-03-06 13:01:31 -05:00
|
|
|
12. When you have a complete implementation, submit a pull request back to `docker/docker`.
|
|
|
|
|
|
|
|
13. Review and iterate on your code.
|
|
|
|
|
2015-03-07 08:06:40 -05:00
|
|
|
If you are making a large code change, you can expect greater scrutiny
|
|
|
|
during this phase.
|
|
|
|
|
2015-03-06 13:01:31 -05:00
|
|
|
14. Acceptance and merge!
|
|
|
|
|
2015-04-21 11:50:09 -04:00
|
|
|
## About the advanced process
|
2015-03-25 18:47:15 -04:00
|
|
|
|
|
|
|
Docker is a large project. Our core team gets a great many design proposals.
|
|
|
|
Design proposal discussions can span days, weeks, and longer. The number of comments can reach the 100s.
|
|
|
|
In that situation, following the discussion flow and the decisions reached is crucial.
|
|
|
|
|
|
|
|
Making a pull request with a design proposal simplifies this process:
|
|
|
|
* you can leave comments on specific design proposal line
|
|
|
|
* replies around line are easy to track
|
|
|
|
* as a proposal changes and is updated, pages reset as line items resolve
|
2015-06-13 12:21:50 -04:00
|
|
|
* GitHub maintains the entire history
|
2015-03-25 18:47:15 -04:00
|
|
|
|
|
|
|
While proposals in pull requests do not end up merged into a master repository, they provide a convenient tool for managing the design process.
|