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

misc cleanup #9661

Merged
merged 5 commits into from
Jul 8, 2024
Merged

misc cleanup #9661

merged 5 commits into from
Jul 8, 2024

Conversation

turadg
Copy link
Member

@turadg turadg commented Jul 7, 2024

incidental

Description

Some cleanups noticed in the course of #9659

Security Considerations

none

Scaling Considerations

none

Documentation Considerations

none

Testing Considerations

"Dependency Graph" test has been failing on the recent change to replay-membrane.js. Maybe that should be a Required test in the repo.

Upgrade Considerations

This changes Zoe but in a fully backwards and forward compatible way. I think it can get into master and reach chain whenever Zoe is next upgraded.

@turadg turadg requested review from erights and Chris-Hibbert July 7, 2024 15:36
Copy link

cloudflare-workers-and-pages bot commented Jul 7, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3c531f5
Status: ✅  Deploy successful!
Preview URL: https://85b02f87.agoric-sdk.pages.dev
Branch Preview URL: https://ta-zoe-misc.agoric-sdk.pages.dev

View logs

Copy link
Member

@erights erights left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Comment on lines 40 to 41
bundleCache = await makeNodeBundleCache(dest, options, loadModule, pid);
providedCaches.set(uniqueDest, bundleCache);
Copy link
Member

Choose a reason for hiding this comment

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

This looks like more than a cleanup, but rather, a genuine bug fix with potentially different (now correct) behavior. Looking at makeNodeBundleCache, I see it is declared async and so certainly returns a promise. The old code stored this promise into the providedCaches collection, which is almost certainly wrong. As the price of correcting this, the new code also waits a turn before storing it into the cache. Is this a possible race condition?

Afterwards, both old and new code returns a promise for the bundleCache, though the old code mistypes it. As long as the types pass, I'm not concerned about the bug fix to the corrected type. But what about the bug fix to what is stored in the collection?

I am also more than happy to see this bug corrected. I only raise this because the PR description sounds like this PR has no such significant behavioral change.

So, no change suggested to the code. But perhaps the PR description should discuss this possible behavioral change?

Copy link
Member Author

@turadg turadg Jul 8, 2024

Choose a reason for hiding this comment

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

Thanks for the careful review. I didn't consider the race condition. I suppose that's why it was storing promises. I've reverted that part of the change and just fixed the types.

// in heapVowE or also reflects a runtime deficiency. But this
// case it not used yet anyway. We disable it
// with at-ts-ignore rather than at-ts-expect-error because
// the dependency-graph tests complains that the latter is unused.
Copy link
Member

Choose a reason for hiding this comment

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

Answering a question from the PR description:

I think it is reasonable to make the dependency-graph tests required.

@@ -28,8 +28,6 @@ const { ownKeys } = Reflect;
* @returns {(ir: InstanceRecord) => InstanceState}
*/
export const makeInstanceRecordStorage = baggage => {
provide(baggage, 'instanceRecord', () => undefined);
Copy link
Member

Choose a reason for hiding this comment

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

Any idea why this was there? Likewise with the other pure deletions of unneeded baggage stuff?

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 leftover. Explained in the commit: 19407b8

@erights
Copy link
Member

erights commented Jul 7, 2024

I did a "rerun failed jobs" to clear a likely flake. We'll see what happens.

@turadg turadg added the automerge:rebase Automatically rebase updates, then merge label Jul 8, 2024
@mergify mergify bot merged commit 6581fd3 into master Jul 8, 2024
81 of 85 checks passed
@mergify mergify bot deleted the ta/zoe-misc branch July 8, 2024 01:58
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.

2 participants