-
Notifications
You must be signed in to change notification settings - Fork 97
Create triggers on update if do not exist #353
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
Conversation
|
Vadim thank you for taking this and adding proper unit test - this will help us improve the cli’s enginnering. I’m all for it. |
dubee
left a comment
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.
Merged the related Go client PR.
dubee
left a comment
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.
You will have to updated the pinned version of the Go client to pick up the changes. For reference see: 4a5a372.
0a3f7cf to
0ffa47c
Compare
| * NOTE: this function will exit in case of a processing error since it indicates a problem parsing parameters. | ||
| */ | ||
| func createOrUpdate(fqn *QualifiedName, trigger *whisk.Trigger, overwrite bool) { | ||
| func createOrUpdate(Client *whisk.Client, fqn *QualifiedName, trigger *whisk.Trigger, overwrite bool) { |
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.
Now that Client is a parameter, can we delete the comment // TODO get rid of these global modifiers?
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.
yes, now it's "local".
| * NOTE: this function will exit in case of a processing error since it indicates a problem parsing parameters. | ||
| */ | ||
| func createOrUpdate(fqn *QualifiedName, trigger *whisk.Trigger, overwrite bool) { | ||
| func createOrUpdate(Client *whisk.Client, fqn *QualifiedName, trigger *whisk.Trigger, overwrite bool) { |
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.
yes, now it's "local".
I wanted to familiarise myself with the cli repo and picked up this bug #313.
While working on it, I've realised some spots where unit tests would be welcome, so I added some based on Ginkgo, which I personally find pretty useful for TDD approach, general code coverage and documentation. What do you think guys, is this the right direction to go?
@rabbah @mdeuser @drcariel @houshengbo
The proposed change still has some nuances to be done properly: gradle deps for ginkgo and gomega, some duplication and probably a general clean up.