Fix group and resource order in resource group audit events - #804
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe change corrects group and resource name placement in add and delete activity descriptions. A new test suite verifies both rendered messages. ChangesActivity description correction
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~5 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to This display-only correction aligns activity descriptions with the emitted event metadata without changing stored events or APIs. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit checks the group name bright Comment |
Problem
In the audit log, the
resource.group.addandresource.group.deleteentries name the two objects the wrong way round. An event for a resource added to a group renders as:The same swap shows on the "removed from resource" line.
Cause
Management emits these events with the group as the event target:
meta.nameis the group andmeta.resource_nameis the network resource (Group.EventMetaResourceinmanagement/server/types/group.go).ActivityDescription.tsxread the two keys into the opposite slots.Fix
Read
meta.nameas the group andmeta.resource_nameas the resource in both templates. Display only, the stored event and the streamed meta are unchanged.Issue ticket number and link
Reported by a customer through support.
Documentation
Select exactly one:
Cosmetic correction of an existing audit log message, no behaviour or API change.
Docs PR URL (required if "docs added" is checked)
Paste the PR link from https://github.com/netbirdio/docs here:
N/A
E2E tests
Optional: override the image tags used by the Playwright e2e workflow.
Defaults to
mainwhen omitted.management-cloud-tag: main
reverse-proxy-tag: main
Summary by CodeRabbit
Bug Fixes
Tests