Bucket.Attrs never returns ReplicationConfig: replication configuration is write-only
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
- #87 di @ffumero2003 — chiusa senza merge
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 75/100
Direzione di ricerca
Leggi base/base.go listBuckets e b2/baseline.go attrs(), quindi confronta attrs() con la mappatura di scrittura esistente in updateBucket. Aggiungi un test senza rete che simuli b2_list_buckets con una configurazione di replica e verifichi che l’ID della chiave sorgente e i campi della regola compaiano in Attrs; verifica inoltre che un bucket senza la configurazione restituisca nil. Il lavoro è completo quando entrambi i casi passano.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
blazer can set a bucket's replication configuration but never reads it back.
(*Bucket).Attrs returns everything else about a bucket — lifecycle, info, type, file
lock, CORS, default SSE, default retention — but not ReplicationConfig, so
bucket.Attrs(ctx).ReplicationConfig is always nil even after a successful update. The
replication-config capability is effectively write-only: a caller can configure
replication but cannot read the configuration back through the SDK to confirm it, drive a
read-modify-write, or disable a rule based on current state. Affected: current
master.
Where it is (two gaps, both must be fixed)
base/base.golistBucketsparses thereplicationConfigurationfield from the
b2_list_bucketsresponse but never assigns it to the constructedBucket, so
b.b.ReplicationConfigurationstays nil regardless of what B2 returned.b2/baseline.goattrs()has no mapping from the internal replication config to the
publicBucketAttrs.ReplicationConfig, so even if (1) were fixed the value would not
reach the caller.
Fixing only one of the two leaves ReplicationConfig nil — the value has to be both
retained off the list response and mapped onto the public attrs.
Expected vs actual
After (*Bucket).Update sets a replication configuration, a subsequent Attrs(ctx)
should return a non-nil ReplicationConfig carrying the source application key id and
every rule field (destination bucket id, file-name prefix, priority, rule name,
enabled/include-existing flags). Today it returns nil in every case, including immediately
after a confirmed successful update.
Fix direction
base/base.go: havelistBucketscarrybucket.ReplicationConfiguration.Valueonto the
constructedBucket.b2/baseline.go: mapb.b.ReplicationConfiguration→BucketAttrs.ReplicationConfig
(source key id plus every rule field) inattrs(), nil-guarded. This is the inverse of
the existing write mapping already present inupdateBucket.
Public API is unchanged — this only populates an existing field that was always nil.
Verification
A network-free test that stubs b2_list_buckets to return a bucket with a
replicationConfiguration and asserts Attrs surfaces the source key id and the rule
fields, plus a negative case confirming a bucket without one yields a nil
ReplicationConfig.
- Lingua principale
- Go
- Stelle
- 66
- Fork
- 18
- Merge medio
- 1g 10h
- PR unite (30g)
- 132
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Backblaze/blazer
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
test: skip the fuzz non-vacuity guard when replaying a single seedForse già presa @ffumero2003 l’ha presa 5 giorni fa. Apertatesting
Backblaze/blazer#330 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
test: add fuzz targets for the untrusted-input parsers that lack oneForse già presa @ffumero2003 l’ha presa 5 giorni fa. Apertatesting
Backblaze/blazer#325 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Backblaze/blazer
Issue simili
-
needs-triage typo
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
llm-d-incubation/llm-d-scaling-manager#122 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue severity: low tech-debt
Difficoltà 2/5 Mezza giornata Idoneità per principianti 75/100
TMHSDigital/subenum#329 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Backend summarize min() / max() panics when a field has no numeric valuesForse già presa @weng5e l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
grafana/grafana-infinity-datasource#1832 ·
I maintainer di solito rispondono entro 1 giorno
-
tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
GillMacedo/godebugdiff#13 ·