-
Notifications
You must be signed in to change notification settings - Fork 23
ADR for improved SDLC #860
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
Draft
martinothamar
wants to merge
3
commits into
main
Choose a base branch
from
chore/adr-for-dev-test-release-process
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| # A short descriptive title - what is the outcome of this adr? | ||
|
|
||
| - Status: Proposed | ||
| - Deciders: Team | ||
| - Date: 15.11.2024 | ||
|
|
||
| ## Result | ||
|
|
||
| Which alternative was chosen. Do not include any reasoning here. | ||
|
|
||
| ## Problem context | ||
|
|
||
| We want to improve several aspects of SDLC for team Apps. | ||
|
|
||
| Development and testing: | ||
|
|
||
| - Low confidence in the state of `main` leads to lower release cadence | ||
| - PRs in frontend aren't blocked from merging if e.g. some tests fail, partially due to flake tests (Cypress) | ||
| - PRs are sometimes merged before they are manually tested | ||
| - Partially due to the existing process | ||
| - Partially due to missing infrastructure for testing unmerged code in e.g. tt02 | ||
| - Frontend and backend development work is disjoint | ||
| - Leads to less cohesive code, worse APIs | ||
| - Slower development time due to handover | ||
| - Worse testing (parts of the stack are tested in isolation, as opposed to the whole of a feature/fix) | ||
| - Team members have expressed desire to work full-stack | ||
| - Repo separation inhibits tooling and automation across the full stack (e.g. integration tests across frontend and backend within a PR/feature branch) | ||
| - Code review process is sometimes slow | ||
| - Time spent in review is not tracked - both with respect to the PR/work item itself and time spent by devs reviewing | ||
| - No one is "allocated" to reviews | ||
| - Different devs have different habits | ||
| - No dedicated tester | ||
| - Developers test their own work (or reviewers in the same "task force") | ||
| - Dedicated testers bring a better process and competence | ||
| - Frontend cycle time is slow | ||
| - There are a lot of Cypress tests that take a long time | ||
| - UI components are coupled to the app context, so they can't be tested in isolation (what _is_ the cost of the app context test harness) | ||
|
|
||
| Release: | ||
|
|
||
| - Versioning | ||
| - Conceptually we support development and ownership of Altinn Apps, yet TEs have to relate to 2 different sets of versions (frontend and backend) | ||
| - We often go straight from preview to final releases | ||
| - More TEs are exposed to more bugs | ||
| - Less time for us to adjust and rethink interfaces and their usage | ||
| - Releases are manually published | ||
| - Sometimes there are operator errors | ||
| - Naturally leads to lower release cadence | ||
| - DORA metrics are incoming, at which point our cadence will be measured and tracked by management | ||
| - CDN deployed assets of frontend can lead to clientside inconsistency (NOTE: unsure if this is appropriate to address in this ADR, does not relate to SDLC) | ||
|
|
||
| ## Decision drivers | ||
|
|
||
| - B01: We should have high confidence in the code in main | ||
| - B02: The state in main should be releasable at all times | ||
| - B03: Releases should be automatic | ||
| - B04: We should be able to make hotfixes and patch releases to different major/minor versions (e.g. cherrypicking) | ||
| - B05: We should measure release and be aware of release cadence over time | ||
| - B06: We should set aside time for new features (minor version bumps) to stabilize in a RC phase in addition to previews, before moving on to stable versions | ||
| - B07: Automatic tests to achieve high confidence should not be so slow as to be an obstacle for quick hotfix | ||
| - B08: We should be able to rollback a release if needed | ||
| - B09: Releases should not lead to inconsistencies/errors due to differing versions (i.e. mismatch of static assets on frontend) | ||
| - B10: Features should be developed cohesively - considering the full stack of changes needed at a time, to avoid inefficiencies and poor design | ||
| - B11: Versioning should be simple to understand, i.e. which versions fit together | ||
| - B12: We should be able to test a whole feature during development in a single PR both locally and in tt02 | ||
| - B13: We should have quick and efficient development cycle and feedback loops | ||
|
|
||
| ## Alternatives considered | ||
|
|
||
| List the alternatives that were considered as a solution to the problem context. | ||
|
|
||
| - A1: | ||
| - Refactor into a monorepo (B01, B09, B10, B11?, B12, B13) | ||
| - Consolidate major.minor version numbers, making them equal between frontend and backend (B11) | ||
| - PR builds of frontend and backend should be deployed to CDN and [Github Packages NuGet registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry) (B01, B02, B10, B12, B13) | ||
| - Implement [Nerdbank.GitVersioning](https://github.com/dotnet/Nerdbank.GitVersioning) to automate release branches and versions using GitHub Actions with path filters (B02, B03, B04, B06, B08?, B11, B12) | ||
| - Tag releases with environments (specifically `production`) (B05) | ||
| - Write pure and decoupled code to improve testability and simplify writing unittests (less mocking, more plain input/output) (B07, B13) | ||
| - Cover code and components with unittests, while integration tests cover important workflows/user flows (B07, B13) | ||
| - GitHub Actions workflows to unpublish from CDN and obsolete(?) from NuGet (B08) | ||
| - Serve frontend from backend, to ensure consistency between artifacts ?????? (B09) | ||
|
|
||
| ## Pros and cons | ||
|
|
||
| List the pros and cons with the alternatives. This should be in regards to the decision drivers. | ||
|
|
||
| ### A1 | ||
|
|
||
| - Good, it solves all our problems (????) | ||
| - Bad, it's a lot of work and complicated | ||
|
|
||
| ### Monorepo | ||
|
|
||
| #### PROS: | ||
|
|
||
| - Frontend og backend endringer i samme PR | ||
| - Enklere for teamet å følge endringer fullstack, høyere transparency | ||
| - Enklere å jobbe fullstack | ||
| - Kraftige muligheter som generering av typer, splitte ting i libs, gjenbruke kode | ||
| - Slipper å ha flere editorer åpen for flere prosjekter | ||
| - Slipper å committe i flere repoer | ||
| - Kun en clone | ||
| - Dele og optimalisere dependencies | ||
| - Felles tester hvis man får testappene | ||
|
|
||
| #### CONS: | ||
|
|
||
| - Frontend og backend endringer i samme PR | ||
| - Mer komplekst oppsett av prosjektet, bygg mm | ||
| - Flere issues i samme repo | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.