Procfile sets GOCOVDIR for five Argo CD components. But only one (applicationset-controller) shuts down gracefully enough for code coverage data to be produced. In other words, go writes a covmeta file, but not a covcounters file (the file that actually contains coverage info). So today we get partial code coverage info for e2e tests.
Exactly what "graceful shutdown means" may vary by component. Concretely, I think it means we need to listen to shutdown signals and end all running goroutines. But the "graceful" part depends on what's running.
Procfile sets GOCOVDIR for five Argo CD components. But only one (applicationset-controller) shuts down gracefully enough for code coverage data to be produced. In other words, go writes a covmeta file, but not a covcounters file (the file that actually contains coverage info). So today we get partial code coverage info for e2e tests.
The task is to do two things for the remaining four components: 1) implement graceful shutdown and 2) add the component's gocov directory to the e2e reporting CI.
Exactly what "graceful shutdown means" may vary by component. Concretely, I think it means we need to listen to shutdown signals and end all running goroutines. But the "graceful" part depends on what's running.