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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6771 pricefeed errors #6776

Merged
merged 6 commits into from
Jan 12, 2023
Merged

6771 pricefeed errors #6776

merged 6 commits into from
Jan 12, 2023

Conversation

turadg
Copy link
Member

@turadg turadg commented Jan 11, 2023

closes: #6771

Description

When a PushPrice invitation executed, errors in the pushPrice call weren't caught or reported.

The reason is pushPrice was called as a floating promise. We have a way to lint floating promises but it's too slow for CI. Still this error should serve as a motivation to resolve them before the next release, to detect any other surprises.

Security Considerations

No new boundaries.

Documentation Considerations

Conforms better to expectation. Nothing new to document.

Testing Considerations

New tests.

@turadg turadg force-pushed the 6771-pricefeed-errors branch from 8b681f3 to ac4d9b4 Compare January 11, 2023 19:00
@turadg turadg requested review from dckc and Chris-Hibbert January 11, 2023 19:07
@turadg turadg marked this pull request as ready for review January 11, 2023 19:07
@turadg turadg force-pushed the 6771-pricefeed-errors branch from ac4d9b4 to c5275fd Compare January 11, 2023 19:10
@@ -112,6 +112,16 @@ export const makeOfferExecutor = ({
);
logger.info(id, 'seated');

// NB: the following four promises all resolve exactly when the seat exits.
Copy link
Member Author

Choose a reason for hiding this comment

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

@Chris-Hibbert is this true in general? @dckc has a counter example #6777 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

The way I read @dckc's comment, it was saying that if the seat doesn't exit, then various things don't work. That's consistent with my expectation that numWantsSatisfied(), getFinalAllocation(), and getPayouts() resolve at the same time that the exitSubscriber reports that it's done. The comment above seems to include getOfferResult(), which @erights pointed out often resolves at a different time.

@turadg turadg force-pushed the 6771-pricefeed-errors branch from c5275fd to 3ca9045 Compare January 11, 2023 23:28
/** @param {ZCFSeat} cSeat */
async cSeat => {
cSeat.exit();
await admin.pushPrice(result);
Copy link
Member Author

Choose a reason for hiding this comment

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

when this throws, getOfferResult() rejects

Copy link
Contributor

Choose a reason for hiding this comment

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

that seems right. (Sorry if I misled you previously.)

getOfferResult() is supposed to give you the return value of the offerHandler, so if it throws, getOfferResult() has nothing else to return. The exitSubscriber should still report that the seat has exited, and numWantsSatisfied should be 1.

Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

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

test coverage looks pretty good. yay!

@turadg turadg added the automerge:rebase Automatically rebase updates, then merge label Jan 12, 2023
@@ -127,7 +186,7 @@ test('admin price', async t => {
'priceAggregator',
);

// The purse has the invitation to get the makers ///////////
// The purse has the invitation to get the makers
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the reason you removed that apply to line 227 as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

Just cleanliness. Not worth another push.

@turadg turadg force-pushed the 6771-pricefeed-errors branch from 3ca9045 to 73f24e8 Compare January 12, 2023 17:07
@mergify mergify bot merged commit aa756a3 into master Jan 12, 2023
@mergify mergify bot deleted the 6771-pricefeed-errors branch January 12, 2023 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

apparent success in failed price aggregator submissions
3 participants