feat: break flow base to smaller interfaces #782
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



🔄 Changes Summary
This PR breakes the
flow_base.goto two files:common_params_builder.gocommon_params_verifier.goThey provide two abstractions created from functions to build and verify common certificate build parameters that were located in
flow_base.go:CommonCertParamsBuilder- which provides functions to generate common parameters for new and retry certificates.CommonCertParamsVerifier- which provides functions to verify and sanity check parameters to build or retry a certificate.The
pessimisticandfepflows will now receive these interfaces in their constructor, instead of the previousbaseflow.This makes code separation better, and more abstract, making writing UTs and changing/adding functions much easier than before.
This PR also moves the test related to functions that are moved to the
common_params_builderandcommon_params_verifierfrom previous files, to the test files of given components.NA
📋 Config Updates
NA
✅ Testing
aggkitCI tests are enough to check there is no regression.🐞 Issues
NA
🔗 Related PRs
NA
📝 Notes
NA