Clean up logging in controller and wrap errors#132
Open
yushan8 wants to merge 12 commits into
Open
Conversation
sbalabanov
requested changes
Jul 2, 2026
xytan0056
reviewed
Jul 4, 2026
| if cacheErr != nil && !storage.IsNotFound(cacheErr) { | ||
| logger.Warn("GetChangedTargets: Failed to read from cache, proceeding to compute", zap.Error(cacheErr)) | ||
| logger.Error("GetChangedTargets: failed to read from cache", zap.Error(cacheErr)) | ||
| return fmt.Errorf("failed to read from cache: %w", cacheErr) |
Contributor
There was a problem hiding this comment.
I think we should still fall through and continue to compute in this case if storage read errors out
Contributor
Author
There was a problem hiding this comment.
Yea I think if there's an actual storage failure, it'll be caught in getGraph anyways.
xytan0056
reviewed
Jul 4, 2026
| scope.Histogram("total_duration.histogram", c.totalDurationBuckets).RecordDuration(totalDuration) | ||
| return nil | ||
| logger.Error("GetChangedTargets: failed to read cached response", zap.Error(readErr)) | ||
| return fmt.Errorf("read cached response: %w", readErr) |
Contributor
There was a problem hiding this comment.
same here, any kind of transient storage blip that used to digrade gracefully now hard fails
xytan0056
reviewed
Jul 4, 2026
| err := ws.Release() | ||
| if err != nil { | ||
| // clean up the workspace if release fails. | ||
| if releaseErr := ws.Release(); releaseErr != nil { |
Contributor
There was a problem hiding this comment.
This too. workspace Release shoudn't fail the request when the compute result is already put in storage.
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.
Uh oh!
There was an error while loading. Please reload this page.