Devvit Secret shadows Devvit Setting even after being deleted.

Abierto
#171 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
typescript

Línea de trabajo

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.

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

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
210
Forks
88
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

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 reddit/devvit

Todos los issues de reddit/devvit

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.