Devvit Secret shadows Devvit Setting even after being deleted.

オープン
#171 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript

調査の方向性

Start by reproducing the issue with the two Devvit.addSettings definitions and the ctx.settings.get("Gemini-API-Key") call, changing the setting from an app-scoped secret to an installation-scoped setting. Trace how settings and secret storage are resolved; done means the installation value is returned after the secret is removed, or a documented CLI deletion path is provided.

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

説明

app-settings

I encountered an issue with Devvit Setting / Secret Storage. When I was developing app I added a secret to my devvit app.

Devvit.addSettings([
    {
        name: "Gemini-API-Key",
        label: "Gemini API Key",
        type: "string",
        scope: "app",
        helpText: "Enter your Gemini API Key here",
        isSecret: true
    },
]);

Later I ended up changing my mind and made it per install app because I thought it would be better if ever user brought their own api instead of using mine.

Devvit.addSettings([
    {
        name: "Gemini-API-Key",
        label: "Gemini API Key",
        type: "string",
        scope: "installation",
        helpText: "Enter your Gemini API Key here",
    },
]);

But with this change when I grab the key using the

const apiKey = (await ctx.settings.get("Gemini-API-Key")) as string;

It still grabs the old secret that I set instead of the new value from app setting page. So even when I stopped using the secret, the secret still somehow exist in the Devvit system.

Devvit needs to automatically clear secrets if they are not being referred in the code and free up its namespace. Or at least provide a cmd in devvit cli to delete all secret storage for an app.

主要言語
TypeScript
スター
210
フォーク
88
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

reddit/devvit のほかの issue

reddit/devvit の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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