-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploy models via zbchaos #240
Conversation
I also tried to improve our test coverage related to these functionality, I wanted to verify for example that X deployments are send or deployment X is created. Unfortunately I'm not able to fake/mock the Zeebe client because of certain issues, see camunda/camunda#11044 (camunda/camunda#11045) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding testing the Zeebe client, I don't understand why gomock wouldn't work 🤔
Anyway, one way to circumvent this is to have your code not use a ZeebeClient but instead use an interface type you describe which specifies how to deploy, e.g. MyDeployer
. Since Go uses structural typing, any type which implements the function will automatically implement the type, so it will work with the Zeebe client and your own mock. You have to keep the interface in sync or adapter for the Zeebe client though, but yeah. I guess it's do-able 🤷 Hope I'm clear 😅
Add new sub command to deploy process models, either specified by the user via processModelPath or if not given it default process models BPMN and DMN are be deployed. The user is able to specify the count of versions which should be deployed for each. This allows to experiment with deployment distribution.
1efb073
to
2bc08dd
Compare
Hey @npepinpe thanks for the review 🙇 Haven't tried yet gomock, was also a bit reluctant to use something where I have to generate something (or use a tool). I also thought to change my functions to only use parts which might be better intercepted. You input gave also a good trigger regarding the own interface which I tried out, but without success. You can take a look at this here d4cfdc4 What we can see is that sure I can create such an interface, but still i have an issue that the ZeebeCLient returns a struct which is not what I want to use or return in that case (since I can't intercept the call or control anything then) Maybe I'm just too stupid for this 🙈 I feel a bit lost here. 🥲 |
I think you'd have to workaround this by essentially creating interfaces for everything you need, and ensuring either the Zeebe types match those (not just the client, but the returned structs for the complete execution path), or writing adapters yourself. I don't have time to check it out today, and to be honest I think a fake client is good idea anyway for us, but if you'd like we can take a look next week. |
I thought this as well and thought but why I use then anyway this client at all 😅 than I can also create a complete new client 😆 |
Details
Add new sub command
deploy process
to deploy process models, either specified by the uservia
--processModelPath
or if not given it will deploy multiple versions of default models (BPMN and DMN).The user is able to specify the count of versions which should be deployed for each.
This allows experimenting with deployment distribution.
Replacement of:
closes #226
closes #160
Example Usage: