Open annappropriate opened 7 years ago
Failures: this is a good chance to try and define a new Failure structure
It would be very cool if they were auto-deserialized in tests, but probably not going to happen…
I think each method in API object deserves its own suite at very least
Yea, those 4897 LOC files are pain!
New promotions module
Link to documentation: https://github.com/FoxComm/highlander/tree/master/documents/design/promotions
Why do we want to go for new implementation instead of refactoring old one:
Approach
Migration to new module
What I'm thinking about is:
Open questions
General technical design changes
NonEmptyList
where appropriateList
instead ofSeq
Roadmap
Phase 1: Pre
Start with basic outline, define streams of parallel work. It's totally possible for us to start writing tests before the implementation is done as we already have a set of existing ITs that we can analyze and migrate.
Create in code:
PromotionsAPI
object with stubbed methodsCouponsAPI
object with stubbed methodsThe above objects are two only entry points for phoenix.
API
s should each have a sufficient API defined for a full-blown communication. We need to define how we want them to look. I would also argue thatPromotionsBulkAPI
andCouponsBulkAPI
must be separate objects.For test suites, I would like a better separation: I think each method in API object deserves its own suite at very least
Phase 2: Barebone promo implementation
Everything should be ready at this point for implementation to be filled in.
Requires tech spec.
Phase 3: Auto-apply algorithm
Auto-apply seems more difficult to get right than coupons, so I suggest we start with it.
Phase 4: Coupons implementation
Phase 5: Auto-apply vs coupons
I figured this deserves a separate section. If, by any chance, we already have this covered, then this can be skipped. Otherwise, spend some time on this.
Phase 6: Search view
Instead of building a trigger-based table in postgres, push directly to Kafka
Phase 6: Versioning
To implement relational versioning, consider using this trigger approach that Roman uses for CMS. This section will be filled in later.