Repository navigation
atepg: name the row in list decode errors - #2000
Merged
Luiz Oliveira (laoj2) merged 3 commits intoSep 30, 2026
Merged
Conversation
One bad row fails the whole listing, so say which.
| @@ -297,7 +297,7 @@ func (p *Persistence) ListWorkerAssignments(ctx context.Context, workerName stri | |||
| } | |||
| assignment := &ateapipb.ActorAssignment{} | |||
| if err := proto.Unmarshal(protoBytes, assignment); err != nil { | |||
Collaborator
There was a problem hiding this comment.
what about ListWorkers?
Contributor
Author
There was a problem hiding this comment.
Done, ListWorkers now names the row too (and is in the test).
| list func() error | ||
| want string | ||
| }{ | ||
| {"atespaces", func() error { _, err := s.ListAtespaces(ctx, opts); return err }, "atespace team-a"}, |
Collaborator
There was a problem hiding this comment.
nit: the table cases in this repo use positional fields on one line each, not named fields per case
Contributor
Author
There was a problem hiding this comment.
The cases are already positional, one line each. Did you mean something else here?
| @@ -0,0 +1,83 @@ | |||
| // Copyright 2026 Google LLC | |||
Collaborator
There was a problem hiding this comment.
can we rename this file to atepg_test.go? so we can add tests that don't fit the _test.go pattern
Contributor
Author
There was a problem hiding this comment.
Done, renamed to atepg_test.go.
# Conflicts: # cmd/ateapi/internal/store/atepg/atepg.go
Luiz Oliveira (laoj2)
approved these changes
Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #1401.
A listing fails on one undecodable row. The error now names it.