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
{{ message }}
Repository navigation
feat: poll and discover every configured octolens workspace - #5506
CDP can now ingest Octolens mentions from every Octolens workspace it has an API key for. Octolens API keys are scoped to one workspace, so each workspace gets its own mention poll sync unit (on the existing single Octolens anchor integration) and its own discovery pass with its own key. One workspace failing, for example with a rejected key, leaves the others running.
Deploy note: keys now come from CROWD_OCTOLENS_API_KEYS, an unquoted JSON object of workspace name to key, e.g. {"octolens-global":"<LF key>","cncf":"<key>"}. The LF key must be under octolens-global so the existing sync unit keeps its watermark. CROWD_OCTOLENS_API_TOKEN is no longer read, so the new variable has to be in the configmap before this is deployed.
Changes
CROWD_OCTOLENS_API_KEYS parsing with errors that name the workspace but never a key; getCredential takes the sync unit's channel, which for Octolens is the workspace, and the dispatcher passes it. Other platforms ignore it.
Discovery creates one mentionPoll unit per configured workspace, reconciles each workspace with its own key, revives only that workspace's dead-lettered unit, soft-deletes empty subproject integrations once after all workspaces, and pauses the unit of a workspace whose key was removed (resumed when it comes back). The run fails only when every workspace failed.
Per-run page caps are split evenly across workspaces, since it is unconfirmed whether Octolens's 500 requests/hour are per key or per account.
backfill-octolens-mentions takes --workspace (required when there are several).
Mappings carry the Octolens workspace they were discovered in, and one
workspace's reconcile only deactivates its own mappings. Soft-deleting empty
subproject integrations moves out of the reconcile so the caller runs it once
after every workspace.
Refs linuxfoundation/lfx-cdp-insights-ops#1238
Signed-off-by: Uroš Marolt <uros@marolt.me>
Sync deps get the unit's channel, which for Octolens is the workspace, so the
mention poll only loads its own workspace's keyword mappings. Discovery
reconciles the LF workspace and soft-deletes emptied subproject integrations
once afterwards.
Refs linuxfoundation/lfx-cdp-insights-ops#1238
Signed-off-by: Uroš Marolt <uros@marolt.me>
CROWD_OCTOLENS_API_KEYS holds one key per Octolens workspace as an unquoted
JSON object and replaces CROWD_OCTOLENS_API_TOKEN. getCredential takes the
sync unit's channel, which for Octolens is the workspace, and the dispatcher
passes it. Config errors name the workspace, never a key.
Refs linuxfoundation/lfx-cdp-insights-ops#1238
Signed-off-by: Uroš Marolt <uros@marolt.me>
The anchor gets one mentionPoll unit per workspace in CROWD_OCTOLENS_API_KEYS.
Discovery reconciles each workspace with its own key and skips a failing one
without touching the others, revives only that workspace's dead-lettered
unit, soft-deletes empty subproject integrations once after all workspaces,
and pauses the unit of a workspace whose key was removed.
Refs linuxfoundation/lfx-cdp-insights-ops#1238
Signed-off-by: Uroš Marolt <uros@marolt.me>
Each workspace's mention poll gets an equal share of the per-run page caps,
since it is unconfirmed whether Octolens's 500 requests/hour are per key or per
account. The backfill script takes --workspace (required with several), and
ADR-0033 records one poll unit per workspace on the single anchor.
Refs linuxfoundation/lfx-cdp-insights-ops#1238
Signed-off-by: Uroš Marolt <uros@marolt.me>
Every running worker now writes the workspace, so the (integrationId,
keywordId) key can go; it would stop two workspaces from mapping the same
keyword id to the same project. Adds that case as a test.
Refs linuxfoundation/lfx-cdp-insights-ops#1238
Signed-off-by: Uroš Marolt <uros@marolt.me>
Medium Risk
Changes connector credentials, multi-workspace sync scheduling, and keyword mapping uniqueness; a misconfigured JSON keys map or missing deploy-time env would stop or mis-route ingestion for specific workspaces.
Overview
Octolens ingestion is extended from a single shared token to one API key per workspace via CROWD_OCTOLENS_API_KEYS (JSON map); CROWD_OCTOLENS_API_TOKEN is no longer read. getCredential now accepts the sync unit's channelId (workspace name for Octolens), and sync runs pass it through so each poll uses the right key.
Discovery and sync units: The anchor still owns Octolens polling, but there is now one mentionPoll unit per configured workspace. Discovery reconciles mappings per workspace with that workspace's key, revives dead-lettered units per channel, pauses units when a key is removed, and only fails the job when every workspace fails. A DB migration drops the old (integrationId, keywordId) uniqueness so the same keyword id can map per workspace.
Rate limits and scheduling: Mention poll splits the hourly page budget across workspaces (time-slot rotation); units that are not in slot return a new skipped outcome, and executeSync reschedules them without touching failure counters. The backfill CLI gains --workspace; mapping health alerts and runbooks are per workspace.
Deploy: Set CROWD_OCTOLENS_API_KEYS in config (with the LF key under octolens-global) before rollout.
Reviewed by Cursor Bugbot for commit 57fc575. Bugbot is set up for automated code reviews on this repo. Configure here.
@themarolt I'm starting review 1 of this pull request now (started 2026-12-03 07:55 UTC using review agent v0.1.34). This usually takes a few minutes. I'll update this comment with the summary when I'm done. If there's no summary here after about 45 minutes, the review stopped: push a new commit, or post a comment that begins with a mention of me followed by re-review, to start another. For help with the review agent, see https://github.com/linuxfoundation/lfx-review-agent/issues.
Hi Uros,
Summary
This PR lets CDP poll and discover Octolens mentions per workspace, with one poll unit and API key for each. The design is sound and well tested. The main concerns are around removing keys and the monitoring and recovery paths for individual workspaces.
Decision
🔴 Needs changes before approval
🟡 3 minor · ⚪ 1 nit
Three minor findings bring the minor count over 2, which blocks approval.
📝 Documentation gaps (1): the stale-mapping alert still gives a backfill-octolens-mentions recovery command without --workspace (services/apps/cron_service/src/jobs/octolensMappingHealth.ts)
All required checks passed (DCO).
Details
Overall impression: A clean extension of the single-anchor design. Keys come from CROWD_OCTOLENS_API_KEYS and errors never echo a key. Each workspace gets its own poll unit, discovery pass, dead-letter revival and mapping reconcile, and the old mapping key is dropped with a test for the same keyword id in two workspaces. The gaps are in lifecycle edges and operations. Removing the last key leaves units active, the freshness alert is not per workspace, and the alert's backfill command no longer works with several workspaces. Other reviewers (Greptile, Copilot, Cursor Bugbot) raised the same three points. Copilot also flagged that the one-page-per-workspace minimum can exceed the assumed shared 500 requests/hour with a very large number of workspaces. I did not make that a finding because the PR documents the budget as unconfirmed, and it only matters at about 20 workspaces or more.
🟡 Minor: 3 issues: Removing every key leaves the mention poll units active, A failing workspace is invisible to the stale-discovery alert, Alert recovery commands omit --workspace
⚪ Nit: 1 issue: Dead reconciled flag in discoverWorkspace
Other reviewers and CI checks: Greptile, Copilot and Cursor Bugbot comments were reconciled with this review. Greptile also noted that new comments conflict with the "no comments" rule in AGENTS.md; I did not raise this as a finding. DCO passed, and no other required check exists.
Documentation reminder: changed CROWD_OCTOLENS_API_KEYS, --workspace. Please check product pages and external docs; the author and maintainers own those updates.
[Medium impact] The PR appears safe to merge; no new blocking issue was found.
Summary
Octolens now discovers and polls each configured workspace with its own key. The latest update reserves room for discovery calls before dividing the polling budget.
Octolens discovery now covers every configured workspace independently.
Each Octolens poll uses its workspace key and a shared page budget.
Octolens backfills can target a specific workspace.
Octolens health reports show which workspace needs attention.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Removed workspaces retain active poll units, healthy workspaces can mask stale discovery elsewhere, and per-workspace minimum allocations can exceed the shared API request budget.
Extends CDP’s Octolens connector to ingest multiple workspaces through the existing shared anchor, building on workspace-scoped keyword mappings from #5505.
Changes:
Resolves credentials per workspace and isolates discovery failures.
Adds workspace-specific polling, pause/resume handling, page allocations, and backfill selection.
Removes the legacy mapping constraint and updates tests and documentation.
The reason will be displayed to describe this comment to others. Learn more.
The multi-workspace design is sound and well tested, but three minor gaps (more than the allowed two) need fixing before approval: removing every key leaves the poll units active, a failing workspace can hide behind a healthy one in the stale-discovery alert, and the alert's recovery command fails with several workspaces.
Documentation
This pull request changes behavior that may also be described outside this repository, such as product pages or an external docs site. I can't read those, so please check them; the author and maintainers own those updates. Changed here:
Discovery health is grouped by workspace, and the hourly check sends one
stale alert per workspace episode, so a workspace with a broken key or
snapshot is reported even while the others are healthy. Deactivation alerts
name each mapping's workspace.
Refs linuxfoundation/lfx-cdp-insights-ops#1238
Signed-off-by: Uroš Marolt <uros@marolt.me>
(cherry picked from commit 4d685543193a30d5ad584da4d65960038b3ad211)
With CROWD_OCTOLENS_API_KEYS empty or unset, discovery used to return before
pausing anything, so existing mention polls kept failing on every run. It now
pauses them (keeping their watermarks) without creating an anchor. Also drops
a dead per-workspace soft-delete branch and comments that restate the code.
Refs linuxfoundation/lfx-cdp-insights-ops#1238
Signed-off-by: Uroš Marolt <uros@marolt.me>
Every 5-minute slot spends at most 28 pages across all workspaces. Up to 14
workspaces share each slot; beyond that they take turns by slot, so the total
no longer grows with the workspace count.
Refs linuxfoundation/lfx-cdp-insights-ops#1238
Signed-off-by: Uroš Marolt <uros@marolt.me>
@themarolt I'm starting review 2 of this pull request now (started 2026-12-03 09:43 UTC using review agent v0.1.34). This usually takes a few minutes. I'll update this comment with the summary when I'm done. If there's no summary here after about 45 minutes, the review stopped: push a new commit, or post a comment that begins with a mention of me followed by re-review, to start another. For help with the review agent, see https://github.com/linuxfoundation/lfx-review-agent/issues.
Hi Uros, thanks for working through the first round so quickly. All four earlier findings are fixed.
Summary
These commits fix the earlier findings: units are paused when the last key is removed, stale alerts are per workspace, the alert commands pass --workspace, and the page budget rotates across workspaces. The new code has two minor gaps in how skipped and resumed units are handled.
Decision
⏸️ Not approved, new commits pushed during review
🟡 2 minor · ⚪ 2 nit
Commits pushed after 35bb6c7 were not reviewed. The latest push, 35ff79e, looks like it addresses both minor findings (a skipped sync outcome, and keeping the run lock on resume). The next push, a comment that begins with a mention of me followed by re-review, or converting the PR to a draft and marking it ready again starts a follow-up review that covers them.
All required checks passed (DCO).
Details
Overall impression: The first-round gaps are closed with tests, and the page budget now rotates so total polling stays at 28 pages per slot however many workspaces there are. The remaining issues are edge cases in the scheduling code. A slot skip is recorded as a successful run, which can reset a bad key's failure count, and resuming a unit clears its run lock. Both look addressed in the newest commit, which I did not review. Merging main into the branch is still needed, since GitHub reports it as behind. Copilot also noted that discovery's 3 requests per workspace per hour sit outside the page budget. I did not raise it: it only matters at around 50 or more workspaces, and the author already states that limit on the PR thread.
Follow-up of review 1:
✅ Resolved: Removing every key leaves the mention poll units active. Fixed in 511a92a, which pauses existing units without creating an anchor.
✅ Resolved: A failing workspace is invisible to the stale-discovery alert. Fixed in 0950e5e: health is grouped by workspace and each one alerts on its own.
✅ Resolved: Alert recovery commands omit --workspace. Fixed in 0950e5e.
✅ Resolved: Dead reconciled flag in discoverWorkspace. Removed in 511a92a.
👏 Nice work: The octolensPageBudget tests check the total per slot (never more than 28 pages) for 1 to 100 workspaces and that every workspace gets turns. The new per-workspace health query also comes with its own test.
🟡 Minor: 2 issues: A slot skip is recorded as a successful run, Resuming a workspace clears the lock of a run that may still be in flight
⚪ Nit: 2 issues: Stale alerts keep firing for a workspace whose key was removed, The ADR amendment describes the page budget as an even split, but it now rotates
Other reviewers and CI checks: Greptile, Cursor Bugbot and Copilot raised the slot-skip and run-lock points on 35bb6c7; both are included above. Greptile's later review of 35ff79e reports no remaining issues. DCO passed on 35bb6c7; no other required check exists.
Documentation reminder: changed Octolens mapping discovery looks stale for workspace, mention poll page budget. Please check product pages and external docs; the author and maintainers own those updates.
The rotation bounds mention polling, but discovery still spends three requests per configured workspace outside that allocation. With 56 workspaces and queued backfills, the allocator permits 336 mention requests/hour plus 168 discovery requests: 504 before retries, exceeding the assumed shared 500/hour cap. Reserve discovery capacity in the aggregate budget, or reject workspace counts that cannot fit both discovery and polling.
A skipped turn returned a complete run, so the dispatcher recorded a success
and cleared the failure count; a workspace with a rejected key could then
never dead-letter. Syncs can now return skipped, which only reschedules the
unit (the poll asks for the start of its next own slot).
Refs linuxfoundation/lfx-cdp-insights-ops#1238
Signed-off-by: Uroš Marolt <uros@marolt.me>
A unit paused while its poll was still running could be resumed with lockedAt
cleared, letting a backfill write into a watermark the running poll would then
overwrite. Resuming now leaves the lock to the run.
Refs linuxfoundation/lfx-cdp-insights-ops#1238
Signed-off-by: Uroš Marolt <uros@marolt.me>
Discovery spends 3 requests/hour per workspace outside the poll rotation, so
with enough workspaces the total passed 500/hour. The per-slot poll budget now
takes discovery's share (and retry headroom) off 450/hour first, and refuses
a workspace count that would leave no budget for polling.
Refs linuxfoundation/lfx-cdp-insights-ops#1238
Signed-off-by: Uroš Marolt <uros@marolt.me>
Discovery requests exceed the shared API rate limit · services/libs/connectors/src/connectors/octolens/syncs/mentionPoll.ts:36
Fixed in 57fc575: the per-slot poll budget now subtracts discovery's 3 requests/hour per workspace (and keeps retry headroom) from 450/hour before splitting pages, so polling plus discovery stays under 450/hour at any count it accepts; a count that would leave no polling budget (over about 140 workspaces) is refused.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Repeat polling within a five-minute slot can double the intended page budget, while newly configured workspaces with failed discovery can be omitted from health checks and stale alerts.
The reason will be displayed to describe this comment to others. Learn more.
New commits were pushed while this review ran; this review covers 35bb6c7 only. The four earlier findings are fixed. This round found two minor issues and two nits, which is within the limit for approval. I'm not approving because the branch now holds commits I didn't review (35ff79e, which appears to address both minor issues).
Documentation
This pull request changes behavior that may also be described outside this repository, such as product pages or an external docs site. I can't read those, so please check them; the author and maintainers own those updates. Changed here:
Octolens mapping discovery looks stale for workspace (stale alert is now sent once per workspace)
mention poll page budget (28 pages per 5-minute slot shared by all workspaces, taking turns beyond 14)
Findings outside the diff
[nit] Stale alerts keep firing for a workspace whose key was removed
Issue: getOctolensMappingDiscoveryHealth groups every active mapping by workspace and the hourly check alerts for each workspace whose newest lastSeenAt is over 3 hours old. Nothing tells it which workspaces are still configured.
Proof: services/libs/data-access-layer/src/octolens/health.ts has no filter on configured workspaces, and reportStaleness in octolensMappingHealth.ts re-sends once the 24-hour dedup key expires. A workspace removed from CROWD_OCTOLENS_API_KEYS stops being reconciled (and its poll unit is paused), but its mappings stay active, so its lastSeenAt never moves again.
Why it matters: Removing a workspace on purpose produces a stale alert every day, with advice to check the schedule.
Fix: Skip workspaces that have no active mentionPoll unit when building the stale list, for example by joining listOctolensMentionPollUnits on channelId and status = 'active'.
The reason will be displayed to describe this comment to others. Learn more.
[minor] A slot skip is recorded as a successful run
Issue: When octolensPageBudget returns null (another workspace group owns this 5-minute slot), runMentionPoll returns { complete: true } without calling Octolens.
Proof: In executeSync, a complete outcome without finished goes to recordRunSuccess, which sets consecutiveFailures = 0, lastErrorClass = NULL, lastRunComplete = true and lastSuccessAt = now(). With more than 14 workspaces a unit sits out alternate slots, so a rejected key that fails on its own slots has its failure count reset by each skipped run. It may never reach the 5 provider.auth failures that dead-letter a unit. Greptile, Cursor Bugbot and Copilot raised the same point.
Why it matters: A workspace with a bad key keeps hitting the shared Octolens budget instead of stopping, and lastSuccessAt reports a success that never happened.
Fix: Return an outcome that only reschedules the unit and leaves its failure state alone. Commit 35ff79e, pushed after this review started, adds a skipped outcome in executeSync that does this; the next follow-up will confirm it covers this return.
The reason will be displayed to describe this comment to others. Learn more.
[minor] Resuming a workspace clears the lock of a run that may still be in flight
Issue: resumePausedSyncUnitsInChannels sets "lockedAt" = NULL, but pausing a unit does not stop a run that is already executing.
Proof: pauseSyncUnitsOutsideChannels only sets status = 'paused'. claimDueUnits claims any active unit whose lockedAt is NULL and whose nextRunAt has passed, and mergeSyncUnitWatermark (used by the backfill script) only patches a unit whose lockedAt is NULL. If discovery pauses and then resumes a workspace while its old run is still going, the run can be claimed a second time, and a backfill can patch the watermark that the old run later overwrites.
Why it matters: Duplicate emits and a lost backfill or rewind. The window is small, because discovery runs hourly and a run is short, but a manually triggered discovery or a slow run can hit it. Copilot raised the same point.
Fix: Leave "lockedAt" alone when resuming, so the run's own end write clears it. Commit 35ff79e, pushed after this review started, is titled as doing this; the next follow-up will confirm.
## Amendment (2026-12-02): one poll per Octolens workspace
An Octolens API key reads a single workspace, and CDP ingests several workspaces. The connector keeps the one segment-less anchor integration, but the anchor now owns one `mentionPoll` sync unit per workspace: the unit's `channelId` is the workspace name from `CROWD_OCTOLENS_API_KEYS`, `getCredential` takes the unit's channel to pick that workspace's key, and keyword mappings are scoped by workspace. The Linux Foundation workspace keeps the original `octolens-global` channel and its watermark. Each unit has its own watermark and dead-lettering, so a bad key stops only its workspace. The request budget is still treated as shared, so the per-run page caps are split evenly across workspaces (linuxfoundation/lfx-cdp-insights-ops#1238).
The reason will be displayed to describe this comment to others. Learn more.
[nit] The amendment describes the page budget as an even split, but it now rotates
Issue: The amendment says the per-run page caps are "split evenly across workspaces". The code in this PR works differently: octolensPageBudget shares 28 pages per 5-minute slot, and with more than 14 workspaces the workspaces take turns by slot.
Proof: services/libs/connectors/src/connectors/octolens/syncs/mentionPoll.ts computes groups = Math.ceil(count / 14) and returns null for a workspace outside the current slot's group. This amendment text predates the rotation commit.
Why it matters: A reader of the ADR would not expect some workspaces to get no poll in a given slot.
Fix: Replace the last sentence with the real rule, for example: the request budget is treated as shared, so every 5-minute slot spends at most 28 pages across all workspaces; with more than 14 workspaces they take turns by slot.
The reason will be displayed to describe this comment to others. Learn more.
Slot budget bypassed by cadence jitter
Medium Severity
Skipped polls reschedule to the start of the next own 5-minute slot, but a poll that actually fetches still uses the 5-minute cadence with ±10% jitter. A fast run that finishes in under ~30s with negative jitter is due again before the slot ends, so the unit is claimed twice and spends its full page share twice. With more than 14 workspaces, turn-taking makes this the common path: a 2-page poll is quick, every assigned slot double-runs, and request use can exceed the 500/hour Octolens cap the slot budget was meant to keep.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
New workspaces with no successful discovery are omitted from health checks, allowing onboarding failures to go unreported indefinitely while another workspace succeeds.
@themarolt I'm starting review 3 of this pull request now (started 2026-12-03 10:32 UTC using review agent v0.1.34). The hourly check started this review. This usually takes a few minutes. I'll update this comment with the summary when I'm done. If there's no summary here after about 45 minutes, the review stopped: push a new commit, or post a comment that begins with a mention of me followed by re-review, to start another. For help with the review agent, see https://github.com/linuxfoundation/lfx-review-agent/issues.
The reason will be displayed to describe this comment to others. Learn more.
This review covers the whole pull request, because merge commit eb1bb4f makes a range compare unsafe. The two minor findings from review 2 (r2-f1 and r2-f2) are fixed. This round adds two minor findings, and two earlier nits are still open. That is within the limit for approval.
The reason will be displayed to describe this comment to others. Learn more.
[minor] A poll can run twice in one slot and spend its page share twice
Issue: A skipped run is rescheduled to the exact start of the workspace's next own slot. A run that does fetch is rescheduled on the normal 5-minute cadence, which has ±10% jitter. The slot is also 5 minutes long, so nothing keeps the next run out of the slot the unit just used.
Proof: executeSync sends a complete outcome through nextRunAtFor to cadenceRunAt, which is now + 5 min ± 30 s (scheduling.ts). If a unit is claimed shortly after its slot starts and the run ends within about 30 s, it is due again before the slot ends whenever the jitter is negative enough. With a 10 s claim delay plus run time, that is about one run in three. octolensPageBudget then returns the same non-null budget for that slot, so the second run fetches a full share again.
Why it matters: The rotation exists to keep polling plus discovery under the shared 450 requests/hour. Above 14 workspaces every turn is a short 2-page run, so a double run is the common case, and the hourly total can go over the budget this change was built to hold.
Fix: Remember which slot the unit last ran in (for example in the watermark) and return the skipped outcome when the current slot was already used. Alternatively, reschedule a run that used its budget to nextOwnSlotStart instead of the cadence.
The reason will be displayed to describe this comment to others. Learn more.
[minor] A workspace whose discovery has never succeeded is missing from the health check
Issue: The per-workspace health query groups octolensKeywordMappings rows, so a workspace only appears after it has written at least one mapping.
Proof: getOctolensMappingDiscoveryHealth selects from integration."octolensKeywordMappings" m with GROUP BY m.workspace. A workspace newly added to CROWD_OCTOLENS_API_KEYS gets a mentionPoll unit from ensureWorkspaceSyncUnits. If its first discovery fails (rejected key, incomplete snapshot), it has no mapping rows, so health.workspaces has no entry for it and reportStaleness never alerts. runOctolensDiscovery still succeeds while any other workspace works (it throws only when every workspace failed) and only logs the failure.
Why it matters: This is the same blind spot as r1-f2, narrowed to onboarding. A new workspace with a bad key stays silent until someone notices that its mentions are missing. Copilot raised the same case.
Fix: Build the workspace list from the active mentionPoll units (listOctolensMentionPollUnits) and left-join the mappings. For a workspace without mappings, use the unit's creation time as the staleness baseline. The same list also fixes r2-f4, because a removed workspace has a paused unit and drops out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CDP can now ingest Octolens mentions from every Octolens workspace it has an API key for. Octolens API keys are scoped to one workspace, so each workspace gets its own mention poll sync unit (on the existing single Octolens anchor integration) and its own discovery pass with its own key. One workspace failing, for example with a rejected key, leaves the others running.
Deploy note: keys now come from
CROWD_OCTOLENS_API_KEYS, an unquoted JSON object of workspace name to key, e.g.{"octolens-global":"<LF key>","cncf":"<key>"}. The LF key must be underoctolens-globalso the existing sync unit keeps its watermark.CROWD_OCTOLENS_API_TOKENis no longer read, so the new variable has to be in the configmap before this is deployed.Changes
CROWD_OCTOLENS_API_KEYSparsing with errors that name the workspace but never a key;getCredentialtakes the sync unit's channel, which for Octolens is the workspace, and the dispatcher passes it. Other platforms ignore it.mentionPollunit per configured workspace, reconciles each workspace with its own key, revives only that workspace's dead-lettered unit, soft-deletes empty subproject integrations once after all workspaces, and pauses the unit of a workspace whose key was removed (resumed when it comes back). The run fails only when every workspace failed.backfill-octolens-mentionstakes--workspace(required when there are several).(integrationId, keywordId)key that feat: scope octolens keyword mappings by workspace #5505 kept for the rollout; test for the same keyword id on the same project in two workspaces, as promised on feat: scope octolens keyword mappings by workspace #5505.Type of change
Related issue
Refs linuxfoundation/lfx-cdp-insights-ops#1238