Trying to fix the Object class violation by verifying that the Person is in the
LDAP list. How do I test if the Person object is included in the Service object?
The result of ASF::Service.find('pmc-chairs') is a Service object
#<ASF::Service:0x007f9f74c8afd0 @name="pmc-chairs">
The result of ARGV.map {|id| ASF::Person[id]} is a Person object
#<ASF::Person:0x007fda18c82f18 @name="clr", @attrs={"uid"=>["clr"],
"uidNumber"=>["2018"] etc.
Is there a Service.find method? Doesn't seem to be a Service.include? method.
Where are these classes documented?
Thanks,
Craig
> On Jan 8, 2018, at 4:07 PM, Craig Russell <[email protected]> wrote:
>
> I've updated the modify_pmcchairs.rb command to verify that before asking
> LDAP to remove an entry from pmc-chairs, the corresponding entry in
> committee-info has already been changed.
>
> Testing this change resulted in unexpected results:
>
> [MacBook-Pro-9:/srv/whimsy/tools] clr% ./modify_pmcchairs.rb --add testsebb
> Password for clr:
> [MacBook-Pro-9:/srv/whimsy/tools] clr% ./modify_pmcchairs.rb --rm clr testsebb
> Password for clr:
> [MacBook-Pro-9:/srv/whimsy/tools] clr% ./modify_pmcchairs.rb --rm testsebb
> Password for clr:
> _WARN [#<LDAP::Mod:0x7f84a986b5e8 LDAP_MOD_DELETE
> {"member"=>[]}>]
> _WARN cn=pmc-chairs,ou=groups,ou=services,dc=apache,dc=org
> /Users/clr/apache/git/whimsy/lib/whimsy/asf/ldap.rb:260:in `modify': Object
> class violation (LDAP::ResultError)
> from /Users/clr/apache/git/whimsy/lib/whimsy/asf/ldap.rb:260:in `modify'
> from /Users/clr/apache/git/whimsy/lib/whimsy/asf/ldap.rb:1368:in
> `remove'
> from ./modify_pmcchairs.rb:36:in `block in <main>'
> from /Users/clr/apache/git/whimsy/lib/whimsy/asf/ldap.rb:145:in `bind'
> from /Users/clr/apache/git/whimsy/lib/whimsy/asf/ldap.rb:145:in `bind'
> from ./modify_pmcchairs.rb:36:in `<main>'
>
> After adding testsebb, I verified that testsebb was indeed in both committers
> and pmc-chairs.
>
> But when I removed testsebb, it looks like committers is listed twice and
> still pmc-chairs.
>
> And trying to remove it again caused an error.
>
> Any ideas? testsebb is still damaged...
>
> And error reporting is not great. I guess more checking is needed but Object
> class violation is not very informative.
>
> Craig L Russell
> Secretary, Apache Software Foundation
> [email protected] http://db.apache.org/jdo
>
Craig L Russell
Secretary, Apache Software Foundation
[email protected] http://db.apache.org/jdo