Repository navigation
Conversation
lookupV1Org caches a failed organization lookup as an entry with an empty name and returns it with a nil error. The committee member create and update mappers then dropped the organization without logging anything, so retries within the cache window left no trace of why the member had no organization. Log a warning in that case, matching the existing warning for a direct lookup failure, and cover both mappers with a test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
|
@bramwelt I'm starting review 1 of this pull request now (started 2026-10-22 22:05 UTC). This usually takes a few minutes — I'll update this comment with the summary when I'm done. Hi @bramwelt, thanks for this PR! 👋 This is a tight, focused fix: both committee-member mappers now log a warning when No issues found in any dimension. ✅ Approved ➡️ This auto-review agent is a preview. Please send feedback to @dealako. |
dealako
left a comment
There was a problem hiding this comment.
Automated review found no blocking, security, privacy, or minor issues. The change is a small, well-tested logging fix. Approving.
Generated by Claude Code
There was a problem hiding this comment.
🟢 Approval recommended
The logging-only changes preserve existing payload behavior and have focused regression coverage for both affected paths.
No open issues 🎉
What changed in this PR
Adds visibility into cached organization lookup failures during committee member synchronization, without changing payload behavior.
Changes:
- Logs a warning with
account_sfidwhen either member mapper receives an organization with an empty name. - Adds regression tests for cached failures and successful organization mappings in both create and update paths.
| File | Description |
|---|---|
cmd/lfx-v1-sync-helper/handlers_committees.go |
Adds cached-failure warnings to both member mappers. |
cmd/lfx-v1-sync-helper/handlers_committees_org_test.go |
Covers warning emission and organization presence for both mappers. |
Review effort: Balanced
Summary
lookupV1Orgcaches a failed v1 Organization Service lookup as an entry with an empty name, and returns that entry with a nil error. The committee member create and update mappers then left the organization empty without logging anything. Any retry during the cache window (up to 6h) therefore gave no indication of why the member had no organization.This PR logs a warning in that case, matching the existing
failed to lookup organization, leaving emptywarning for a direct lookup failure. Behavior is otherwise unchanged.Changes
handlers_committees.go: in bothmapV1DataToCommitteeMemberCreatePayloadandmapV1DataToCommitteeMemberUpdatePayload, a cached empty-name result now logsorganization lookup returned no name (cached lookup failure), leaving emptywithaccount_sfid.handlers_committees_org_test.go: covers a cached failure (organization left empty, warning logged) and a cached success (organization mapped) for both mappers.Supersedes #196, which sent an ID-only organization on lookup failure. That would have hidden incorrect
account__cdata rather than surfacing it.Testing
go test ./...passes.make check(gofmt, vet, golangci-lint): 0 issues.🤖 Generated with Claude Code