The instance scheduler supports RDS instances scheduling now, but there is a lot of code repetition.
See if you can introduce a Instance interface type that will serve both EC2 and RDS clients and replace the common functions with methods.
Note there is an equal amount of repetition in tests too. This will also need updating as we change the main code.
User Type(s)
Modernisation Platform Engineer
Value
DRY code
Assumptions / Hypothesis / Questions / Unknowns
Proposal
Extracting common functions for EC2 and RDS and passing client as a variable.
Unknowns
Is it possible?
Definition of done
[ ] the code has been refactored
[ ] the unit tests are updated to work with the main code
User Story
The instance scheduler supports RDS instances scheduling now, but there is a lot of code repetition. See if you can introduce a Instance interface type that will serve both EC2 and RDS clients and replace the common functions with methods. Note there is an equal amount of repetition in tests too. This will also need updating as we change the main code.
User Type(s)
Modernisation Platform Engineer
Value
DRY code
Assumptions / Hypothesis / Questions / Unknowns
Proposal
Extracting common functions for EC2 and RDS and passing client as a variable.
Unknowns
Is it possible?
Definition of done
Reference
How to write good user stories