Skip to content

Commit dcfbe0d

Browse files
authored
Merge pull request #43982 from fsmunoz/sig-testing-spotlight
Add SIG Testing spotlight
2 parents 1e49e38 + 5588efa commit dcfbe0d

File tree

1 file changed

+204
-0
lines changed

1 file changed

+204
-0
lines changed
Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
---
2+
layout: blog
3+
title: "Spotlight on SIG Testing"
4+
slug: sig-testing-spotlight-2023
5+
date: 2023-11-24
6+
canonicalUrl: https://www.kubernetes.dev/blog/2023/11/24/sig-testing-spotlight-2023/
7+
---
8+
9+
**Author:** Sandipan Panda
10+
11+
Welcome to another edition of the _SIG spotlight_ blog series, where we
12+
highlight the incredible work being done by various Special Interest
13+
Groups (SIGs) within the Kubernetes project. In this edition, we turn
14+
our attention to [SIG Testing](https://github.com/kubernetes/community/tree/master/sig-testing#readme),
15+
a group interested in effective testing of Kubernetes and automating
16+
away project toil. SIG Testing focus on creating and running tools and
17+
infrastructure that make it easier for the community to write and run
18+
tests, and to contribute, analyze and act upon test results.
19+
20+
To gain some insights into SIG Testing, [Sandipan
21+
Panda](https://github.com/sandipanpanda) spoke with [Michelle Shepardson](https://github.com/michelle192837),
22+
a senior software engineer at Google and a chair of SIG Testing, and
23+
[Patrick Ohly](https://github.com/pohly), a software engineer and architect at
24+
Intel and a SIG Testing Tech Lead.
25+
26+
## Meet the contributors
27+
28+
**Sandipan:** Could you tell us a bit about yourself, your role, and
29+
how you got involved in the Kubernetes project and SIG Testing?
30+
31+
**Michelle:** Hi! I'm Michelle, a senior software engineer at
32+
Google. I first got involved in Kubernetes through working on tooling
33+
for SIG Testing, like the external instance of TestGrid. I'm part of
34+
oncall for TestGrid and Prow, and am now a chair for the SIG.
35+
36+
**Patrick:** Hello! I work as a software engineer and architect in a
37+
team at Intel which focuses on open source Cloud Native projects. When
38+
I ramped up on Kubernetes to develop a storage driver, my very first
39+
question was "how do I test it in a cluster and how do I log
40+
information?" That interest led to various enhancement proposals until
41+
I had (re)written enough code that also took over official roles as
42+
SIG Testing Tech Lead (for the [E2E framework](https://github.com/kubernetes-sigs/e2e-framework)) and
43+
structured logging WG lead.
44+
45+
## Testing practices and tools
46+
47+
**Sandipan:** Testing is a field in which multiple approaches and
48+
tools exist; how did you arrive at the existing practices?
49+
50+
**Patrick:** I can’t speak about the early days because I wasn’t
51+
around yet 😆, but looking back at some of the commit history it’s
52+
pretty obvious that developers just took what was available and
53+
started using it. For E2E testing, that was
54+
[Ginkgo+Gomega](https://github.com/onsi/ginkgo). Some hacks were
55+
necessary, for example around cleanup after a test run and for
56+
categorising tests. Eventually this led to Ginkgo v2 and [revised best
57+
practices for E2E testing](/blog/2023/04/12/e2e-testing-best-practices-reloaded/).
58+
Regarding unit testing opinions are pretty diverse: some maintainers
59+
prefer to use just the Go standard library with hand-written
60+
checks. Others use helper packages like stretchr/testify. That
61+
diversity is okay because unit tests are self-contained - contributors
62+
just have to be flexible when working on many different areas.
63+
Integration testing falls somewhere in the middle. It’s based on Go
64+
unit tests, but needs complex helper packages to bring up an apiserver
65+
and other components, then runs tests that are more like E2E tests.
66+
67+
## Subprojects owned by SIG Testing
68+
69+
**Sandipan:** SIG Testing is pretty diverse. Can you give a brief
70+
overview of the various subprojects owned by SIG Testing?
71+
72+
**Michelle:** Broadly, we have subprojects related to testing
73+
frameworks, and infrastructure, though they definitely overlap. So
74+
for the former, there's
75+
[e2e-framework](https://pkg.go.dev/sigs.k8s.io/e2e-framework) (used
76+
externally),
77+
[test/e2e/framework](https://pkg.go.dev/k8s.io/kubernetes/test/e2e/framework)
78+
(used for Kubernetes itself) and kubetest2 for end-to-end testing,
79+
as well as boskos (resource rental for e2e tests),
80+
[KIND](https://kind.sigs.k8s.io/) (Kubernetes-in-Docker, for local
81+
testing and development), and the cloud provider for KIND. For the
82+
latter, there's [Prow](https://docs.prow.k8s.io/) (K8s-based CI/CD and
83+
chatops), and a litany of other tools and utilities for triage,
84+
analysis, coverage, Prow/TestGrid config generation, and more in the
85+
test-infra repo.
86+
87+
*If you are willing to learn more and get involved with any of the SIG
88+
Testing subprojects, check out the [SIG Testing README](https://github.com/kubernetes/community/tree/master/sig-testing#subprojects).*
89+
90+
## Key challenges and accomplishments
91+
92+
**Sandipan:** What are some of the key challenges you face?
93+
94+
**Michelle:** Kubernetes is a gigantic project in every aspect, from
95+
contributors to code to users and more. Testing and infrastructure
96+
have to meet that scale, keeping up with every change from every repo
97+
under Kubernetes while facilitating developing, improving, and
98+
releasing the project as much as possible, though of course, we're not
99+
the only SIG involved in that. I think another other challenge is
100+
staffing subprojects. SIG Testing has a number of subprojects that
101+
have existed for years, but many of the original maintainers for them
102+
have moved on to other areas or no longer have the time to maintain
103+
them. We need to grow long-term expertise and owners in those
104+
subprojects.
105+
106+
**Patrick:** As Michelle said, the sheer size can be a challenge. It’s
107+
not just the infrastructure, also our processes must scale with the
108+
number of contributors. It’s good to document best practices, but not
109+
good enough: we have many new contributors, which is good, but having
110+
reviewers explain best practices doesn’t scale - assuming that the
111+
reviewers even know about them! It also doesn’t help that existing
112+
code cannot get updated immediately because there is so much of it, in
113+
particular for E2E testing. The initiative to [apply stricter linting to new or modified code](https://groups.google.com/a/kubernetes.io/g/dev/c/myGiml72IbM/m/QdO5bgQiAQAJ)
114+
while accepting that existing code doesn’t pass those same linter
115+
checks helps a bit.
116+
117+
**Sandipan:** Any SIG accomplishments that you are proud of and would
118+
like to highlight?
119+
120+
**Patrick:** I am biased because I have been driving this, but I think
121+
that the [E2E framework](https://github.com/kubernetes-sigs/e2e-framework) and linting are now in a much better shape than
122+
they used to be. We may soon be able to run integration tests with
123+
race detection enabled, which is important because we currently only
124+
have that for unit tests and those tend to be less complex.
125+
126+
**Sandipan:** Testing is always important, but is there anything
127+
specific to your work in terms of the Kubernetes release process?
128+
129+
**Patrick:** [test flakes](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-testing/flaky-tests.md)
130+
if we have too many of those, development velocity goes down because
131+
PRs cannot be merged without clean test runs and those become less
132+
likely. Developers also lose trust in testing and just "retest" until
133+
they have a clean run, without checking whether failures might indeed
134+
be related to a regression in their current change.
135+
136+
## The people and the scope
137+
138+
**Sandipan:** What are some of your favourite things about this SIG?
139+
140+
**Michelle:** The people, of course 🙂. Aside from that, I like the
141+
broad scope SIG Testing has. I feel like even small changes can make a
142+
big difference for fellow contributors, and even if my interests
143+
change over time, I'll never run out of projects to work on.
144+
145+
**Patrick:** I can work on things that make my life and the life of my
146+
fellow developers better, like the tooling that we have to use every
147+
day while working on some new feature elsewhere.
148+
149+
**Sandipan:** Are there any funny / cool / TIL anecdotes that you
150+
could tell us?
151+
152+
**Patrick:** I started working on E2E framework enhancements five
153+
years ago, then was less active there for a while. When I came back
154+
and wanted to test some new enhancement, I asked about how to write
155+
unit tests for the new code and was pointed to some existing tests
156+
which looked vaguely familiar, as if I had *seen* them before. I
157+
looked at the commit history and found that I had *written* them! I’ll
158+
let you decide whether that says something about my failing long-term
159+
memory or simply is normal… Anyway, folks, remember to write good
160+
commit messages and comments; someone will need them at some point -
161+
it might even be yourself!
162+
163+
## Looking ahead
164+
165+
**Sandipan:** What areas and/or subprojects does your SIG need help with?
166+
167+
**Michelle:** Some subprojects aren't staffed at the moment and could
168+
use folks willing to learn more about
169+
them. [boskos](https://github.com/kubernetes-sigs/boskos#boskos) and
170+
[kubetest2](https://github.com/kubernetes-sigs/kubetest2#kubetest2)
171+
especially stand out to me, since both are important for testing but
172+
lack dedicated owners.
173+
174+
**Sandipan:** Are there any useful skills that new contributors to SIG
175+
Testing can bring to the table? What are some things that people can
176+
do to help this SIG if they come from a background that isn’t directly
177+
linked to programming?
178+
179+
**Michelle:** I think user empathy, writing clear feedback, and
180+
recognizing patterns are really useful. Someone who uses the test
181+
framework or tooling and can outline pain points with clear examples,
182+
or who can recognize a wider issue in the project and pull data to
183+
inform solutions for it.
184+
185+
**Sandipan:** What’s next for SIG Testing?
186+
187+
**Patrick:** Stricter linting will soon become mandatory for new
188+
code. There are several E2E framework sub-packages that could be
189+
modernised, if someone wants to take on that work. I also see an
190+
opportunity to unify some of our helper code for E2E and integration
191+
testing, but that needs more thought and discussion.
192+
193+
**Michelle:** I'm looking forward to making some usability
194+
improvements for some of our tools and infra, and to supporting more
195+
long-term contributions and growth of contributors into long-term
196+
roles within the SIG. If you're interested, hit us up!
197+
198+
Looking ahead, SIG Testing has exciting plans in store. You can get in
199+
touch with the folks at SIG Testing in their [Slack channel](https://kubernetes.slack.com/messages/sig-testing) or attend
200+
one of their regular [bi-weekly meetings on Tuesdays](https://github.com/kubernetes/community/tree/master/sig-testing#meetings). If
201+
you are interested in making it easier for the community to run tests
202+
and contribute test results, to ensure Kubernetes is stable across a
203+
variety of cluster configurations and cloud providers, join the SIG
204+
Testing community today!

0 commit comments

Comments
 (0)