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

オープン 初心者向け
#9,045 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@jcd1991 がすでに取り組んでいます。

2026年11月22日 から。

  • #9047 @jcd1991 による — オープン

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
75/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python, typescript
領域
documentation

調査の方向性

Pythonのスニペットは frontend/web/components/pages/environment-settings/tabs/warehouse-tab/warehouseEventSnippets.ts の getWarehouseEventSnippets().Python から取得されています。Cloud のimport行を、すでに EventProcessorConfig と Flagsmith をimportしているセルフホスト版の分岐と比較してください。その後、max_buffer_items=1 を使う短命ジョブ向けのガイダンスを確認してください。Cloud の出力が両方のシンボルをimportし、セルフホスト版と一致していて、ガイダンスに矛盾がなければ完了です。テキストの確認にPython SDKの実行は不要です。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Python
スター
7.4k
フォーク
613
平均マージ
1日 11時間
マージ済み PR(30日)
144

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Flagsmith/flagsmith のほかの issue

Flagsmith/flagsmith の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。