Synced from Hive. This page is pulled from hivecommons/hive@v5 during the docs build. Edit the canonical source in the Hive repository.
Customers enrichment: public affiliation and activity
Customers enrichment adds public facts about confirmed customers from CNCF-published sources: who a person works for, with dates, and their public contributions to CNCF projects. Hive uses the hivecommons/colony resolver for the lookups.
Defaults (changed in #20704).
With the Customers section on (its own default), enrichment and its gitdm
source are on by default. devstats is on by default only on a
CNCF-project hive, one whose managed repos include a repo of a CNCF project
(see CNCF-project detection), and off everywhere
else. crowd.dev and auto-accept stay off. An explicit setting always wins:
enabled: true or enabled: false in hive.yaml, a Settings switch, or the
HIVE_CUSTOMERS_ENRICHMENT_* environment variable. A hive that saved
enabled: false for any of these keeps it off. With Customers off, or
enrichment set off, no file is downloaded, no lookup is made and nothing extra
is stored or shown.
Sources
| Source | What it adds | What leaves the hive | Switch |
|---|---|---|---|
| gitdm | Affiliation (organization, from, until) from the curated cncf/gitdm files | Only a download of the public gitdm files from GitHub, the same files for every hive. Matching runs on the hive; no login, email or anything else about a person is sent. | customers.enrichment.gitdm.enabled |
| devstats | Public contribution activity per CNCF project, with links to devstats | The person’s GitHub login, never an email, sent to CNCF devstats | customers.enrichment.devstats.enabled |
| crowd.dev (LFX Insights) | Affiliation and activity from crowd.dev | The person’s GitHub login, never an email, sent to the crowd.dev API with your token | customers.enrichment.crowddev.enabled |
Rollout status: the gitdm and devstats sources are live. crowd.dev is not: LFX Insights has no per-person API it can use today (hivecommons/colony#5, linuxfoundation/insights#2573), so its switch and token field are accepted but make no request. The hub has a separate, hub-only LFX Insights source that uses the project and organization routes LFX Insights does offer; see LFX Insights on the hub.
How gitdm works
The customers_enrichment optional sweep runs every 30 minutes. With the gitdm
switch on it:
- Downloads the public gitdm files again when the snapshot is older than
customers.enrichment.gitdm.refresh_interval(default 24h). The download uses ETags, so an unchanged file is not sent again, and it is cached in/data/customers/colony-cache. - Looks up, on the hive, each confirmed customer whose last lookup is older than the snapshot, by their confirmed GitHub login and confirmed email addresses. At most 200 people per pass; the rest wait for the next one.
- Stores the affiliations found, with their dates, in
/data/customers/enrichment.json, and writes one audit line (customer_enrichment, person id and provider) when a person’s facts change.
CNCF-project detection
When customers.enrichment.devstats.enabled is unset and no
HIVE_CUSTOMERS_ENRICHMENT_DEVSTATS_ENABLED is given, the devstats default
is decided by whether this hive manages a repo that belongs to a CNCF project:
- The enrichment sweep fetches the public devstats project and repo list
(the
Reposcall of the devstats API atdevstats.cncf.io, for every repository group of the All CNCF database). It is one request that carries no login, email, repo name or anything else from the hive; the answer is the same for every hive. - Each managed repo (
project.repos) is matched against it, ignoring case. An exact repo match wins. Otherwise a repo whose owner’s devstats repos all belong to one CNCF project matches that project, which covers a new repo devstats has not listed yet. The groupsNot specified,CNCFandCNCF TOCare not projects and never match. - The answer is cached for 24 hours and computed again at once when the managed repos change. The decision is logged at info level once, when it changes, with the matched project and repo.
- Detection fails closed. Until it has succeeded, and when it fails with no earlier answer for the same repos, devstats stays off. A refresh that fails keeps an earlier answer for the same repos for up to 72 hours, so a short devstats outage does not switch devstats off and delete stored activity, and is retried after an hour.
Detection runs only while it decides something: with Customers and enrichment on and the devstats switch unset. Settings shows the outcome next to the devstats switch, for example “On (default: CNCF project detected: Argo)”, “Off (default: no CNCF project repos)” or “Off (set in config)”.
How devstats works
With the devstats switch on, the same sweep looks up each confirmed customer
who has a confirmed GitHub login and whose activity is older than 24 hours.
Each lookup sends that login, and nothing else, to devstats.cncf.io (a POST
to its public API). Lookups are capped by
customers.enrichment.devstats.hourly_limit (default 30 an hour across all
people); people over the limit wait for a later pass. The answer, total CNCF
contributions with a link to the devstats dashboard, appears read-only as
Public contributions in the person’s details, with an external link.
A person known only by email is never looked up.
With a switch off a pass only tidies: it deletes stored gitdm facts and the facts of people who are gone, and makes no request. Like every optional sweep it stands down when the hive’s API budget asks optional work to wait.
How results are used
- Affiliation is a suggestion unless an owner picks a policy. A gitdm or
crowd.dev affiliation is offered in the person’s details with the existing
Accept and Dismiss buttons and a chip naming the source and the dates. A value
set by hand and a value the person shared from the hub always win. With the
auto-accept policy (below) left at its default,
off, accepting is always a decision an owner makes. - Auto-accept (
customers.enrichment.auto_accept, defaultoff). Withgitdm_high, a gitdm affiliation matched by GitHub login (confidence high) and current today fills the organization when it is empty or holds an earlier auto-accepted value. It never replaces a value a person set or cleared, a value from the hub, or the company on the person’s own public forge profile, which is their own statement. An email-only match (confidence medium) is never accepted. The field is labelled “auto-accepted from cncf/gitdm” and has a Dismiss button; dismissing clears it and the value is not accepted again. Each auto-accept writes acustomer_enrichmentaudit line with the person id and providergitdm_auto_accept. - Activity is read-only. devstats activity appears as a “Public contributions” block in the person’s details, with external links.
- Only confirmed customers are looked up. A suggested person is never enriched, and a lookup needs a confirmed GitHub login (gitdm also matches a confirmed email locally, on the hive).
- Forget erases enrichment. Forgetting a person deletes everything found for them, and the tombstone stops it from being added again.
- Audit lines carry ids, not values. Each change enrichment makes to a
person’s facts writes a
customer_enrichmentaudit line with the person id and the provider, and each change to the crowd.dev token writes one saying only that the token changed. Never the facts found or the token.
Enrichment results are kept in the colony store, /data/customers/colony.db
(#20150), keyed by person
id with the source and fetch time of each fact; they are rebuilt from the
sources. A hive that kept them in enrichment.json imports it once and keeps it
as enrichment.json.migrated. They are written as
suggested enrichment facts: the current gitdm affiliation (source
colony:gitdm, with its confidence and the identity it matched) and one
activity:<project> count per devstats project (source colony:devstats).
Each source’s full answer (every affiliation with its dates, every project
with its name, period and link, and when the source answered) is kept in
colony’s answer slot too. With colony-only (opt-in) colony.db is the only
copy: enrichment.json is renamed enrichment.json.migrated once a verified
full write has succeeded, and is not written again. See
the colony store
and colony-only.
Settings
Settings, Features, Customers holds every knob, under Public affiliation and activity (enrichment) and its Enrichment sources group. Each switch needs the one above it on, and the whole block needs Customers on.
| hive.yaml key | Default | Environment override | Meaning |
|---|---|---|---|
customers.enrichment.enabled | true (needs Customers on) | HIVE_CUSTOMERS_ENRICHMENT_ENABLED | Master switch. false turns every source off |
customers.enrichment.gitdm.enabled | true | HIVE_CUSTOMERS_ENRICHMENT_GITDM_ENABLED | gitdm source (requires enrichment on) |
customers.enrichment.gitdm.refresh_interval | 24h | HIVE_CUSTOMERS_ENRICHMENT_GITDM_REFRESH_INTERVAL | How often the public gitdm files are downloaded again (a Go duration, at least 1h) |
customers.enrichment.devstats.enabled | unset: true on a CNCF-project hive, false otherwise | HIVE_CUSTOMERS_ENRICHMENT_DEVSTATS_ENABLED | devstats source (requires enrichment on). See CNCF-project detection |
customers.enrichment.devstats.hourly_limit | 30 | HIVE_CUSTOMERS_ENRICHMENT_DEVSTATS_HOURLY_LIMIT | devstats lookups all people may make in one hour (at most 120) |
customers.enrichment.crowddev.enabled | false | HIVE_CUSTOMERS_ENRICHMENT_CROWDDEV_ENABLED | crowd.dev source |
customers.enrichment.auto_accept | off | HIVE_CUSTOMERS_ENRICHMENT_AUTO_ACCEPT | Auto-accept policy: off or gitdm_high. Off whenever gitdm is off; an unknown value means off (Settings refuses one). Settings shows it as Auto-accept gitdm affiliations under Enrichment sources |
customers.enrichment.crowddev.token_file | /data/secrets/customers_crowddev_token | HIVE_CUSTOMERS_ENRICHMENT_CROWDDEV_TOKEN_FILE | Keystore-sealed crowd.dev API token. HIVE_CUSTOMERS_ENRICHMENT_CROWDDEV_TOKEN supplies the token directly and wins over the file |
customers.store | colony | HIVE_CUSTOMERS_STORE | Where person records and enrichment results live: always the colony store, /data/customers/colony.db (#20150). colony and colony-only are accepted and mean the same; json and shadow are retired (refused by Settings, logged at startup and ignored). A hive that ran on another mode imports people.json and enrichment.json on its first start, verifies the copy and renames them *.migrated (never deleted); hive colony export --format hive-people-json writes them back out (see the colony store). Settings shows it as Customer record store, below Enrichment sources |
The crowd.dev token is never stored in hive.yaml. Settings saves it through the
owner-only POST /api/customers/enrichment/settings, which seals it into the
token file and only ever reports whether a token is set.
To opt out, set the switch you want off explicitly:
customers:
enrichment:
enabled: false # every source off
# or keep enrichment and turn one source off:
# devstats:
# enabled: false # no login is ever sent to devstats
# gitdm:
# enabled: false
Privacy
The Customers section’s rule is that nothing it stores leaves the hive (design, section 12). Enrichment is the reviewed exception:
- gitdm sends nothing about anyone. It downloads public files. It is on by default with Customers.
- CNCF-project detection sends nothing about anyone. It downloads the public devstats project and repo list.
- devstats sends a confirmed customer’s public GitHub login, and nothing else,
to CNCF devstats. This happens by default on a CNCF-project hive with
Customers on; on every other hive it happens only when an owner turns
devstats on. To make sure no login is ever sent, set
customers.enrichment.devstats.enabled: false(orHIVE_CUSTOMERS_ENRICHMENT_DEVSTATS_ENABLED=false, or switch devstats off in Settings, Features), or setcustomers.enrichment.enabled: false. - crowd.dev, when an owner turns it on and supplies a token, sends a confirmed customer’s public GitHub login to the crowd.dev API.
- devstats, detection and crowd.dev are listed in telemetry.md with their switches.
- No request carries the hive’s identity, a user name or a token other than the crowd.dev API token the owner supplied. Requests use a generic User-Agent and follow no redirects.