Upgrade stripe from 5.5.0 to 16
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 22/100
Línea de trabajo
Start with stripe_webhook in contentcuration/contentcuration/views/subscription.py, where the event data object is passed to the DRF serializers, and with the mocked tests in tests/views/test_subscription.py. Pin stripe to 16.x in requirements.txt, then add one test per handled event type that builds the event with stripe.Event.construct_from(...) and checks the UserSubscription change. Done when those tests fail without the view fix and pass with it. The issue is marked as not open for contribution, so confirm with maintainers before starting.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Dependabot PR #6370 bumped stripe from 5.5.0 to 16.0.0 and was closed unmerged: on stripe ≥15 every Stripe webhook Studio receives is dropped. The upgrade needs a code change in stripe_webhook and tests that build real Stripe objects.
Complexity: Low
Target branch: unstable
Context
- stripe 15.0.0 (stripe-python#1762) made
StripeObjectstop subclassingdict. stripe_webhook(contentcuration/contentcuration/views/subscription.py) passesevent["data"]["object"]to the DRF serializers forcheckout.session.completed,customer.subscription.updatedandcustomer.subscription.deleted.- On 16.0.0 with DRF 3.15.1, a serializer fed a
stripe.Event.construct_from(...)data object fails validation; the same probe passes on 5.5.0:valid: False {'non_field_errors': [... 'Invalid data. Expected a dictionary, but got Subscription.']} - The view then logs a warning and returns 200, so Stripe does not retry: paid checkouts never grant storage and cancellations never revoke it.
- CI passed on #6370 because
tests/views/test_subscription.pymocksconstruct_eventwith plain dicts. - No other 6–16 breaking change touches Studio:
stripe.error.*,stripe.api_keyandstripe.api_versionremain;StripeObject.request()andstripe.Reversalare unused.
The Change
- All three webhook handlers should process real Stripe events on stripe 16.
Acceptance Criteria
-
requirements.txtpinsstripe==16.x. - A test per handled event type builds the event with
stripe.Event.construct_from(...)and asserts theUserSubscriptionchange; each fails on stripe 16 without the view fix. - Those tests pass on stripe 16.
AI usage
Drafted by rtibblesbot (Claude Code) from its review of #6370; the construct_from probe output is from that review.
Filed from #6370's review.
- Lenguaje dominante
- Python
- Estrellas
- 212
- Forks
- 321
- Merge medio
- 1 d 7 h
- PR fusionados (30 d)
- 14
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de learningequality/studio
-
Community library status changes don't update `date_updated`Posiblemente ocupada @ArpitaSamanta10 la tomó hoy. Abiertocommunity-contribution-in-progress DEV: backend good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
learningequality/studio#6414 · 8 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
DEV: backend
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
learningequality/studio#6410 ·
Los mantenedores suelen responder en 1 día
-
DEV: backend
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
learningequality/studio#6409 ·
Los mantenedores suelen responder en 1 día
-
DEV: backend
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
learningequality/studio#6407 ·
Los mantenedores suelen responder en 1 día
-
Stripe webhook accepts events when no webhook secret is configuredPosiblemente ocupada @adibmbrk la tomó hoy. Abiertocommunity-contribution-in-progress DEV: backend good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
learningequality/studio#6404 · 3 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de learningequality/studio
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
Reference check: findingsAbiertoaudit-reference-check
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
screenrec.com stopped workingAbiertosite-bug triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
canonical/paas-charm#407 · 1 comentario ·
Los mantenedores suelen responder en 5 días