Skip to content

Refactor campaigns code into several packages

Warren Gifford requested to merge es/packages-refactor into main

Created by: eseliger

Disclaimer: This is a weekend hack project, by no means do I expect this to be merged. It's a proposal which I tinkered on over the weekend and I start liking the outcome, but please don't feel obligated to approve this just because the diff looks large, if you don't agree with this pattern!

Stacked on top of https://github.com/sourcegraph/sourcegraph/pull/16685

This PR is a major overhaul of our package structure. It introduces separate packages for many of our distinct parts of the application. Cool side-effects: We have very isolated tests and since we don't share code coverage this encourages us to write separate rewirer tests, instead of doing the expensive (and rather unreadable) service apply tests all the time. Also, fewer tests need to be run when something changed since test run caches will hit more often. I think this gives us a good separation of concerns, and the different components that make up the campaigns codebase are much more prominent now (documentation as folders, I guess(?)) Note that this slightly lowers test coverage, but I deem this correct since the rewirer was never tested on it's own but it should be. Bonus: More shared test-helpers 🎊

Merge request reports

Loading