Repository navigation
feat: strategy delay #1591 - #1738
Conversation
|
Welcome to the Microcks community! 💖 Thanks and congrats 🎉 for opening your first pull request here! Be sure to follow the pull request template or please update it accordingly. Hope you have a great time there! |
5098f0d to
6b8153c
Compare
|
Hello, I've read around the code, would it be possible to extract the delay handling to another class so that we can reuse it? Futhermore I think it would be cool if we could configure the delay using openapi extensions https://microcks.io/documentation/references/artifacts/openapi-conventions/ |
6b8153c to
d1e9127
Compare
I think it's possible, yes :). |
018b447 to
b917a53
Compare
|
For the next phase, I’m considering moving everything currently in util.delay (such as the Delay value object (actually rich business object), strategies, and factory) into the domain package. This would better reflect their role as core business objects rather than utilities. However, I’m still hesitating about the mechanics with Jackson serialization/deserialization. I want to avoid any breaking changes, especially regarding how Operation is persisted and exposed in JSON. My goal is to keep the database and API structure flat (with defaultDelay and defaultDelayStrategy as separate fields). I’ll need to carefully review the Jackson annotations and possibly add custom getters or setters to ensure backward compatibility for consumers and persistence. Given my current level in Java, could you guide me @lbroudoux / @Apoorva64 ? |
b917a53 to
c440c0f
Compare
lbroudoux
left a comment
There was a problem hiding this comment.
Made some comments along the way. It looks good but I would have called things differently. Please have a look ant let me know what you think.
Rename, constante, etc ... : Done. Two subjects: |
|
I think we're on track! What do you have in the mind regarding |
lbroudoux
left a comment
There was a problem hiding this comment.
I found a small glitch when you're extraction incoming request header for delay strategy. Please fix this one and we'll be good to go!
During the refactoring, I accidentally introduced this issue that wasn’t caught by the initial test used to implement the delay. I’ve now added a much more precise test specifically targeting |
lbroudoux
left a comment
There was a problem hiding this comment.
Looks al good to me! Thanks a lot @SebastienDegodez 🎉
Signed-off-by: Laurent Broudoux <[email protected]>
Expanding the wait before check a bit as we're low on resources and it takes tome Signed-off-by: Laurent Broudoux <[email protected]>
Signed-off-by: SebastienDegodez <[email protected]>
…tern - Introduced Delay value object encapsulating delay value and strategy - Added DelayStrategy interface and implementations (Fixed, Random, RandomRanged) - Implemented DelayStrategyFactory for controlled instantiation - Refactored controllers and MetadataExtractor to use Delay VO - Preserved flat persistence structure for Operation (delay value and strategy) Signed-off-by: SebastienDegodez <[email protected]>
- Introduce DelayApplier and related classes for strategies - Add shared constants: FIXED, RANDOM and RANDOM_RANGED_FORMAT / derived pattern. - Rename Delay to DelaySpec Signed-off-by: SebastienDegodez <[email protected]>
…dates Signed-off-by: SebastienDegodez <[email protected]>
Signed-off-by: SebastienDegodez <[email protected]>
09b3d2b to
fa59c4b
Compare
|
You are now a Microcks community contributor! 💖 Thanks and congrats 🚀 on merging your first pull request! We are delighted and very proud of you! 👏 📢 If you're using Microcks in your organization, please add your company name to this list. 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact. If you need to know why and how to add yourself to the list, please read the blog post "Join the Microcks Adopters list and Empower the vibrant open source Community 🙌" Kudos and please keep going, we need you 🙌 |
Description
x-microcks-delay-strategyheader. (3 values: fixed, random and random-xx)Related issue(s)
Resolves #1591