comp_req__kvs__value_get_api says get value returns the default value, but the team agreed it does not

Offen Anfängerfreundlich
#485 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Anfängerfreundlichkeit
86/100
Issue-Typ
Dokumentation
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
cpp, rust
Bereich
documentation

Rechercherichtung

Die Anforderung heißt comp_req__kvs__value_get_api; das Issue gibt ihre Datei nicht an. Suche zunächst im Repository nach dieser Anforderung und lies ihren aktuellen Text zusammen mit dem für Kvs::GetValue und Rust get_value beschriebenen Verhalten. Aktualisiere die Anforderung so, dass sie der genannten Vereinbarung des Teams entspricht, und bestätige anschließend, dass dort nicht mehr steht, get value gebe den Standardwert zurück, wenn ein Schlüssel nicht geschrieben wurde.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Description

The requirement comp_req__kvs__value_get_api says:
if a key was never written, get value returns its default value.

The team agreed on something else: get value returns an error, and the user reads the default value with get default value.
Both implementations work the way the team agreed. Please change the requirement text.

comp_req__kvs__value_get_api: The component shall provide a capability to retrieve the in-memory value associated with a key, returning the default value (see comp_req__kvs__value_default) when the key has not been explicitly written.

How it works today

If a key was never written, get value returns the error KeyNotFound.
This is also true when the key has a default value.
To get the default value, the user calls get default value.
C++ (Kvs::GetValue in score/kvs/kvs.cpp) and Rust (get_value in score/kvs/rust_kvs/kvs.rs) both work like this.

History

#417 (2026-09-18): removed the default value from get value in C++ and Rust
#383 (2026-10-02): in a review, Piotr asked if get value should return the default value. umaucher answered that the team agreed in the FT meeting that it should not: "the 'normal' get is not defining any error handling and the 'user' needs to decide ... so e.g. requesting the default instead".
#541 (2026-10-23): added the current requirement text. It brings the default value back, so it does not match #417 or the agreement.

Acceptance Criteria

Requirtement text should match the team agreement

Vorherrschende Sprache
Python
Sterne
6
Forks
49
Ø Merge
1 T. 21 Std.
Gemergte PRs (30 T.)
63

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

  • Kein Dockerfile und keine Docker-Compose-Datei
  • Hat eine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus eclipse-score/reference_integration

Alle Issues in eclipse-score/reference_integration

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.