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
Optimistic Merging Guidelines #208
Comments
@rdebeasi - I think this is good stuff! Great stuff in fact and maybe the resolution to this item as it's raised as an issue, we capture the workflow you're suggesting in a the / a development guide. I think we should only do that once some consensus has been reached on this ticket. Perhaps if people thumbs up if they're cool with this going into our dev guide or thumbs down if not? One thing I would add to the
I think item Also to help us with For our MD content, there are Markdown linters available and perhaps we should employ some of those for content that is not created through the CMS and see if it provides any value. |
@rdebeasi i like the initial solution and agree on the flow. The small modifications that @springdo added made it better. I feel we might want to further clarify or change the word Now it's ensuring we follow it. good intentions will suffer from bad implementation. Let's make good on the intentions of this workflow and path! |
This is a great discussion. Some quick thoughts from reading your intro @rdebeasi
|
Personally, I think we should have a standalone guide or put this in the CONTRIBUTING.md file. Also as the number of practices grows it would be nice to visually see:
Final thought - would this work for the CMS workflow that we have in place and not just for code? |
Further on this, we can probably provide an issue template and a PR template that incorporate these simple rules as well. |
One concern I have is the "consensus" requirement. Before we can move forward, I feel like we need a MUCH better definition or refinement around that. Who determines what constitutes consensus? How many people need to agree? Choosing a percentage of contributors becomes problematic as people join and leave the project. Perhaps we consider stating that X number of people need to find value in the change/addition and we consider that sufficient? |
Good conversation here. I also wondered whether one approach can/should apply to both code contributions and content contributions. One thing to consider is the UX and UI designs that are emerging. The early designs include an "Improve this Practice" button at the bottom of each practice page. My immediate assumption was that this button would take the user into the CMS and allow them to make updates and additions. That would then be submitted, by the bot, as a PR. However, the approach outlined above suggests it should actually take the user to submit a GitHub issue and they would have to wait for a period of time to get sufficient consensus to go on to adjust the content and submit for review (thus raising a PR). I'm wondering if this is a poorer user experience and will detract from people adding content. Likewise, the CMS has a "New Practice" button. Once we have the template of a practice configured, my expectation was that the user submits the new practice into review and the content moderator reviews the associated PR (optimistically merging if it conforms to tests we define). But I guess this would bypass the step of gaining consensus via a GitHub issue before the content is submitted? |
That's a really interesting trade-off. Being able to immediately submit a PR is definitely a more engaging experience, and I can definitely see how a complicated process would discourage contributors. On the other hand, imagine the opposite: a new contributor gets excited and submits a new practice without raising an issue first. The new practice is something that the community thinks isn't a good fit for the practice library: maybe it's an article about the finer points of JavaScript, or it's tied to a project management framework like PRINCE2 or ITIL, or it's a duplicate of another practice. Do you tell the new contributor, "Sorry, this is out of scope" and close the PR? Do you encourage the contributor to rewrite the practice to suit the Library? Do you just merge it, ignore the contributing guidelines, and include content that disappoints or confuses the rest of the community? At that point, none of the options are really great. Wearing the implementation hat for a moment, it's also worth noting that although the CMS isn't ready for public use yet, GitHub issues probably are. 😄 |
Good points and examples @rdebeasi and definitely very good food for thought. One comment on the example about adding practices tied to a PM framework like PRINCE2, I would actually welcome inclusion of these in the Practice Library as long as the content complies with the template in place (e.g. detailing what, why, how and tied to the relevant element of the Mobius Loop or Foundation layer, etc.). I see this Library as a place for many practices and it's up to the user to select (utilising supporting features) the ones he/she wants to use to achieve their outcome. The loop supports journeys on both Agile and Waterfall approaches. That aside, I'm still on the fence about whether it makes sense to push every idea of an update down a path of defining details about the update, getting sign off / consensus before doing the work or whether there are some situations where going straight to PR is more pragmatic. I think @InfoSec812 's point about how many people represents consensus is very important. I also think some kind of target around response (e.g. in 24 hours?) is going to be important to keep the community engaged and keep the value stream's length from idea to value as low as possible. |
ADD first pass at PR template for merging code. #208
I really like @tdbeattie and @InfoSec812's points about consensus. Maybe we combine them and say something like, "Submit an issue, give the community a day or two to provide feedback, and as long as feedback is mostly positive, move forward. If you don't get any feedback, feel free to move forward." I agree that for smaller changes - really any content change that's not creating a new practice - going straight to a PR is probably more pragmatic. For example, fixing a broken link or adding a reference probably doesn't require an issue. |
@tdbeattie something moderators of the content will need to be careful of are changes/updates to content that are actually modifying the intent or the purpose of an existing practice too much. For cases like this, or any that would modify the content of a practice more than rudimentary things like links/spelling/grammar/formatting, I would desire an issue be created first for commentary and then a PR created that suits that need and also support the consensus created (or closing of the issue). This brings an interesting question on the hardship of having multiple contribution workflows. Could we just have a dual path for updating? One that is asked after clicking the "Improve This Practice" like "Are you making minor adjustments?" or "Are you modifying one or more sections of the practice?". |
@rdebeasi - you're suggested text of "Submit an issue, give the community a day or two to provide feedback, and as long as feedback is mostly positive, move forward. If you don't get any feedback, feel free to move forward" is great! I really like that. |
+1 and the process will be in git, so it can always be amended later! |
Can we keep it simple for now and add that branching later if we find that we need it? |
I've added the process we discussed to our development guide in #332. Before this PR is merged, I have a couple of questions:
Merging the PR will close this issue. In the spirit of small, incremental changes, I'd propose that we discuss future changes to workflow in a new issue. Thank you all for your thoughtful discussion on this! 🚀 💻 🍨 |
Resolved by #332. |
Optimistic Merging Guidelines
We've discussed "optimistic merging" for pull requests on this project, but there are some questions on what exactly that term means.
To address that disconnect, I'd like to propose some specific guidelines. If there's consensus on these ideas, I'll write up a document explaining our decision and submit it as a PR.
Background
Optimistic merging was first proposed a few years ago by Pieter Hintjens of the ZeroMQ community in a blog post called Why Optimistic Merging Works Better. That project's Collective Code Construction Contract (C4) is an expanded and formalized version of the same idea.
Here's the workflow as I understand it:
A "correct patch" is one which:
Examples
For some examples of how optimistic merging happens in the real world, see ZeroMQ's closed pull requests.
Contributors make small PRs that each solve one agreed-upon problem. The PRs include detailed commit messages documenting the problem and solution, usually with a reference back to the associated issue.
In exchange, maintainers merge correct patches quickly and give clear, concise feedback on incorrect patches. The patch might be deemed incorrect if tests fail or the PR doesn't follow C4. In that case, contributor either makes the requested changes or closes the PR.
Both contributors and maintainers do some extra work to make this rapid feedback loop happen, and everyone checks their egos at the door. Landing a patch isn't a fight; it's more like a careful dance.
What does this mean for the Library?
There are of course a few differences between ZeroMQ and the Open Practice Library. ZeroMQ is a large, mature piece of software. The Open Practice Library is young (but growing!) project that's a mix of content and code. ZeroMQ has a formal release process; the last stable release was 4 months ago. The Open Practice Library has no formal release process; the site is automatically deployed as soon as a PR is merged. The last release of the Library was - checks watch - 20 minutes ago.
I like the speed with which we're shipping changes and don't want to slow down, but the trade-off is that we have to take some care. If a ZeroMQ maintainer merges a bug, the community has time to fix the bug before release. If we merge a bug, it's immediately shipped to production.
You can't write automated tests for practices, of course. Instead, I propose that we use the Contributing Guide as a sort of "unit test for content." If the "tests" in this guide fail, the PR must be modified so that they pass before it can be merged. If the tests pass, the PR can be merged immediately.
We can (and should!) write tests for our code, but work on our current iteration began last week, and as a result we currently have a test coverage of 0%. Right now, the project is changing so rapidly that we'll probably invalidate tests almost as quickly as we write them. I propose that we use a combination of automated and manual testing for code PRs.
We recently added automated deploy previews as a first step towards a full CI/CD pipeline. As our codebase stabilizes and our test coverage increases, we'll aim to gradually reduce the amount of manual testing to zero.
tl;dr
With the considerations above, I think the Optimistic Merging/C4 guidelines apply pretty nicely to our project. Well-formed patches are accepted quickly. If a patch fails CI or doesn't solve an agreed-upon problem, the maintainer provides kind, constructive, clear feedback, and the community moves forward.
A review is a rapid feedback loop, not meaningless bureaucracy or a rubber stamp. To misquote Mark Zuckerberg, move fast and don't break things.
I'd very much like to hear the community's opinions on this topic. Please feel free to leave comments on this issue.
Thank you for your time, and be excellent to each other.
The text was updated successfully, but these errors were encountered: