Closed kflynn closed 3 days ago
LGTM as well. For historical reasons I'll voice a concern that the CI is just completely wrekt here, but I ran that past @kflynn and it's (currently) a known and expected state of affairs that is slated to be rectified in the next pass of chainsawing.
tl;dr 👍✅
To be clear, I think CI is going to take more than just a chainsaw. 😉 But I think that this round of chainsawing gets us to a place where it's sane to rebuild CI.
Chainsaw, part 2!
This one is probably best reviewed commit by commit.
069f35a9: [WIP] Chainsaw: Restore IRErrorResponse imports since the code that needs it wasn't removed yet. Sigh.
I was a little hasty in Chainsaw, part 1, when I ripped out a bunch of imports related to the error-rewriting code that's not supported in Emissary 4 without actually ripping out the code using those imports -- d'oh. This puts the imports back so that unit tests have a hope of running. (Ripping out the feature code will come in part 3 of the chainsaw commits).
092d98b7: [WIP] Chainsaw: Rip out tons of docker.mk stuff.
This takes the chainsaw to the rest of the Docker build system and uses Goreleaser to build our ancillary Docker images instead. I'm not delighted by this, since it makes Goreleaser take five minutes to run on my Mac, but it's a starting point.
f0d598ad: [WIP] Chainsaw: rip out vestiges of Edge Stack
This takes the chainsaw to all the "if edgestack" stuff in Emissary, including (at least most of the) stuff related to the intercept agent, Edge Stack gofilters, Edge Stack's built-in internal auth & ratelimit services, and the concept that Emissary called a sidecar and was really arbitrary binaries that could be included in the image and would get started at boot time.
This commit does not entirely rip out the ACME holepuncher, because we might want that later.
6f30e3b7: [build] Make the Envoy image a build arg defined in .goreleaser.yaml
Defining build variables in .goreleaser.yaml to me makes more sense than having them hardcoded in the Dockerfiles.
c7a37908: Use the correct Docker image for the Gateway API transform test -- but disable it on Mac because Docker networking is annoying.
Putting the Envoy base image in .goreleaser.yaml makes it pretty simple for the Gateway API transform test, which wants to run Envoy in Docker, to find the right image. Unfortunately the test doesn't work on my Mac because of Docker networking madness, so skip it on Mac for the moment.
5c3f40c2: Switch away from setuptools over to importlibs for finding schemas and templates, so Python unit tests can run.
Finally, we used to be using a deprecated setuptools API to let the Python code find out where to look for schemas and templates at runtime. Switch to the supported importlib alternative.
After all that, Python and Go unit tests pass. To verify that for yourself:
My basic functional test also passes, so this PR probably leaves us in mostly-tolerable shape to go after E2E tests locally and in CI.
(Note that there's at least one more chainsaw PR coming, to finish ripping out all the stuff related to error rewrites and header casing, and to do a closer review of things I commented out rather than deleting in this PR.)