-
Notifications
You must be signed in to change notification settings - Fork 3.1k
ADR-0000 Introduce ADR process #21947
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
base: dev
Are you sure you want to change the base?
Conversation
| ### Pros and Cons of the Options | ||
|
|
||
| Explain the reasoning process for each option. | ||
|
|
||
| This section answers the future developer’s question: | ||
|
|
||
| > Why didn’t we choose the other obvious solution? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here it might be an option that we also provide code samples how the other implementations would look like. I did not add it to the README yet, but would probably be interesting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be useful exactly in the cases of introducing new library / pattern.
| - Use the MADR template from [https://adr.github.io/madr/](https://adr.github.io/madr/) | ||
| - ADRs will be required for significant architectural decisions, such as: | ||
| - introducing a new technology, including: | ||
| - new RubyGems or NPM packages when they are not trivial and introduce new usage patterns (i.e. Angular, React, dry-rb, etc.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope it is clear enough that I do not mean that every new gem or NPM package needs an ADR. It should be that if we do something like switch from Angular to Turbo, etc that this should become an ADR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only future will tell how clear this was. Taking the dry-rb example: AFAIK it was introduced as a "test balloon" in storages and now it lives an isolated life there.
To me the question would be at which point we start the ADR process:
- before launching the test balloon
- Good, because it ensures that the decision and its drivers are documented properly
- Bad, because it could lead to process fatigue
- after launching the test balloon
- Good, because ideas can be quickly validated/falsified
- Bad, because after the fact people are less likely to care about proper documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it depends a bit. If we had had an ADR that specifies that our Service objects use our own service classes, than introducing dry-monads would have needed an ADR that replaces the old one. In that process the developers would have to make a case why the new solution is better than the old one. And we would have to make a decision to switch our entire codebase.
But I get your point. We need to be allowed to play around with technologies. But at some point we will have to make a decision if the new technology is a viable way forward or not. And if we decide either way one will have to bite into the sour apple and depending on outcome in this case
a) Get rid of our old service classes in the entire codebase and replace them with dry-monads
b) Get rid of the "test balloon" and replace dry-monads with our old service classes
But than we also have to agree that there must be time set aside to go through with these.
| - ADRs will be required for significant architectural decisions, such as: | ||
| - introducing a new technology, including: | ||
| - new RubyGems or NPM packages when they are not trivial and introduce new usage patterns (i.e. Angular, React, dry-rb, etc.) | ||
| - introducing new databases or services that need to be included in the deployment process |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be something like introducing hocuspocus. This needs to be considered in the deployment process, etc, so it should at least be discussed how SaaS, self-hosted, docker, etc deployments work.
|
I like what I see! Thanks for moving with this, @klaustopher. I'll discuss with @Kharonus about writing retroactive ADRs about our introduction of multiple dry-rb libs to the code-base in a retroactive way. |
mereghost
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this.
klaustopher
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion for code examples
|
|
||
| <!-- This is an optional element. Feel free to remove. --> | ||
|
|
||
| {example | description | pointer to more information | …} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| {example | description | pointer to more information | …} | |
| { code example | example | description | pointer to more information | …} |
| Explain the reasoning process for each option. | ||
|
|
||
| This section answers the future developer’s question: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Explain the reasoning process for each option. | |
| This section answers the future developer’s question: | |
| Explain the reasoning process for each option. | |
| When the ADR is about introducing a package or a new coding pattern, show some code examples for each option so we can compare how the newly introduced pattern will be used. | |
| This section answers the future developer’s question: |
| - Be immutable once accepted (updates require a new ADR that supersedes the previous one) | ||
| - Be revisited when: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me revisited suggests changing the decision which contradicts immutability.
Also is it worth mentioning the way (removal, marking them so, …) to handle outdated decisions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The process is mentioned in the readme, i don't think it needs to be part of the template. WDYT?
About revisiting, yeah, I agree, let's word this differently. The process is that it can be superseded and be archived. See the README for details.
| - The decision becomes **mandatory** for the entire development team | ||
| - All developers must follow it | ||
| - Pull request reviewers should actively point out violations | ||
| - If the ADR contained Confirmation steps, these should be implemented as soon as possible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - If the ADR contained Confirmation steps, these should be implemented as soon as possible | |
| - The ADR records a shared team decision and establishes the preferred default approach. | |
| - Developers should apply the spirit and intent of the decision, using their professional judgment where the ADR does not (or cannot) give explicit guidance. | |
| - Code reviewers should surface deviations and uncertainties to ensure the decision is being understood and applied consistently. | |
| - If the ADR defines Confirmation steps, these should be implemented as soon as is reasonably practical. |
There should be an "escape hatch" for when ADR decisions might (occasionally) need to be overridden. I'm not sure if we need a separate section for this, but it could look like:
Exceptions
- Exceptions are allowed when the ADR is impractical, incomplete, or counterproductive in a specific context.
- Any exception should be explicit and visible (for example: noted in the pull request, code comments, or follow-up ADR).
- Exceptions and recurring friction are treated as input to the feedback loop, and may result in clarifying, amending, or superseding the ADR.
- An ADR should never be used as a disciplinary tool; its purpose is alignment, not enforcement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kind of disagree. When we give escape routes, we are talking about guidelines and not rules. For example when we decide to use Angular as our Frontend Framework, a developer should not be allowed to just add a React component and comment in the PR with "made more sense here". In this case, the ADR that forces us to use Angular should be archived and superseded by another one that allows Angular and React for certain cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its purpose is alignment, not enforcement
While I like this, it feels like a slippery slope to me. Essentially we can ignore ADRs whenever we don't like their impact.
It's a bit like "asking for forgiveness" instead of "asking for permission".
(I am not saying we shouldn't allow exceptions, but I am not sure whether we should formally put the option for exceptions in)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I am not saying we shouldn't allow exceptions, but I am not sure whether we should formally put the option for exceptions in)
If people do find it difficult to adhere for whatever reason, then it's much better if those reasons are visible and documented. We don't want devs slipping in changes surreptitiously because they find one of our ADR decisions too rigid or the process too arduous. We do want our process to reflect reality!
It's a bit like "asking for forgiveness" instead of "asking for permission".
FWIW, when in doubt, I always opt for the first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a developer should not be allowed to just add a React component and comment in the PR with "made more sense here".
That's clearly not an acceptable level of documentation! I've actually opened a couple PRs that use Primer React components - primarily for discussion / Proof of Concept. I wouldn't want that ability to experiment to be curtailed!
The onus would be on me to elaborate a bit. Perhaps:
"This is an experiment that investigates exposing React components as custom elements in order to take advantage of the improvements only currently available in the Primer implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it will be a question of how detailed we will go with ADRs. I don't think we will have tons of them covering every little detail of how we write code. Just important ones, like introducing new technologies (like Primer View Components for example).
Actually, Primer View Components are a very good example. Since their introduction, we have not added new pages to our code that use SPOT. Whenever we touched something we thought about migrating it to Primer when it was feasible. So this is the perfect example of what would be handled in an ADR and how it is enforced.
If we did an ADR that enforces for example Angular as our frontend technology, then I personally would say, you can experiment with React, sure, but if you want to merge it into the codebase, the ADR has to be adjusted before we do this.
Same thing goes for if we say in an ADR that Service objects are done using our Service class, then it is forbidden to introduce something like dry-monads into the codebase until the ADR has been replaced and explicitly allows for either both or only the new one.
One can experiment in PRs and make a case for why the ADR needs to be changed.
But we all know too well, if we start violating something like this we agreed on in one place with the intent "let's just add this one React thing here, see how it goes, and in a few weeks we will remove it" ... That then gets fogotten and stays in there forever until somebody comes along and is wondering why there is React in here, if we clearly state in an ADR that we do not use React.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am with Klaus on this one to be honest. Otherwise ADRs risk to become pointless. However, let's also be clear that it's in the end on the ADR to allow for certain exclusions.
I find it hard to discuss @myabc's use of React components right now, because an ADR forbidding to do so, doesn't exist. What would our ADR look like? Does it say "we only use tool X" or does it say "we primiarily use tool X" or "in this specified area we use tool X"?
If we don't treat ADRs as binding agreements among developers, then I am not sure why we should do them.
An ADR should never be used as a disciplinary tool; its purpose is alignment, not enforcement.
And maybe to elaborate on terms such as "binding agreement", "disciplinary tool" and "enforcement". So far I didn't read anything about fines to be paid or jail time to be incurred, if you violate an ADR. So I don't see any enforcing functions included.
It's a gentlemen's agreement that we do not violate the rules we set out to play by and I think there will be plenty of violating those rules happening even without us already writing down every possible way that we do not want to follow them beforehand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I don't see any enforcing functions included.
Well, it states in the template that we should however possible use "enforcement" tools like Rubocop, Danger, etc. While those do not fine developers, there should be as much enforcement as possible.
For example, when we add a rubocop rule that will enforce an ADR, there should at least be a discussion in the pull request, when that rule is explicitly disabled for a file that was added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it say "we only use tool X" or does it say "we primiarily use tool X" or "in this specified area we use tool X"?
Primer View Component is the default. Use Primer's View Compnent implementation unless you have a very good reason not to.
I guess this could be codified in the relevant ADR rather than ADR 0001.
myabc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ve added some suggestions to After Merge
This is a solid starting point, but I think the current wording may come across as a bit rigid. My concern is that ADRs should reinforce shared conventions and team consensus, rather than read like a strict rulebook.
A few general points behind the suggestions:
- ADRs should never become a stick to beat people with. More carrot, less stick! 🥕
- We should provide a clear “escape hatch,” so exceptions are visible, documented, and feed back into the decision process.
- We can’t realistically codify rules for every situation. Given the pace of change and our existing culture, it’s important that developers apply the intent of decisions and use their judgment to fill in the gaps where needed.
NobodysNightmare
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, this is big. Let me state this first: I am willing to try this process out, but I am definitely skeptical about some aspects.
If ADR-0000 is any indication, that an ADR will be a long piece of text. Long pieces of text are hard to read and to write. And I even included comments that ADR-0000 is too short in its current state.
I am curious how this develops and how it stands over time.
| ### Consequences | ||
|
|
||
| - Good, because decisions and their rationale are preserved long-term | ||
| - Good, because new team members can quickly understand system architecture |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering whether this will be true. Once we have our first 20 ADRs that are sorted by time of introduction, I am really wondering whether they are:
- quick to grasp
- giving a proper understanding of the system architecture
This sounds like the intended/hoped for outcome.
In other words (no clue if this is formally correct):
| - Good, because new team members can quickly understand system architecture | |
| - Good, because new team members can quickly understand system architecture | |
| - Risk, that we only get the added work (reading and writing ADRs), without intended benefits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the point. The question is, how deep you have to go into the ADR to understand it. The points Decision Outcome and Consequences are the sections where somebody who just wants to understand what the decision is, can basically stop reading. If for example a new developer wants to dive deeper and see for example why we chose Turbo as our frontend technology, they can continue reading on.
Maybe there should also be a one pager that looks something like.
We use Turbo as our frontend technology
Bla bla bla .. explanation. For further details, see ADR-0042
We use Grape for our API
Bla Bla Bla .. explanation. For further details, see ADR-0001
So we have something to point people to so that they can quickly grasp the outcomes, without needing to read through many pages of details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this idea.
It will work sufficiently for "tool choices" at least. Once you get to processes and patterns that need explaining, I think there is the part where you still need to explain the pattern as part of the ADR.
E.g. some of my later comments in this PR are about our implementation choices for ADRs. That's something people should also read.
| ### Document decisions in the wiki or issue tracker | ||
|
|
||
| - Good, because easy to write and familiar to teams | ||
| - Good, because searchable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - Good, because searchable | |
| - Good, because searchable | |
| - Good, because referenceable from other work items | |
| - Good, because tracking time on the work involved in an ADR is possible |
edit: After being nearly done, with the review, I could log more than an hour on ADR-0000 for the initial review alone
|
|
||
| 2. **Choose the next number** | ||
|
|
||
| ADRs are numbered sequentially. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This question might sound stupid, but how do we handle race conditions?
I.e. since ADRs are accepted in pull requests, it's easily possible that the latest ADR in edit: Just now read that the answer is "coordinate", adjacent question below remains valid as far as I can tell.dev is 0000, but there are already two PRs that each want to introduce a new ADR.
Adjacent question: Do rejected ADRs get a number and a place in the docs as well? (I can see good and bad for both ways)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that there is no rejected state. When an ADR is suggested and the team decides against it, the PR is closed and it is not added to the repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As for the conflict ... We will not be adding 100s of ADRs. If two ADRs come in at the same time, I count on mature developers agreeing that one has to rename theirs.
|
|
||
| If specific developers have expertise, explicitly request their input and collaboration. | ||
|
|
||
| 7. **Add to Dev Weekly agenda** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something that I notice: Some of the process parts are restricted to OpenProject GmbH employees. I think practically this is fine, since I've not seen any outside contribution/contributor yet that had a significant enough impact that they'd ever need an ADR for their contributions.
Still it feels like a violation of the open aspect in open source, that certain parts of the development process for this tool are by design reserved to employees.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is us setting the agenda here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you mean, maybe I wasn't clear enough about my concern:
Right now the process requires mentioning a private matrix channel and putting the topic up on an agenda of a private meeting. This excludes the public from this kind of change on a process level.
As I said, this is probably not a practical problem, since I've not seen any outside contributions of a magnitude that they would require (or be interested in) changing ADRs. Still we should be aware that this is a barrier we are adding here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should design the process so that it works for us, the company. If we ever see outside contribution in a relevant mass, where it would make sense that people would attend our dev discussion meetings, we will have to set up a lot of different processes anyway. I think tackling this now might be premature optimization for a case that will likely never happen.
If it comes to this, that an outside contributor is heavily invested in the process, we can invite them to meetings.
|
|
||
| ## Goal of ADRs | ||
|
|
||
| ADRs are not bureaucracy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Said every bureaucrat about every bureaucratic process ever. Most processes were born out of good intentions, some people even pave roads with good intentions.
I still think that we should try it out and see whether they help, but reading a line like this is literal rage bait for me xD
Co-authored-by: Ivan Kuchin <[email protected]>
Co-authored-by: Jan Sandbrink <[email protected]>
Co-authored-by: Jan Sandbrink <[email protected]>
|
I would suggest we move ADRs into docs/development/decisions, so that they turn up at the appropriate place on the website. maybe @as-op has a better/stronger opinion on that one |
|
Hi all, if we want to have it on the website
We probably should discuss this in the dev weekly first, if we want/need that. |
Co-authored-by: Jan Sandbrink <[email protected]>
Co-authored-by: Jan Sandbrink <[email protected]>
|
@as-op I usually use the website, not the GitHub repo to navigate the developer documentation, so I think it would be nice to have it on there. For maintenance purposes, it's easier to keep them in a flat folder however rather than each one in an individual folder? If it's not too much effort, rewriting them on the docs download would be my preferred option |
|
@oliverguenther Fine with me, shouldn't be a large effort to adjust. |
|
Ah and one more thing. The website does not render the markdown frontmatter itself, so would either need to be included in the markdown source or the docs action has to be adjusted to transform it. |
There will be a proper template here ... :D
This introduces the ADR process. It includes
ADR-0000introducing the processFeel free to leave inline comments in the markdown files. Looking forward to the discussion.