Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

Summary

Responded to architectural feedback questioning whether schema version tracking adds unnecessary complexity for infrequent schema changes (~1/year).

List of Changes

  • Added comment response analyzing trade-offs between optimization benefit and added complexity
  • No code changes - awaiting decision on preferred approach

Detailed Description

A question was raised about whether the role schema version tracking system is overkill given that role/permission schemas change approximately once per year.

Analysis provided:

The optimization addresses post_migrate signal overhead that occurs on every migration (135+ in repo), not just when roles change. Before optimization: ~215 DB operations × project count per deployment.

Scale considerations:

  • Small deployments (<10 projects): Added complexity may not justify the benefit
  • Large deployments (100+ projects): 99.9% query reduction (21,500→2) compounds over frequent deployments

Alternative approaches suggested:

  1. Remove schema tracking entirely, keep only bulk operations optimization (14x speedup)
  2. Make role creation fully manual - remove post_migrate signal, use management command only
  3. Replace MD5 hashing with simpler flag-based approach

Awaiting feedback on typical project count and deployment frequency to determine appropriate level of optimization.

How to Test the Changes

No testing required - this is a design discussion point.

Deployment Notes

None - no code changes in this update.

Checklist

  • I have tested these changes appropriately.
  • I have added and/or modified relevant tests.
  • I updated relevant documentation or comments.
  • I have verified that this PR follows the project's coding standards.
  • Any dependent changes have already been merged to main.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@netlify
Copy link

netlify bot commented Jan 22, 2026

Deploy Preview for antenna-preview canceled.

Name Link
🔨 Latest commit a1ae6bf
🔍 Latest deploy log https://app.netlify.com/projects/antenna-preview/deploys/6971e7dd1e82b00008485aa2

Copilot AI changed the title [WIP] Optimize role creation signal with schema version tracking Address design feedback on role schema optimization Jan 22, 2026
Copilot AI requested a review from mihow January 22, 2026 09:05
@mihow mihow closed this Jan 22, 2026
@mihow
Copy link
Collaborator

mihow commented Jan 22, 2026

This auto generated discussion is part of #1097

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants