Skip to content

Commit 9ea79c5

Browse files
authored
Merge pull request kubernetes#1997 from saschagrunert/krel-anago-roadmap
Add Anago to Krel migration KEP
2 parents 4571475 + 7aa4f36 commit 9ea79c5

File tree

2 files changed

+138
-0
lines changed

2 files changed

+138
-0
lines changed
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Anago to Krel Migration
2+
3+
<!-- toc -->
4+
5+
- [Objectives](#objectives)
6+
- [Milestones](#milestones)
7+
- [First Milestone: Complete the Migration Effort](#first-milestone-complete-the-migration-effort)
8+
- [Open Issues](#open-issues)
9+
- [Acceptance Criteria](#acceptance-criteria)
10+
- [Second Milestone: Introduce krel stage/release](#second-milestone-introduce-krel-stagerelease)
11+
- [Open Issues](#open-issues-1)
12+
- [Risks](#risks)
13+
- [Quality/Test Plan](#qualitytest-plan)
14+
15+
<!-- /toc -->
16+
17+
_Moving away from running bash in production in k/release_
18+
19+
## Objectives
20+
21+
This roadmap defines a strategy for achieving two primary goals: migrating
22+
exchangeable bits of bash code within anago to krel and creating a Golang native
23+
replacement for anago.
24+
25+
## Milestones
26+
27+
1. Complete the code migration
28+
1. Have a minimum working krel stage
29+
1. Have a minimum working krel release
30+
1. Remove/swap out Anago in a simple way, after completing the preceding steps
31+
32+
The scope and implementation details of Milestones 2-4 will become clearer as
33+
work on Milestone 1 proceeds.
34+
35+
Creating new features for krel is out of scope.
36+
37+
### First Milestone: Complete the Migration Effort
38+
39+
Anago is still the main bash script running in GCB, which right now calls out to
40+
krel if necessary. Many parts of the bash-based source code in k/release have
41+
already been transferred to krel (golang), whereas we directly remove the
42+
bash-based parts from the repository after each refactoring iteration.
43+
44+
This milestone focuses on reducing technical debt in k/release by migrating the
45+
remaining bash code into refactored golang-based implementations. This effort
46+
will lead to higher quality and provide a stable foundation for future feature
47+
developments. By “stable,” we mean that making changes will not break the entire
48+
system.
49+
50+
This migration will not interrupt our ability to cut releases.
51+
52+
#### Open Issues
53+
54+
The list of currently outlined issues, with assignees (release managers) where
55+
established:
56+
57+
- Add krel anago subcommand to retrieve the build candidate (TBD)
58+
59+
https://github.com/kubernetes/release/issues/1536
60+
61+
- Introduce krel anago subcommand to update GitHub release
62+
63+
https://github.com/kubernetes/release/issues/1534 (@xmudrii)
64+
65+
- Finish-up krel push
66+
67+
https://github.com/kubernetes/release/issues/1459 (@saschagrunert)
68+
69+
- Introduce krel subcommand for pushing git objects
70+
71+
https://github.com/kubernetes/release/issues/1446 (TBD)
72+
73+
All four issues can be worked on in parallel. This is not a comprehensive list:
74+
There are still parts in Anago that can be ported from bash and that are not
75+
part of any issue yet.
76+
77+
#### Acceptance Criteria
78+
79+
- All issues currently open will be resolved
80+
([#1534](https://github.com/kubernetes/release/issues/1534),
81+
[#1536](https://github.com/kubernetes/release/issues/1536),
82+
[#1446](https://github.com/kubernetes/release/issues/1446),
83+
[#1459](https://github.com/kubernetes/release/issues/1459))
84+
- New code is unit-tested and code-reviewed (logical paths, not line coverage)
85+
- Direct use of the new Golang source code in production
86+
87+
### Second Milestone: Introduce krel stage/release
88+
89+
In parallel to the ongoing migration (first milestone) we will introduce new
90+
krel stage and krel release subcommands. The plan is to re-evaluate the current
91+
functionality within anago and build a declarative approach of cutting releases.
92+
We can re-use the already migrated parts as well as using the existing logic in
93+
anago as guidance for the necessary feature set of krel stage/release.
94+
95+
#### Open Issues
96+
97+
The list of currently outlined issues, with assignees (release managers) where
98+
established:
99+
100+
- Evaluate possible krel stage/release subcommands
101+
102+
https://github.com/kubernetes/release/issues/1551
103+
104+
## Risks
105+
106+
The highest risk during the migration is that we end-up in a state where we
107+
break the current functionality. This would mean that we cannot build releases
108+
any more. Immediate fixing and incremental testing between the releases should
109+
minimize this risk.
110+
111+
## Quality/Test Plan
112+
113+
Merge changes to the main branch from user fork/branch as per normal community
114+
PR process. Feature branches will not be used.
115+
116+
Anago-replacement features must be behind a feature gate, initially ensuring
117+
they are only run in ‘mock’ mode.
118+
119+
Merged features can be tested in production at any time so long as they are only
120+
triggered from a mock stage or mock release or mock notify.
121+
122+
Non-mock testing will occur only during a release cycle’s alpha period. This
123+
gives initial test ability for non-mock paths in Sep/Oct 2020 and again in
124+
Jan/Feb 2021. Beyond Feb 2021, we will need to re-evaluate testing based on
125+
future circumstances.
126+
127+
During alpha periods we can A/B test, eg: build alpha.1 with Anago and
128+
immediately after build alpha.2 with krel. Compare the results.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
title: Anago to Krel Migration
2+
authors:
3+
- "@saschagrunert"
4+
owning-sig: sig-release
5+
reviewers:
6+
- "@justaugustus"
7+
approvers:
8+
- "@justaugustus"
9+
creation-date: 2020-09-22
10+
status: implementable

0 commit comments

Comments
 (0)