Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

solver: correct cache nil return value in Exec #3066

Merged
merged 1 commit into from Aug 26, 2022

Conversation

jedevc
Copy link
Member

@jedevc jedevc commented Aug 26, 2022

Follow up to #3043.

We introduce a new boolean execDone to track whether we've successfully completed an Exec call in the past, since nil is a possible return value from Exec.

We have some similar logic for cacheDone set by CacheMap, hence the name of the new bool, but I wonder if we might want to handle nil return values for that as well? Not sure if that would ever trigger, and also not super familiar with the logic here 馃憖

buildkit/solver/jobs.go

Lines 747 to 752 in c58f128

if s.cacheRes != nil && s.cacheDone || index < len(s.cacheRes) {
return s.cacheRes, nil
}
if s.cacheErr != nil {
return nil, s.cacheErr
}

Signed-off-by: Justin Chadwell <me@jedevc.com>
@jedevc jedevc requested a review from tonistiigi August 26, 2022 10:38
@tonistiigi tonistiigi merged commit 611137a into moby:master Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants