Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

flagd provider: allow custom gRPC metadata on the in-process SyncFlags stream

Abierto
#403 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
78/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Tranquilo
Stack tecnológico
grpc, python
Área
api, backend

Línea de trabajo

Empieza siguiendo el flujo SyncFlags en proceso y _create_metadata a través de config.py, provider.py y grpc_watcher.py. Añade la ruta de configuración sync_metadata y verifica que selector y los pares clave-valor personalizados se envíen juntos, mientras que la ausencia de selector o de metadatos personalizados siga sin producir metadatos.

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

Descripción

Problem

The in-process resolver of the flagd provider opens a long-lived gRPC stream. It calls the SyncFlags method. The provider builds the gRPC metadata for this call. The function _create_metadata adds only one header. It adds the flagd-selector header. It adds this header only when the user sets a selector.

The provider gives the user no way to add other metadata headers. The Config object has no field for custom metadata. The user cannot add a header to the sync stream.

Effect

A user cannot send an infrastructure-specific header on the sync stream. One example is a proxy timeout header. A proxy can close a stream after a default request timeout. To keep the stream open, the client must send a header such as x-envoy-upstream-rq-timeout-ms: 0. The current provider cannot send this header. Because of this, a proxy can close the long-lived sync stream.

Proposed change

  1. Add a sync_metadata option to FlagdProvider and to Config. The value is a sequence of key-value pairs (header name and header value).
  2. In _create_metadata, add these pairs to the metadata. Keep the flagd-selector header. Send both the selector header and the user headers together.
  3. Keep the current behavior when the user does not set sync_metadata. If the user sets no selector and no custom metadata, the function returns no metadata, as before.

Compatibility

The change is backward compatible. The custom metadata is added only when the user sets sync_metadata. The default behavior does not change.

Scope

The change is small. It touches config.py, provider.py, and grpc_watcher.py. It affects only the in-process resolver, because only that resolver uses the SyncFlags metadata function.

Lenguaje dominante
Python
Estrellas
27
Forks
33
Merge medio
5 h
PR fusionados (30 d)
10

Guía de contribución

Abrir la guía de contribución

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 open-feature/python-sdk-contrib

Todos los issues de open-feature/python-sdk-contrib

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.