This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new c75fc917 Dropping roles script
c75fc917 is described below
commit c75fc917de9e5a9cdb75dc6e3bb87641aedeea5a
Author: Sebb <[email protected]>
AuthorDate: Sun Jun 1 13:16:29 2025 +0100
Dropping roles script
---
lib/whimsy/asf/ldap.rb | 1 -
tools/public_json.sh | 1 -
www/public/README.html | 2 -
www/roster/public_ldap_roles.rb | 89 -----------------------------------------
www/test/dataflow.json | 8 ----
5 files changed, 101 deletions(-)
diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index 6d16e1d5..a73680c8 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -1573,7 +1573,6 @@ module ASF
# <tt>ou=role</tt> subtree of <tt>ou=groups,dc=apache,dc=org</tt>, used for
# committers (new) group only currently.
- # Also used in public_ldap_roles.rb JSON generator
class RoleGroup < Service
@base = 'ou=role,ou=groups,dc=apache,dc=org'
end
diff --git a/tools/public_json.sh b/tools/public_json.sh
index 23fa3c11..88c91990 100755
--- a/tools/public_json.sh
+++ b/tools/public_json.sh
@@ -25,7 +25,6 @@ ruby roster/public_ldap_authgroups.rb
public/public_ldap_authgroups.json > logs/
ruby roster/public_ldap_groups.rb public/public_ldap_groups.json >
logs/public-ldap-groups 2>&1
ruby roster/public_ldap_people.rb public/public_ldap_people.json >
logs/public-ldap-people 2>&1
ruby roster/public_ldap_projects.rb public/public_ldap_projects.json >
logs/public-ldap-projects 2>&1
-ruby roster/public_ldap_roles.rb public/public_ldap_roles.json >
logs/public-ldap-roles 2>&1
ruby roster/public_ldap_services.rb public/public_ldap_services.json >
logs/public-ldap-services 2>&1
ruby roster/public_member_info.rb public/member-info.json >
logs/public-member-info 2>&1
ruby roster/public_nonldap_groups.rb public/public_nonldap_groups.json >
logs/public-nonldap-groups 2>&1
diff --git a/www/public/README.html b/www/public/README.html
index 2d73a3e7..32ce1bc8 100644
--- a/www/public/README.html
+++ b/www/public/README.html
@@ -20,8 +20,6 @@
<dd>Basic details of LDAP personal entries. Shows the public name and
whether the login is currently disabled (<a
href="/test/dataflow.cgi#/public/public_ldap_people.json">docs</a>)</dd>
<dt>public_ldap_projects.json</dt>
<dd>Details of PMCs and Podlings. The 'owners' list holds the ids with
(P)PMC karma, and the 'members' list holds the ids with (P)PMC committer karma.
(<a href="/test/dataflow.cgi#/public/public_ldap_projects.json">docs</a>)</dd>
-<dt>public_ldap_roles.json</dt>
- <dd>Membership of LDAP role groups. Note: the committers group is deprecated
(INFRA-23030) (<a
href="/test/dataflow.cgi#/public/public_ldap_roles.json">docs</a>)</dd>
<dt>public_ldap_services.json</dt>
<dd>Membership of LDAP service groups. For example pmc_chairs shows the list
of people with PMC chair karma (<a
href="/test/dataflow.cgi#/public/public_ldap_services.json">docs</a>)</dd>
<dt>public_nonldap_groups.json</dt>
diff --git a/www/roster/public_ldap_roles.rb b/www/roster/public_ldap_roles.rb
deleted file mode 100644
index eee8de50..00000000
--- a/www/roster/public_ldap_roles.rb
+++ /dev/null
@@ -1,89 +0,0 @@
-# Creates JSON output with the following format:
-#
-# {
-# "lastTimestamp": "20160119171152Z", // most recent modifyTimestamp
-# "rolegroup_count": 1,
-# "roster_counts": {
-# "committers": 1234,
-# ...
-# },
-# },
-# "rolegroups": {
-# "committers": {
-# "modifyTimestamp": "20111204095436Z",
-# "roster_count": 1234,
-# "roster": ["uid",
-# ...
-# ]
-# },
-# ...
-# },
-# }
-#
-
-require_relative 'public_json_common'
-
-# gather service group info
-entries = {}
-
-groups = ASF::RoleGroup.preload # for performance
-
-if groups.empty?
- Wunderbar.error 'No results retrieved, output not created'
- exit 0
-end
-
-lastStamp = ''
-roster_counts = Hash.new(0)
-groups.keys.sort_by(&:name).each do |entry|
- next if entry.name == 'apldap' # infra team would prefer this not be
publicized
-
- m = []
- entry.members.sort_by(&:name).each do |e|
- m << e.name
- end
- lastStamp = entry.modifyTimestamp if entry.modifyTimestamp > lastStamp
- entries[entry.name] = {
- createTimestamp: entry.createTimestamp,
- modifyTimestamp: entry.modifyTimestamp,
- roster_count: m.size,
- roster: m
- }
- roster_counts[entry.name] = m.size
-end
-
-info = {
- # Is there a use case for the last createTimestamp ?
- lastTimestamp: lastStamp,
- rolegroup_count: entries.size,
- roster_counts: roster_counts,
- rolegroups: entries,
-}
-
-public_json_output(info)
-
-# special check for committers group which exists in two places currently
-role_group = entries['committers']
-if role_group
- unix_group = ASF::Group['committers']
- if unix_group
- commit_unix = unix_group.members.map(&:id)
- commit_role = role_group[:roster]
- unless commit_role == commit_unix
- diff = commit_role - commit_unix
- Wunderbar.warn "ASF::RoleGroup['committers'] contains #{diff} but
ASF::Group['committers'] does not" if diff.size > 0
- diff = commit_unix - commit_role
- Wunderbar.warn "ASF::Group['committers'] contains #{diff} but
ASF::RoleGroup['committers'] does not" if diff.size > 0
- end
- end
-end
-
-if check_now?
- # for validating UIDs
- uids = ASF::Person.list().map(&:id)
- entries.each do |name, entry|
- entry[:roster].each do |id|
- Wunderbar.warn "#{name}: unknown uid '#{id}'" unless uids.include?(id)
- end
- end
-end
diff --git a/www/test/dataflow.json b/www/test/dataflow.json
index 8d2ed374..2638c44d 100644
--- a/www/test/dataflow.json
+++ b/www/test/dataflow.json
@@ -86,14 +86,6 @@
"/lib/whimsy/asf/ldap.rb"
]
},
- "https://whimsy.apache.org/public/public_ldap_roles.json": {
- "description": "Membership of LDAP role groups. Note: the committers group
is deprecated (INFRA-23030)",
- "format": "hash of hashes['rolegroups']['groupname']['roster'][n] = 'uid'",
- "maintainer": "/www/roster/public_ldap_roles.rb",
- "sources": [
- "/lib/whimsy/asf/ldap.rb"
- ]
- },
"https://whimsy.apache.org/public/public_ldap_services.json": {
"description": "Membership of LDAP service groups. For example pmc_chairs
shows the list of people with PMC chair karma",
"format": "hash of hashes['services']['board']['roster'][1] = 'brett'",