wave icon indicating copy to clipboard operation
wave copied to clipboard

Refactor, Cleanup Code and use Generics

Open jabdoa2 opened this issue 1 month ago • 1 comments

  • Refactored handler to use generics instead of "podController" wrapper type
  • Deduplicated Getter Types
  • Deduplicated Controller logic and entrypoints
  • Deduplicated Webhook entrypoints
  • Deduplicated Controller Tests (using generics)
    • Tests are now exactly the same for all three objects (there were slightly diverged before)
    • Deduplicated podTemplate in Test Data

Overall we lost about 1.2k lines of code. Also extending/maintaining controllers and controller tests became easier. Before you basically had to make the same change in three files each. That is now in one place. Only downside is that you have to deal with generic types in tests now.

jabdoa2 avatar May 09 '24 23:05 jabdoa2

I will resolve the conflict. I also found why my tests for #167 failed. I will improve the test setup to make those easier to add.

jabdoa2 avatar May 13 '24 20:05 jabdoa2