Cite the controller's lines rightly, and say the newest key holds an id (issue 1223, review round 1)
mesh/merge-gate head 732238cb6a72 merged into trunk aa68b67389c9 — pass, with a note: builds mesh-sdk (+41 dependent(s)) → ace, g14, novox, shanks; no bus …
mesh/repo-check head 732238cb6a72 merged into trunk aa68b67389c9 — pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (typescript)…
mesh/delivery delivered
mesh/merge-gate head 732238cb6a72 merged into trunk aa68b67389c9 — pass, with a note: builds mesh-sdk (+41 dependent(s)) → ace, g14, novox, shanks; no bus …
mesh/repo-check head 732238cb6a72 merged into trunk aa68b67389c9 — pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (typescript)…
mesh/delivery delivered
This commit is contained in:
@@ -24,7 +24,7 @@ type BuildRecord struct {
|
|||||||
const BuildsBucket = "mesh-controller_builds"
|
const BuildsBucket = "mesh-controller_builds"
|
||||||
|
|
||||||
// BuildKey is a build's record under its module, a build that knew none under the request's key: copied from
|
// BuildKey is a build's record under its module, a build that knew none under the request's key: copied from
|
||||||
// mesh-controller internal/chain/keys.go:35-41 (BuildKey, with RequestKey at line 43).
|
// mesh-controller internal/chain/keys.go:35-40 (BuildKey, with RequestKey at line 42).
|
||||||
func BuildKey(module, id string) string {
|
func BuildKey(module, id string) string {
|
||||||
if module == "" {
|
if module == "" {
|
||||||
return "req." + id
|
return "req." + id
|
||||||
@@ -32,5 +32,7 @@ func BuildKey(module, id string) string {
|
|||||||
return module + ".build." + id
|
return module + ".build." + id
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewestKey is the key of a module's newest build, of any state: copied from mesh-controller internal/chain/keys.go:46.
|
// NewestKey is the key of a module's newest build, of any state: copied from mesh-controller internal/chain/keys.go:44.
|
||||||
|
// The key holds no record: its value is the newest build's id as raw bytes (internal/inventory/chain_builds.go:210 and
|
||||||
|
// :546), and the record lives at BuildKey(module, id). The pointer is a hint, checked against that record.
|
||||||
func NewestKey(module string) string { return module + ".newest" }
|
func NewestKey(module string) string { return module + ".newest" }
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ func TestBuildRecordWithoutInputs(t *testing.T) { // 1223/AC2
|
|||||||
|
|
||||||
func TestBuildKeys(t *testing.T) { // 1223/AC3
|
func TestBuildKeys(t *testing.T) { // 1223/AC3
|
||||||
// Literal values of mesh-controller internal/broker/controller_buckets.go:101 (BucketName(ControllerSeat, ChainBuilds)
|
// Literal values of mesh-controller internal/broker/controller_buckets.go:101 (BucketName(ControllerSeat, ChainBuilds)
|
||||||
// is "mesh-controller_builds") and internal/chain/keys.go:35-46.
|
// is "mesh-controller_builds") and internal/chain/keys.go:35-44.
|
||||||
if BuildsBucket != "mesh-controller_builds" {
|
if BuildsBucket != "mesh-controller_builds" {
|
||||||
t.Errorf("BuildsBucket = %q", BuildsBucket)
|
t.Errorf("BuildsBucket = %q", BuildsBucket)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user