question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Refactoring of Operator

See original GitHub issue

In collaboration with @ocdi; Refactoring of the logic how the operator is used.

It should be more like a “normal” addon to the generic host of asp.net core and introduce it’s complexity there. Therefore we introduce some breaking changes and make a major version bump.

Topics to tackle:

  • Refactor the operator startup logic to be an extension method of the generic host
  • Return a IOperatorBuilder from services.AddKubernetesOperator that can perform more finetuning
  • Add proper code linting
  • Add proper (more or less) testing tools (maybe a WebApplicationFactory class for the operator? in context of xUnit)
  • Finetune the IOperatorBuilder methods (add resource controller, add finalizer, add …)
  • Refactor finalizer appending -> it would be cool to have a “finalizer register” when one can add a finalizer to a resource instead of having to fetch the finalizer from DI and add a myriad of generic information to the method
  • Refactor / overlook all the generics. some types cannot be infered and it would be nice to have less generic type arguments (like the add resource controller method)

anything else? 😃

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
buehlercommented, Sep 1, 2020

Since the two of us have quite a difference in time between Australia and Switzerland, I took the liberty of updating the readme and splitting out the testing package myself

1reaction
buehlercommented, Sep 1, 2020

Nice 😃 Yes I thought of that (the testing issue) when I first created the project, but back then I was more like “meh…”. Now It makes absolute sense. I accidently closed your pull request when I merged my refactoring branch. I’m gonna tackle the issue right away. The goal could be to have a release today or tomorrow 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Refactor Code By Using the Ternary Operator in JavaScript
The conditional (ternary) operator is the only JavaScript operator that takes three operands. This operator is frequently used as a shortcut for the...
Read more >
Refactoring the ternary operator - javascript
It's not a ternary operator. It's logical "and" This will return b if a is true, otherwise it will be false, and will...
Read more >
Tricks to reducing code complexity: && and || operators
A part of being a programmer is learning to refactor complex code so it's more understandable. Today we will talk about two…
Read more >
Refactoring cascading conditionals in favor of readability
Let's introduce a simple function with a conditional statement using if , and let's refactor it using the ternary operator.
Read more >
Refactoring chronicles: spread operator, map, reduce.
First of all, if current implementation makes it possible, before touching any code that works - no matter how ugly, unperformant, cumbersome ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found