A couple problems with how Notifications work.

I've got quite a few problems with how Notifications work and I'd be grateful for some help in cleaning up this mess.  Information you should know ahead of time:
We've hooked up our pre-existing LDAP to TeamCity for account creation and management.
We use Mercurial as our VCS of choice.
The e-mail system has been tested and is working.
I do see correct information in the "my changes" tab.
The "All Users" group contains 2 pre-existing rules:

Builds with my changes
  • - The build fails (ignore failures not caused by my changes)
System wide events
  • - Responsibility assigned to me


Problem 1: Without any custom notification settings (aka: The only rules are the ones in the All Users group) I receive no e-mails.  I purposely added a line to my build that would cause it to break yet I still receive no e-mail notifications.  However, if I add a new custom notification rule for "Builds with my changes -> The build fails (ignore failures not caused by my changes)" then I do receive mails... sometimes.  I can't figure out why but it only intermitently works. I am in the All Users group so I don't understand why the redundant rule works (sometimes) but the inhereted one does not.

Problem 2: While trying to debug why it is only intermittently sending me e-mail notifications, I discovered that this happens with other types of notifications I set up that are based on "builds with my changes."  The build starting notification will only occur intermittently too.  It's almost like TeamCity can't really figure out consistently whether or not the build has my changes.  Either that or TeamCity is throttling the e-mail it sends.  I know it's not a throttle on our SMTP server, we have plenty of other systems that sometimes spam us.  :-)

Problem 3: We plan to hook up all of our developers to TeamCity so they can receive notifications about any of their builds that are failing.  Although using LDAP makes things a lot easier on the account-creation end (so they can set up their own configurations), it fails when it comes to supporting notifications!  I can't really ask every dev of every VCS root we set up to make sure to add their mercurial name (which isn't even "just their login name" but is actually their full name and e-mail) to each VCS root they create.  There are dozens of devs working on each vcs root and dozens (and soon hundreds) of vcs roots.  TeamCity doesn't seem to have a scalable solution to allowing notifications for _any_ task on the server for _any_ account that exists.  Is there some easy way to automatically set up those vcs usernames?  Does LDAP synchronization take care of this problem?  This is a pretty big concern here, since it seems counter-intuitive to have such a fleshed out users/groups/roles architecture and then require that each and every user attach themselves to each and every vcs root.  Tell me I'm just looking at this the wrong way, please!  :-)

Thanks ahead of time for any help!

3 comments

Hi Dave,

Thank you for a detailed report. Please see my comments below.

1. Are you a member of other user groups? Is "The build fails (ignore failures not caused by my changes)" the first notification rule?
I mean when you don't explicitly set one more rule.
If it is the first rule, this is a bug. We'll try to reproduce it.

2. Probably it is related to 1. One more question on this matter: do you receive a notification, if you set just "The build fails" in All-Users group's rule?

3. Yes, TeamCity can fetch VCS username for all users from LDAP as well. All properties are listed in your ldap-config.properties.dist file in the end.
The only requirement is that VCS usernames must be stored in LDAP under same attribute. Please write back if something goes wrong.


---
Maxim

0

1: No, I am only a member of the All Users group.  Yes "The build fails (ignore failures not caused by my changes)" is the first notification rule.

2: I do not receive a notification if I set it to just "The build fails" in the All Users group.

3: Okay I'm trying to set this up with our LDAP guys, thanks.  Two questions though.  The support page for LDAP sync says:

  • teamcity.users.property.plugin:vcs:<VCS type>:anyVcsRoot — VCS username for all <VCS type> roots. The following VCS types  are supported: svn, perforce, cvs, tfs, vss, clearcase, starteam


Which means it doesn't support Mercurial.  Is this still true?  Am I dead in the water here?

Also I was wondering how hard synchronization hits the LDAP server (if at all.)  Does it just make a single query?  Does it only sync again if I hit the "sync now" button under the LDAP sync tab or is it on a schedule?  The documentation says "Periodically, TeamCity fetches data from LDAP and updates users in  TeamCity." but that isn't an indication of any specific schedule.  is there a scheduler in the settings once LDAP sync is connected properly?

Thanks for the help!

0

Hi Dave,

I see. Hard to say why this is happening, but it is certainly a bug. Could you please create the issue in our tracker http://youtrack.jetbrains.com ?

As for LDAP: Mercurial is supported, please use "teamcity.users.property.plugin:vcs:mercurial:anyVcsRoot" property name. The listed VCS types are just the examples, most popular ones.
The synchronization makes one query for users and one query for groups (if it is enabled). But if the number of results is big, plugin may request it by pages, so the total number of requests would be # pages.
There is a scheduler for synchronization, you can manage it using "teamcity.options.syncTimeout" property. Also the schedule information and sync statistic should be presented in LDAP admin page.


---
Maxim

0

Please sign in to leave a comment.