-
Notifications
You must be signed in to change notification settings - Fork 30
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
Teamcity notifies on personal builds #97
Comments
Thanks @hagaygo. You are right. tcWebHooks listens for all build events from TeamCity and does not differentiate between personal builds and non-personal builds. It's interesting, but I don't think anyone has ever asked for this feature before. It seems obvious now that you have and I will mark this issue as an enhancement request. By the way: The only time when personal builds are considered differently is when the historical state change is calculated. Personal builds are ignored when finding the most recent build result to determine if the current build has changed (eg, to determine pseudo events like buildBroken and buildFixed). If you're up for some XML hacking, you may be able to filter out personal builds by adding a Trigger Filter. Have a look at the history of your personal builds, and see of there is a build parameter set by TeamCity. something like Sorry, I won't get a chance to test this myself today. But let me know if you want further help. |
Thanks for the thorough answer. I'll give your idea a try. Hope to see this implemented in next version as "simple checkbox" :) |
Yeah, that would be my thinking too. It would default to "on" so as not to surprise users, but can be easily unchecked. |
I had a look and could not figure out how to extract the personal build status from any of the standard TeamCity build properties, so I have added it the webhooks payload object as If you want to give this build a try (or a newer one), you will be able to configure a filter like this (tested by me):
So for now we have a working solution (albiet a bit cumbersome), until the nice UI and toggle is implemented. |
After further usage , i noticed that "remote run" builds are not getting notified which is what we mainly use. I guess after all there an internal difference in teamcity between personal build (which ran trough teamcity web GUI) to remote run builds (which ran via visual studio) |
I think I understand your comment. To paraphrase: "We tend to use 'remote run' builds, and these do not trigger a webhook. This our the desired behaviour." So to me, this reads like it's already performing the correct behaviour. Is that what you're saying? |
For our main usage (remote runs via visual studio) the current behavior is fine. I still think there should be an option to disable/enable webhooks for personal build (or it should be always disabled if such option is too complicated) |
Is this same issue as shown on the Webhooks tab on TeamCity Server under "Recent WebHook Errors"? 999 :: Unexpected exception. Please log a bug on GitHub tcplugins/tcWebHooks. Exception was: Method getVcsRoot() cannot be called for personal build |
Hi @Eric-Pang. This feels like a different issue, but could I please get some more information? Which build event was this for ? Eg, Started, Changes Loaded, Finished, etc. I've not really looked into this issue in detail. It could be related. |
Hi @Eric-Pang Issue #132 has been raised to address your issue. The PR #133 has been merged against master and the plan to patch @hagaygo There is a chance that this fix will change the behaviour you're seeing, and make personal builds work as I intended (which is not what you actually want). I'll try to find some time to test your use case too. |
Just upgraded to latest version (1.1.374.403) and now i do get notifications for "Remote run" , any way to to disable notifications on "remote run" or "pesronal" builds ? |
Oooh. I can't remember if I did that or not. I'll need to take a look and see. Hopefully over the weekend. It's been so long since I looked at this, I have forgotten all the context. |
Hmm. Looks like I didn't do anything to address the concern @hagaygo I can't promise I'll get a fix in this weekend, and my next few weekends are hectic. Your best work around for now is the filter above. Does that work for you, or am I misinterpreting your request? |
Where do i need to put that filter snippet ? |
Also a detailed step by step to solve a different problem with filters is in #117 |
Thanks for the quick help, after adding it to the xml file , remote run did not notify on the webhook. Hoping to see this in the GUI soon. |
Yeah. Is quite a bit of work unfortunately. I need to add to the config file and all the logic around reading and writing to that. I need to add it to the UI and all the logic around editing and saving and testing webhooks. That's probably why it sat for a while. |
Editing of filters in the UI is in the roadmap for 1.2 though, so in reality that might happen first. |
Also, FYI. Editing the webhook does preserve filters correctly even though you can't see them in the UI. So if you edit the webhook in the UI and be confident that your manual XML edits will still be there. |
@netwolfuk Any update on this? |
Hi @Edstub207. Thanks for the reminder. I am really close to having filters (and headers and parameters) editable in the UI. At which point adding some quick filters would be relatively easy. I'm thinking the most useful ones would be "is default branch" and "is non-personal build". |
@netwolfuk Thanks, sounds good :) Do you know how long that might be? |
@Edstub207 I'm really hoping to have 1.2 alpha 9 out within a month. That will be the last alpha and then a release candidate or two to address any bugs. Are you interested in running a (well tested) pre-release version? |
@netwolfuk Yeah I'm up for testing a pre-release version :) |
Cool. Thanks @Edstub207. I'll post here whenever there is a new build on that branch. |
Hoping to have a build for you to test by the end of the weekend @Edstub207 |
@Edstub207 New builds available for the issue_3-add_filters_to_ui branch I'm keeping track of issues related to these builds at #206 |
New changes pushed. Build will be available on the above link shortly. |
New changes pushed. Builds available for the issue_3-add_filters_to_ui branch. |
More new changes pushed. issue 3 |
I'm planning to merge this and release as 1.2.0-alpha.10 on the weekend. I'm hoping it's the last alpha before release candidate. |
Hey, @netwolfuk Sorry about not doing any testing of this - I've had to look at other areas recently. So not sure when/if I can do testing right now. |
No problem @Edstub207. I've been there. Found a bug last night, but still hoping to get a release out this weekend. |
Alpha 10 released https://github.com/tcplugins/tcWebHooks/releases |
Release Candidate 1 released https://github.com/tcplugins/tcWebHooks/releases |
Hi Everyone,
Just installed latest version (tcWebHooksPlugin-1.1-alpha15.216.313.zip & tcWebHooksPlugin-REST-API-1.1-alpha15.216.313.zip) on our teamcity server (windows , 2017.2.2 (build 50909)).
The setup works just fine (hooking to mattermost 4.7.1).
I Noticed that we are getting notifications for personal builds on team city , i am not sure if this is by design or i am missing some setting to disable this , but this behavior is not desired normally (personal builds is hmm, personal).
Please let me know how and if i can disable the webhooks notifications for personal builds.
The text was updated successfully, but these errors were encountered: