[RRFC] mechanism for opting in to experimental changes

Aperta
#667 4 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript, node.js
Ambito
cli

Direzione di ricerca

L’issue non indica file, test o punti di ingresso. Inizia esaminando la configurazione esistente della CLI npm e il comportamento dei flag da riga di comando rispetto all’esempio proposto --experimental; il lavoro sarà concluso quando sarà definito un meccanismo condiviso per attivare gli esperimenti senza trattare in seguito il flag come sconosciuto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Motivation ("The Why")

The npm CLI often has a desire to get new features and/or changes to underlying systems into the hands of users without waiting for a new semver-major to represent the potential for breakage in those changes.

In order to ship these things with minimal disruption, we would like to introduce a means of opting in to experimental features and behaviors. This functionality should work such that when the feature/behavior is no longer experimental, the presence of the flag does not create an error. This is important because our future config changes may lead us to throwing errors for unknown command line flags, which is undesirable here.

Example

As an initial example, we are working toward removing our existing HTTP agent implementation with a new in-house agent that better covers our use cases with regards to socket limitations, proxy usage, and timeouts. In theory this change should not be breaking, and ideally will not be, however due to a lack of visibility into the various configurations of our community we cannot ship it with full confidence that we won't break any workflows.

In order to get this new agent into our community's hands for testing purpose, we would like to gate it behind this new experimental feature flag. This will allow us to test thoroughly, especially with our users who are currently experiencing problems that should be resolved by this change, before it becomes the new default (or in some cases the only option).

How
Current Behaviour

We don't have a means of doing these feature flags today. Some things are configurable, however when we set new defaults or change existing behaviors in ways that we have low confidence will not be breaking we are forced to wait for our next semver-major release to ship the change as breaking and deal with bugs after the fact. This delays our feedback cycle, and leaves our community with potentially broken features for a potentially extended length of time.

Desired Behaviour

Users should be able to opt-in to these experimental changes with a command line flag. Current thinking is something like the following:

> npm install --experimental       # all experiments enabled
Known Risks

Changes to the set of experiments could potentially be considered breaking. We have some options for dealing with this in the future, however. The simplest solution would be changing the experiments in a new semver-major release of npm.

Alternatively, and likely more effectively, we can consider changes to the experiments to not be breaking and make it as clear as possible to the user that when running in experimental mode they may experience issues and if they do they should try the command again with --no-experimental. This flag is meant to opt in to changes that are not yet considered stable after all. The suggested communication here can be implemented via a notice log informing the user experimental mode is on and a verbose or silly log that tells us what features are associated with the flag in the current release.

Lingua principale
JavaScript
Stelle
780
Fork
266
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di npm/rfcs

Tutte le issue di npm/rfcs

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.