|
| 1 | +## Title |
| 2 | +Service vs. library: It's inner source, not inner deployment |
| 3 | + |
| 4 | +## Patlet |
| 5 | +Teams in a DevOps environment may be reluctant to work across team boundaries on |
| 6 | +common code bases due to ambiguity over who will be responsible for |
| 7 | +responding to service downtime. The solution is to realize that often it's |
| 8 | +possible to either deploy the same service in independent environments with |
| 9 | +separate escalation chains in the event of service downtime or factor a lot of |
| 10 | +shared code out into one library and collaborate on that. |
| 11 | + |
| 12 | +## Problem |
| 13 | + |
| 14 | +When teams are working in a DevOps environment developers are responsible for a |
| 15 | +feature end-to-end: From the customer down to deployment, maintenance and |
| 16 | +support. This poses a challenge when working across team boundaries: Escalation |
| 17 | +chains may not be the same for errors happening in either team. Coupling |
| 18 | +source code and deployment leaves the teams with the question of who is |
| 19 | +responsible for on-call support in the event of errors. As a result teams are |
| 20 | +reluctant to join forces even if there is significant overlap in requirements. |
| 21 | + |
| 22 | +## Context |
| 23 | + |
| 24 | +Teams are working in a micro-services environment. |
| 25 | + |
| 26 | +They are organised in full functional DevOps teams: Each team is responsible for |
| 27 | +their contributions end-to-end, including maintenance, on-call and customer |
| 28 | +support. |
| 29 | + |
| 30 | +A team is tasked with providing a service to their downstream customers that is |
| 31 | +fairly similar to an existing service built by another team. |
| 32 | + |
| 33 | +## Forces |
| 34 | + |
| 35 | +Organisational escalation paths may be different for each of the teams. |
| 36 | + |
| 37 | +Members of each team may be unwilling to answer on-call support for errors that |
| 38 | +do not affect their own downstream customers. |
| 39 | + |
| 40 | +Severity levels for the same types of errors may be different across team |
| 41 | +boundaries due to different SLA definitions per team/customer relationship. |
| 42 | + |
| 43 | +## Solutions |
| 44 | + |
| 45 | +Decouple responsibility for source code from deployment: Both teams work to |
| 46 | +identify exactly where there is overlap and synergies. |
| 47 | + |
| 48 | +Only shared source code is kept as part of the InnerSource project with shared |
| 49 | +responsiblity. |
| 50 | + |
| 51 | +Decouple configuration and deployment pipelines from actual business logic. |
| 52 | +Establish a second deployment of the service for the second team. |
| 53 | + |
| 54 | +Treat the common base as a library that is used by both teams with shared code |
| 55 | +ownership. |
| 56 | + |
| 57 | +## Resulting Context |
| 58 | + |
| 59 | +Teams are willing to collaborate, benefitting from sharing the work of |
| 60 | +implementing the business logic. |
| 61 | + |
| 62 | +A service that originally was built specifically to work in one environment is |
| 63 | +converted into a more general solution based on a specific business requirement. |
| 64 | + |
| 65 | +Both teams get to know their respective escalation policy and deployment setup, |
| 66 | +potentially identifying improvements for their own setup. |
| 67 | + |
| 68 | +The likelihood that changes are needed and made in the shared source code |
| 69 | +increases, leading to more frequent oportunities to refine, improve and optimise |
| 70 | +the implementation. |
| 71 | + |
| 72 | +## See also |
| 73 | + |
| 74 | +Related to this pattern is the [Thirty day warrenty](https://github.com/paypal/InnerSourcePatterns/blob/master/30-day-warranty.md) pattern that takes a different approach to solving the forces described above. |
| 75 | + |
| 76 | +## Known instances |
| 77 | + |
| 78 | +Europace AG |
| 79 | + |
| 80 | +## Author(s) |
| 81 | + |
| 82 | +Isabel Drost-Fromm |
| 83 | + |
| 84 | +## Acknowledgements |
| 85 | + |
| 86 | +Thank you Tobias Gesellchen for review internal to Europace AG. |
| 87 | + |
0 commit comments