Skip to content

Commit 0c93231

Browse files
committed
fix crash loop on missing manifest tables
1 parent a3db2ea commit 0c93231

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ require (
1414
github.com/stretchr/testify v1.10.0
1515
go.opentelemetry.io/contrib/zpages v0.60.0
1616
go.opentelemetry.io/otel v1.35.0
17-
golang.org/x/net v0.39.0
17+
golang.org/x/net v0.40.0
1818
golang.org/x/sys v0.33.0
1919
google.golang.org/protobuf v1.36.6
2020
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt
5353
go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc=
5454
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
5555
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
56-
golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY=
57-
golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E=
56+
golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY=
57+
golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds=
5858
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
5959
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
6060
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=

manifest.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,10 +445,13 @@ func applyManifestChange(build *Manifest, tc *pb.ManifestChange) error {
445445
case pb.ManifestChange_DELETE:
446446
tm, ok := build.Tables[tc.Id]
447447
if !ok {
448-
return fmt.Errorf("MANIFEST removes non-existing table %d", tc.Id)
448+
for _, level := range build.Levels {
449+
delete(level.Tables, tc.Id)
450+
}
451+
} else {
452+
delete(build.Levels[tm.Level].Tables, tc.Id)
453+
delete(build.Tables, tc.Id)
449454
}
450-
delete(build.Levels[tm.Level].Tables, tc.Id)
451-
delete(build.Tables, tc.Id)
452455
build.Deletions++
453456
default:
454457
return fmt.Errorf("MANIFEST file has invalid manifestChange op")

0 commit comments

Comments
 (0)