Added feature to allow user to have a wildcard for selecting "Any Pipeli...#466
Added feature to allow user to have a wildcard for selecting "Any Pipeli...#466arvindsv merged 4 commits intogocd:masterfrom
Conversation
…eline" or "Any Stage" within a pipeline when subscribing to email notifications.
|
Oops, just realized I forgot to sign the CLA. I just did that so it should be good now. |
There was a problem hiding this comment.
Small note: User quux is not used in this test and can be removed.
|
@lcs777: I think this is looking good to be merged soon. I had a couple of points. Take a look at them. I really like the test names you've chosen and how everything looks. Thanks! I've seen it in the UI and I'm running all the tests against this change. |
|
Great idea about make a NotificationFilter.appliesTo() method. I fixed all of the issues. Hopefully should be good now. |
Added feature to allow user to have a wildcard for selecting "Any Pipeli...
|
Hi @lcs777, I've accepted it, but I found that there is a small difference now between appliesTo and matchStage. Here's what I mean: The first test (for matchStage) fails and the second test (for appliesTo) passes, given the same condition. The condition that I'm checking is "ANY_PIPELINE" + "Specific stage". I don't know if it makes sense. It might, for someone who uses pedantic names for their stages ("I want to be notified for all 'test' stage failures, across all pipelines"). I don't see why this difference in behavior needs to exist. I think shouldMatch should just call appliesTo. Like this: Let me know what you think. |
|
I made your changes in my local repo and think it makes perfect sense. Do you want to put the changes in, since you already have the code, or should I make another pull request? Hopefully I will be a little less sloppy in my next pull request so I will catch that. thanks, |
|
Hi, That's fine. I can make this change. It's completely ok! That's why code gets seen before merging. So, we can all help each other. If you have comments about any other code that gets in, please feel free to comment. :) I appreciate the commits and the changes. Cheers, |
#466 - Make behaviour of appliesTo and matchStage same.
|
Hey @lcs777, The build for this is available at http://www.go.cd/download/ (build number 816 or later), if you want to download and check. Cheers, PS: I just realized that "[Any Pipeline]" and "some-stage" is not going to be allowed from the UI. But, the change is still ok, I feel. |
|
Awesome. Hopefully this will mean another instance of Go in a production environment! Even though it is not currently allowed in the UI, it makes sense to do it anyways. Also, I definitely can see someone doing the "pedantic" naming you suggested and wanting to do what you mentioned in the future. |
|
That build is bleeding-edge so to speak. It has gone through all the regression tests, of course. But, be careful. I'd recommend not setting up a production environment on it, yet. 14.3 should come out soon, and that will include this. That release will have gone through more rigorous verification, performance testing, etc. Just saying. :) I mentioned it is available so that you can take a quick look at the feature you wrote, and see if it looks ok! |
|
Works fine on 14.3.0(1081-da691d74e30a47) |
|
Is there a way that we could add "Any Pipeline" and "Stage XYZ" ? I have many many pipelines that all use the same template and I have a particular Stage that I want to be notified on. It would be really nice if I could specify one rule that allowed me to match any pipeline but a specific stage, like "QA-Passed". Are these notifications exposed anywhere that I can manipulate through an API call? If we can't have something like the above Any Pipeline + Specific Stage rule, then maybe I can write something that iterates through all my pipelines and creates new notification rules for each? |
...ne" or "Any Stage" within a pipeline when subscribing to email notifications.
This pull request is to let a user select to get notifications for any event on all pipelines or all stages on a particular pipeline.
This is useful because it allows users to be able to be notified on events for a pipeline when it changes without having to update their notifications everytime a pipeline changes.