Cloud Python warehouse snippet omits the import needed by its short-lived-job guidance

Abierto Apto para principiantes
#9,045 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@jcd1991 ya está trabajando en esto.

Desde el 22/11/2026.

  • #9047 de @jcd1991 — abierto

Evaluación

Dificultad
1/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
75/100
Tipo de issue
Documentación
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python, typescript

Línea de trabajo

El fragmento de Python proviene de getWarehouseEventSnippets().Python en frontend/web/components/pages/environment-settings/tabs/warehouse-tab/warehouseEventSnippets.ts. Compara la línea de importación de Cloud con la rama self-hosted, que ya importa EventProcessorConfig y Flagsmith, y luego revisa la guía para trabajos de corta duración que usa max_buffer_items=1. Se considera terminado cuando la salida de Cloud importa ambos símbolos, igual que self-hosted, y la guía sigue siendo coherente. No hace falta ejecutar el SDK de Python para verificar el texto.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Hullo folks,

I’m doing some research for Tessl Code Review and ran it against your repo. It flagged a potential issue, and I figured it made sense to share it with you:

Describe the bug

The Cloud Python warehouse example advises short-lived scripts to use EventProcessorConfig(max_buffer_items=1), but its import only includes Flagsmith. A user applying that advice needs an additional import that the example does not show.

This is a small documentation/snippet issue, rather than a claim that the unchanged snippet itself raises an exception.

Steps to reproduce

At be2bd72, call getWarehouseEventSnippets().Python in warehouseEventSnippets.ts. The emitted text starts with:

from flagsmith import Flagsmith

It later recommends passing max_buffer_items=1 to EventProcessorConfig for short-lived scripts and jobs. Applying that recommendation in the constructor introduces a name that was never imported:

flagsmith = Flagsmith(
    environment_key="YOUR_ENVIRONMENT_KEY",
    enable_events=True,
    event_processor_config=EventProcessorConfig(max_buffer_items=1),
)

Expected behavior

Include EventProcessorConfig in the Cloud import, or show the extra import and constructor option together in the short-lived-job guidance. The self-hosted variant already imports both symbols.

Validation

I executed the current TypeScript generator with no argument (Cloud) and with self-hosted URLs. Cloud emitted only Flagsmith; self-hosted emitted EventProcessorConfig, Flagsmith. Both emitted the short-lived-job guidance. I did not run the Python SDK, send events, or test a deployed Flagsmith instance.

The lead came from a retrospective Tessl review and I checked the generated output against current source. Happy to adjust if the intended example usage is different.

Full transparency: I work at Tessl, and we've spotted that using Tessl Code Review - using repository-level context and specific review lenses that improve over time through feedback. That’s how this finding surfaced.

We’re just getting started and want to offer the tool free to open-source projects. If this is useful, happy to give you access.

Bap

Lenguaje dominante
Python
Estrellas
7.4k
Forks
613
Merge medio
1 d 11 h
PR fusionados (30 d)
144

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Flagsmith/flagsmith

Todos los issues de Flagsmith/flagsmith

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.