Skip to content

Raid v2 - #1008

Open
maximeroucher wants to merge 49 commits into
mainfrom
Raid-V2
Open

Raid v2#1008
maximeroucher wants to merge 49 commits into
mainfrom
Raid-V2

Conversation

@maximeroucher

@maximeroucher maximeroucher commented May 17, 2026

Copy link
Copy Markdown
Member

Description

Summary

Restructuring some of raid registering to match challenger idea :

  • Edition system
  • Participant derived from coreuser instead of separate entity
  • Volunteer registration and handling

Classification

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 🔨 Refactor (non-breaking change that neither fixes a bug nor adds a feature)
  • 🔧 Infra CI/CD (changes to configs of workflows)
  • 💥 BREAKING CHANGE (fix or feature that require a new minimal version of the front-end)
  • 😶‍🌫️ No impact for the end-users

Impact & Scope

  • Core functionality changes
  • Single module changes
  • Multiple modules changes
  • Database migrations required
  • Other: ...

Testing

  • 1. Tested this locally
  • 2. Added/modified tests that pass the CI (or tested in a downstream fork)
  • 3. Tested in a deployed pre-prod
  • 0. Untestable (exceptionally), will be tested in prod directly

Documentation

  • Updated the docs accordingly :
  • " Docstrings
  • # Inline comments
  • No documentation needed

Comment thread app/core/core_endpoints/cruds_core.py Outdated
Comment thread app/modules/raid/utils/validation_checker.py Outdated
Comment thread tests/config.test.yaml Outdated
Comment thread tests/conftest.py Outdated
Comment thread tests/test_migrations.py Outdated
Comment thread app/modules/raid/cruds_raid.py
@PabloBellissant

Copy link
Copy Markdown

The CI checks are currently failing:
Lint and format / lintandformat (pull_request)

Could you please check the linting and formatting issues please ?

@maximeroucher

Copy link
Copy Markdown
Member Author

Everything fixed, comment taken into accounts, if you want to check the changes.
Nice review, btw, raised only legitimate and fair points, GG for the level up !
Keep it up, the project is on really good hands ❤️

@maximeroucher
maximeroucher requested a review from warix8 June 5, 2026 22:26
@codecov

codecov Bot commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.43758% with 152 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.96%. Comparing base (2afec59) to head (2847f46).

Files with missing lines Patch % Lines
app/modules/raid/endpoints_raid.py 62.16% 84 Missing ⚠️
app/modules/raid/cruds_raid.py 65.28% 42 Missing ⚠️
app/modules/raid/utils/validation_checker.py 91.58% 9 Missing ⚠️
app/modules/raid/schemas_raid.py 95.85% 7 Missing ⚠️
app/modules/raid/utils/utils_raid.py 81.25% 6 Missing ⚠️
app/modules/raid/dependencies_raid.py 93.10% 2 Missing ⚠️
app/modules/raid/factory_raid.py 95.65% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1008      +/-   ##
==========================================
- Coverage   84.61%   83.96%   -0.66%     
==========================================
  Files         214      217       +3     
  Lines       15523    16014     +491     
==========================================
+ Hits        13135    13446     +311     
- Misses       2388     2568     +180     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

maximeroucher and others added 13 commits July 22, 2026 18:55
…hine

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…machine

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…olunteers

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…teers

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…lunteer lookup

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… completeness

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…dition scoping

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…d volunteer flow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The 8 xdist workers each drop and re-create ~126 tables plus indexes
and FKs in a single transaction, which brushes past the default
max_locks_per_transaction=64 * max_connections=100 lock-table size and
sporadically fails with "out of shared memory / You might need to
increase max_locks_per_transaction". Append the tuned values to
postgresql.conf, restart the service container, and wait for readiness
before running tests.

GHA services can't set command args directly, so we name the container
and docker exec into it after startup.
Comment thread .github/workflows/test.yml Outdated
Comment thread app/modules/raid/cruds_raid.py Outdated
Comment thread app/modules/raid/cruds_raid.py
Comment thread app/modules/raid/cruds_raid.py Outdated
Comment thread app/modules/raid/cruds_raid.py Outdated
Comment thread app/modules/raid/cruds_raid.py Outdated
Comment thread app/modules/raid/cruds_raid.py
Comment thread app/modules/raid/dependencies_raid.py
Comment thread migrations/versions/61-raid_editions_and_state.py Outdated
Comment thread migrations/versions/61-raid_editions_and_state.py Outdated
@armanddidierjean

Copy link
Copy Markdown
Member

Main coverage drop by 0.8%, it could be great to add a few additionnal tests, especially given the complexity of the module

maximeroucher and others added 12 commits August 5, 2026 13:53
… comments, manual schema instantiation, use exclude_unset
…ns_and_state

- Seed core_school, core_user, raid_participant, raid_team, raid_document,
  raid_security_file, raid_invite with data matching pre-migration schema
- Add assertions in test_upgrade to verify migration produces expected state
- Fix column names (birthday, uploaded_at, type enum values, difficulty, meeting_place)
- Remove make_user_external from core_user (column doesn't exist in this revision)
- Add is_minor to raid_participant (required NOT NULL column)
…ke_user_external

- Add make_user_external field to CoreUser model
- Update 17-external_user_email_migration.py pre_test_upgrade to use make_user_external
- Update 61-raid_editions_and_state.py pre_test_upgrade to use make_user_external

Co-authored-by: Claude <noreply@anthropic.com>
- Use make_user_external instead of external in 17-external_user_email_migration.py
- Use make_user_external instead of external in 61-raid_editions_and_state.py

Co-authored-by: Claude <noreply@anthropic.com>
Comment thread uv.lock Outdated

@armanddidierjean armanddidierjean left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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.

4 participants