Remove the SDK version checks from the API sample tests

Aperta Adatta ai principianti
#1,436 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go, java, javascript, node.js, python

Direzione di ricerca

Leggi docs-site/scripts/api-code-samples.integration.test.mjs e docs-site/scripts/api-sdk-support.mjs, poi verifica come i test di esempio installano e utilizzano ciascun SDK. Rimuovi i due controlli di uguaglianza delle versioni e aggiorna i comandi di installazione in install-sdk.mdx affinché usino versioni non bloccate, dove supportato. Il lavoro è completato quando i test continuano a eseguire gli esempi Node.js e le istruzioni di installazione non richiedono più versioni SDK verificate corrispondenti.

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

Descrizione

needs discussion

Two tests in docs-site/scripts/api-code-samples.integration.test.mjs tie the docs to the SDK versions pinned in sdkVersions in docs-site/scripts/api-sdk-support.mjs:

  • installed Node SDK matches the exact audited version requires the installed @openfga/sdk to equal the pinned js-sdk version. package.json uses a caret range, so any PR that refreshes the lockfile after a js-sdk release installs the new version and fails, even when it doesn't touch the SDK or the samples. Once one of those PRs merges, every PR fails until the pin is bumped. main is in that state now: the lockfile has 0.9.8 and the pin is 0.9.7.
  • native installation instructions name the audited SDK versions requires install-sdk.mdx to install exactly the pinned versions, so the page lags every release. All five are behind right now: js 0.9.7 (latest 0.9.8), go 0.8.2 (0.8.4), dotnet 0.10.4 (0.10.5), python 0.10.4 (0.10.6), java 0.10.0 (0.11.2).

Neither check catches a broken sample. The same file already runs every Node.js sample against the installed SDK.

Runs that failed on the first check since the js-sdk 0.9.8 release:

Proposal: remove both checks, and use unpinned install commands where the package manager allows it (npm, yarn, go get, dotnet add package, pip).

Lingua principale
MDX
Stelle
52
Fork
110
Merge medio
2g 12h
PR unite (30g)
21

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 openfga/openfga.dev

Tutte le issue di openfga/openfga.dev

Issue simili

Altre issue su Documentation

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.