Skip to content

Conversation

iand
Copy link
Contributor

@iand iand commented Mar 2, 2022

Prevents cache failures causing extraction to fail

@iand iand requested a review from frrist March 2, 2022 11:10
@codecov-commenter
Copy link

Codecov Report

Merging #885 (91db3b6) into master (be91d4d) will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master    #885   +/-   ##
======================================
  Coverage    31.2%   31.2%           
======================================
  Files          39      39           
  Lines        3865    3865           
======================================
  Hits         1209    1209           
  Misses       2510    2510           
  Partials      146     146           

Copy link
Member

@frrist frrist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This is ready to merge once comments are addressed.

@@ -1,54 +0,0 @@
# This file was generated with `make docker-files` and should not
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're probably aware - undo this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. make clean deletes this file so what is the expected pattern for building? Do I need to regerenate the dockerfiles and recommit every time?

@@ -1,42 +0,0 @@
# This file was generated with `make docker-files` and should not
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

}

if !value.(reflect.Value).Type().AssignableTo(o.Type()) {
return xerrors.Errorf("out parameter cannot be assigned cached value")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include the types in the error message

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

func (cas *CachingStateStore) tryAssign(value interface{}, out interface{}) error {
o := reflect.ValueOf(out).Elem()
if !o.CanSet() {
return xerrors.Errorf("out parameter cannot be set")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include type in error message

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@iand
Copy link
Contributor Author

iand commented Mar 8, 2022

@frrist restored dockerfiles

@frrist
Copy link
Member

frrist commented Mar 8, 2022

Looks good, my approval is sticky.

@iand iand merged commit 5c01667 into master Mar 8, 2022
@iand iand deleted the fix/cache-errors branch March 8, 2022 15:58
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.

3 participants