Repository navigation
refactor(controller): map GetChangedTargets request through internal/mapper - #327
Merged
Merged
Conversation
justinwon777
commented
Oct 8, 2026
| // (e.g. a missing-deadline "missing TTL" reject) becomes a visible request failure | ||
| // rather than silent degradation. | ||
| func (c *controller) serveChangedTargetsFromCache(ctx context.Context, e *metrics.Emitter, logger *zap.Logger, request *pb.GetChangedTargetsRequest, stream pb.TangoServiceGetChangedTargetsYARPCServer, repositoryID string, maxDist int32, start time.Time) (bool, error) { | ||
| func (c *controller) serveChangedTargetsFromCache(ctx context.Context, e *metrics.Emitter, logger *zap.Logger, request entity.GetChangedTargetsRequest, outputConfig *pb.OutputConfig, stream pb.TangoServiceGetChangedTargetsYARPCServer, repositoryID string, maxDist int32, start time.Time) (bool, error) { |
Contributor
Author
There was a problem hiding this comment.
output config will be removed here when filter logic is moved to handler
justinwon777
force-pushed
the
justin.won/validate
branch
from
October 8, 2026 07:44
675a1cc to
7a64425
Compare
…mapper Add entity.GetChangedTargetsRequest and mapper.ProtoToGetChangedTargetsRequest. The mapper validates both revisions and the same-remote rule. The controller maps the request once and passes entity values to the helpers. This removes validateGetChangedTargetsRequest and its TODO. An unknown computation strategy now fails at the top of the handler as a user error, instead of later in the graph fetch goroutine. Test plan: go test ./controller ./internal/... ./entity. The validation cases moved to internal/mapper/changed_targets_test.go. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
justinwon777
force-pushed
the
justin.won/validate
branch
from
October 8, 2026 07:46
7a64425 to
66e1305
Compare
xytan0056
approved these changes
Oct 8, 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.
Add entity.GetChangedTargetsRequest and mapper.ProtoToGetChangedTargetsRequest. The mapper validates both revisions and the same-remote rule. The controller maps the request once and passes entity values to the helpers. This removes validateGetChangedTargetsRequest and its TODO.
Test Plan
go test ./controller ./internal/... ./entity. The validation cases moved to internal/mapper/changed_targets_test.go.
Issue
in prep for #325