Coordinator: adapter.configuration hides which binding, reference and rule failed

Ouverte
#2,747 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
70/100
Type d'issue
Refactorisation
Clarté
Clairement spécifiée
Activité
Active
Stack technique
rust
Domaine
backend

Piste de recherche

Start in crates/registry-coordinator/src/adapters.rs at config_error() and list its 24 call sites, grouping them by which of the five causes each one represents. Follow the secret-reference path (resolve, read as UTF-8, parse the JWK, build the endpoint) to see which binding name and runtime-file key are in scope at each site, and read the wording used in #1433 and #977. Done looks like one message per failure naming the binding, the key such as authorization.signingKeyRef, and a value-free cause, with a test per cause and no secret bytes printed.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

area:coordinator bug

Problem

When a product binding cannot be built, Coordinator reports one message whatever the cause: adapter.configuration: product binding or secret-file configuration is invalid. It names neither the binding, the reference, nor the rule that failed.

Observed during the Stage 0 adopter run for #2745. coordinator serve on an example runtime file failed with that message. The cause was a missing private JWK file named by authorization.signingKeyRef. Finding it meant reading the runtime file against the secret root by hand.

Where it collapses

crates/registry-coordinator/src/adapters.rs defines config_error() and calls it from 24 sites with .map_err(|_| config_error()). These include:

  • resolving the secret reference;
  • reading it as UTF-8;
  • parsing the private JWK;
  • building the endpoint.

Proposal

Keep the adapter.configuration code. Make the message name:

  • the connection or binding name;
  • the runtime-file key, such as authorization.signingKeyRef;
  • one value-free cause, from a small closed set: missing file, refused file (mode, ownership or link), not UTF-8, not a valid private JWK, or invalid endpoint.

Never print the secret bytes. Casework and BReg do the same through #1433 and #977, so reuse their wording.

Add a test per cause.

Langage dominant
Rust
Étoiles
2
Forks
0
Merge moyen
9 h 48 min
PR mergées (30 j)
151

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de registrystack/registry-stack

Toutes les issues de registrystack/registry-stack

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.