Fix #7983: Add EDGE_IDENTITY to allowed integration audit events - #8059
Fix #7983: Add EDGE_IDENTITY to allowed integration audit events#8059srijantrpth wants to merge 3 commits into
Conversation
|
@srijantrpth is attempting to deploy a commit to the Flagsmith Team on Vercel. A member of the Team first needs to authorize it. |
for more information, see https://pre-commit.ci
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe audit signal filter now allows Estimated code review effort: 1 (Trivial) | ~5 minutes 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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates the audit-log integration signal filtering so that audit events created for Edge identity flag overrides (EDGE_IDENTITY) are forwarded to messaging / observability integrations (e.g. Slack, Grafana, Datadog, Webhooks), closing the gap described in #7983.
Changes:
- Extend
track_only_feature_related_eventsto includeRelatedObjectType.EDGE_IDENTITY. - Add a unit test to ensure the Grafana audit-log signal handler executes for
EDGE_IDENTITYaudit log records.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
api/audit/signals.py |
Allows EDGE_IDENTITY audit log records through the shared integration signal filter decorator. |
api/tests/unit/audit/test_unit_audit_signals.py |
Adds a Grafana-focused unit test covering the EDGE_IDENTITY related object type. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@themis-blindfold review |
⚖️ Themis judgement: ✅ Ship itAdds CI shows three Vercel deployment preview failures, all of which are authorisation/config errors unrelated to this backend-only change. Pre-commit, CodeRabbit, and label checks passed.
⚖️ Acknowledged
📝 Walkthrough
🧪 How to verify
Product take: Fixes a real gap where identity-level flag overrides in Edge environments silently skipped monitoring integrations. Users relying on Slack/Datadog/Grafana alerts for flag changes would have missed edge identity overrides entirely — solid improvement for observability coverage. 🧭 Assumptions & unverified claimsNo unverified assumptions or claims. One line to rule them all, one line to find them, one line to bring edge identities in and in the integrations bind them. · reviewed at cf1ffa8 |
|
Hey @Zaimwa9 ! Just checking in here. I've addressed the feedback from the previous review and pushed the updates. Let me know if the new changes look good to you or if you'd like me to tweak anything else. Thanks |
docs/if required so people know about the feature.Changes
Closes #7983
Please describe.
Added
RelatedObjectType.EDGE_IDENTITYto thetrack_only_feature_related_eventssignal filter decorator inapi/audit/signals.py. This ensures audit events triggered by identity flag overrides in Edge/SaaS environments are properly processed and sent to messaging integrations like Slack, Grafana, Datadog, and Webhooks.How did you test this code?
Please describe.
test_send_audit_log_event_to_grafana__edge_identity__calls_expected) inapi/tests/unit/audit/test_unit_audit_signals.pyto coverEDGE_IDENTITYevents.uv run pytestto verify that the audit signal properly triggers integration events for edge identities.