-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get retrieval pricing input should not error out on a deal state fetch #6679
Conversation
@@ -138,7 +138,8 @@ func (rpn *retrievalProviderNode) GetRetrievalPricingInput(ctx context.Context, | |||
for _, dealID := range storageDeals { | |||
ds, err := rpn.full.StateMarketStorageDeal(ctx, dealID, tsk) | |||
if err != nil { | |||
return resp, xerrors.Errorf("failed to look up deal %d on chain: err=%w", dealID, err) | |||
log.Warnf("failed to look up deal %d on chain: err=%w", dealID, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest that if attempting to fetch the state for all deals fails, we return the error (instead of just logging it) so it's clearer what the root cause is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed this. Thanks.
@aarshkshah1992 lint fails. |
@raulk Have addressed your review and lint is now green. |
Note that the CI test failure is a known flaky. |
Closes #6678.
We iterate over all storage deals for a payload to see if we have a verified storage deal with the required PieceCID to fetch the input for the retrieval pricing function. This PR introduces a fix so we don't error out in we fail to look up a deal state and just continue iterating over the other deals.