You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever the branch tracker tries to update a branch the error below happens in the git hook.
The missing key fields_from_user does not exist in the auth.py template nor can I find any other reference or docs on how it should be filled out.
Pushing branches manually to the critic server works fine.
Critic encountered an unexpected error. If you know a series of steps that can
reproduce this error it would be very useful if you submitted a bug report
including the steps plus the information below (see bug reporting URL at the
bottom of this e-mail).
2018-04-27 09:53:52,762 - ERROR - KeyError: 'fields_from_user'
Request:
{
"repository_name": "ibe",
"refs": [
{
"new_sha1": "10e55190572c9fc7a7565f2427fcbc5660ebc0f3",
"name": "refs/heads/master",
"old_sha1": "0000000000000000000000000000000000000000"
}
],
"user_name": "critic",
"flags": "trackedbranch_id=3"
}
Traceback (most recent call last):
File "/usr/share/critic/background/githook.py", line 81, in slave
authentication_labels = auth.DATABASE.getAuthenticationLabels(user)
File "/usr/share/critic/auth/databases/accesstokensdb.py", line 33, in getAuthenticationLabels
return self.authdb.getAuthenticationLabels(user)
File "/usr/share/critic/auth/databases/ldapdb.py", line 200, in getAuthenticationLabels
fields = self.configuration["fields_from_user"](user)
KeyError: 'fields_from_user'
Critic version: 28ed20bb8032d7cc5aa23de98da51e619fd84164
Critic bug reports can be filed here: https://github.com/jensl/critic/issues/new
The text was updated successfully, but these errors were encountered:
The fields_from_user configuration option should apparently be a function that takes a single argument, a dbutils.User object, and returns a dictionary matching the fields configuration option, typically with all fields except the password. With the default fields option
Authentication labels were a fairly recent addition, and has seen no testing (from my part) outside of Opera's production Critic system. Testing LDAP in isolation requires a bit of work, I guess. Also, given how nice I think interfacing with LDAP systems is, I somewhat suspect I won't like setting one up...
Thanks for the explanation. The template could definitely use and update and explanation here but I don't feel confident enough to submit a patch myself.
Whenever the branch tracker tries to update a branch the error below happens in the git hook.
The missing key fields_from_user does not exist in the auth.py template nor can I find any other reference or docs on how it should be filled out.
Pushing branches manually to the critic server works fine.
The text was updated successfully, but these errors were encountered: