We are getting some failures with the LDAP::Queries.employees query having to do with at least one valid employee not having a mail value in their record. This is problematic for High Five since it relies on email. So we need to take addition steps in this code.
Note: These errors seem to happen with "Emeritus" employees. We should consult Kacy as to whether we want to filter these employees out of the application and, if so, consult @allisonflick and Mack to see if there is a reliable way of doing so with our LDAP query.
Rationale
Currently the call to this query, which runs nightly, will fail when it hits a record like the one described. Instead, we should do something like:
Check for missing critical values such as mail and do not process that record. Log the information, but do not fail/throw an error code
Add a test or two around this
Expected behavior
Running the nightly LDAP rake task to keep the employee table populated should not result in an error if a record returned from the query doesn't have a mail attribute.
Actual behavior
Fantastic failure.
Steps to reproduce the behavior
Do this
Then do this...
Related work
Link to related tickets or prior related work here.
Descriptive summary
We are getting some failures with the
LDAP::Queries.employees
query having to do with at least one valid employee not having amail
value in their record. This is problematic for High Five since it relies on email. So we need to take addition steps in this code.Note: These errors seem to happen with "Emeritus" employees. We should consult Kacy as to whether we want to filter these employees out of the application and, if so, consult @allisonflick and Mack to see if there is a reliable way of doing so with our LDAP query.
Rationale
Currently the call to this query, which runs nightly, will fail when it hits a record like the one described. Instead, we should do something like:
mail
and do not process that record. Log the information, but do not fail/throw an error codeExpected behavior
Running the nightly LDAP rake task to keep the employee table populated should not result in an error if a record returned from the query doesn't have a
mail
attribute.Actual behavior
Fantastic failure.
Steps to reproduce the behavior
Related work
Link to related tickets or prior related work here.