Studio: settings forms, with Fabric-managed settings marked read-only

Ouverte
#2,016 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é
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
45/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Active
Stack technique
typescript
Domaine
devtools, frontend

Piste de recherche

Start with configRootSchema.json to see how Harper’s settings fields, types, and descriptions are represented; then read configRestrictions.ts and useRollingConfigUpdate.tsx for current edit restrictions and save behavior. Compare the Fabric managed settings listed in the issue with compose.yaml in host-manager, including version-specific cases. Done means customers can edit supported settings in forms or the raw editor, see defaults and restart changes, and cannot save Fabric-managed settings.

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

Description

Problem

Studio's instance settings page is a raw JSON editor with Save & Restart. There are no forms, so a customer has to know Harper's setting names and value formats. The editor also accepts changes to settings that Fabric sets on every start, and those changes are quietly undone at the next restart.

What Studio does today
  • Shows Harper's settings (get_configuration) as JSON, checks them against Harper's settings schema (configRootSchema.json), and saves with the rolling settings save and restart (useRollingConfigUpdate.tsx).
  • Hides some settings and refuses changes to them, for example ports, threads, tls, storage and replication except replication.databases (configRestrictions.ts).
What Fabric sets on every start

Host-manager sets these settings each time an instance starts, so a customer's change to them doesn't last (compose.yaml):

  • Through HARPER_SET_CONFIG, which Harper applies over the settings file at every start: threads.count, tls, operationsApi.sysInfo.disk, operationsApi.network.http2, logging.stdStreams, logging.file, logging.path, logging.colors, logging.external.path, logging.external.stdStreams and analytics.replicate.
    • Also models on Harper below 5.3.
    • Also agent.enabled: false on a host set to force the built-in agent off.
  • Through environment variables, which Harper writes into the settings file at every start: threads.maxHeapMemory, threads.debug.startingPort, operationsApi.network.timeout, http.keepAliveTimeout, replication.hostname, replication.securePort, replication.enableRootCAs, node.hostname and authentication.cookie.domains.
  • As defaults the customer can change (HARPER_DEFAULT_CONFIG): logging.external.level, logging.external.console, http.corsAccessList, operationsApi.network.corsAccessList, and the built-in agent's settings on Harper 5.2+.
  • On Harper 5.3+, host-manager also rewrites the models block in the settings file (see HM#279).

Studio's block list misses several of the first two groups, for example the logging settings, analytics.replicate and http.keepAliveTimeout.

What to build
  • Settings forms: a form for each section of Harper's settings that Studio lets customers change, built from the settings schema's field names, types and descriptions. Keep the raw editor as an advanced option.
  • Fabric-managed settings: show the settings Fabric sets on every start as read-only, marked as managed by Fabric, in both the forms and the raw editor. Refuse to save a change to them.
  • Defaults: mark the settings that start from a Fabric default, and show the default.
  • Before saving, list what changed, and say that the instances restart.
  • Show Harper's own error when it refuses a setting.
Acceptance criteria
  • A customer can change a common setting, such as a log level or a CORS list, from a form without editing JSON.
  • A customer can't save a change to a setting that Fabric sets on every start, and Studio says why.
  • The raw editor still works for anything the forms don't cover.
Related
Dependencies

No central-manager or host-manager work is needed for the forms. The list of Fabric-managed settings must stay in step with host-manager's compose.yaml.

Langage dominant
TypeScript
Étoiles
5
Forks
4
Merge moyen
1 j 12 h
PR mergées (30 j)
65

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 HarperFast/studio

Toutes les issues de HarperFast/studio

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

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