Skip to content

Async Upgrades#1024

Merged
elijahbenizzy merged 3 commits intomainfrom
async-updates
Jul 12, 2024
Merged

Async Upgrades#1024
elijahbenizzy merged 3 commits intomainfrom
async-updates

Conversation

@elijahbenizzy
Copy link
Contributor

@elijahbenizzy elijahbenizzy commented Jul 11, 2024

The test tests at the execute and not raw_execute() level, as that is more indicative of the contract.

Changes

How I tested this

Notes

Checklist

  • PR has an informative and human-readable title (this will be pulled into the release notes)
  • Changes are limited to a single goal (no scope creep)
  • Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future TODOs are captured in comments
  • Project documentation has been updated if adding/changing functionality.

@elijahbenizzy
Copy link
Contributor Author

Thanks to @rwr
for the bug finds!

This has been released (and verified) in 1.71.0rc1 -- we will be releasing as part of the next cut.

@elijahbenizzy elijahbenizzy requested a review from skrawcz July 11, 2024 21:13
@elijahbenizzy elijahbenizzy marked this pull request as ready for review July 11, 2024 23:04
Copy link
Contributor

@skrawcz skrawcz left a comment

Choose a reason for hiding this comment

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

just need minor changes...

See #1023. High-level:

1. We computed the set of nodes to calculate
2. In async we did not count overrides
3. The directly overridden nodes were not computed but their upstream
   dependencies *were*
4. This fixes that

The test tests at the execute and not raw_execute() level, as that is
more indicative of the contract.
See #1022. What was happening:
1. We were assuming the .result_builder variable was set
2. It was never, it's defunct
3. Thus we were checking that, and adding a result builder
4. This would result in a double one

This fixes it by:

1. Checking for any result builders in the adapters
2. If there is one, let the AsyncDriver interface handle it
3. Otherwise, pass in a DictResult()
This allows creating it in a non-async setting. You'll have to
initialize it later.

This was a request from a user who didn't want to convert their entire
stack to async (as driver construction was buried down). It's a very
reasonable power-user feature.
@elijahbenizzy elijahbenizzy merged commit d2f3c7d into main Jul 12, 2024
@elijahbenizzy elijahbenizzy deleted the async-updates branch July 12, 2024 19:13
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.

2 participants