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

Introduce a plugin API to provide all thread local state, and deprecate stdio-specific methods (Cherry-pick of #15890) #15916

Merged
merged 1 commit into from
Jun 24, 2022

Conversation

stuhood
Copy link
Member

@stuhood stuhood commented Jun 24, 2022

As described in #15887: StreamingWorkunit plugins have never been able to set thread-local WorkunitStore state, but that apparently didn't matter until #11331 made it possible for the StreamingWorkunitContext file-fetching methods to encounter data which had not yet been fetched (and thus needed to create a workunit for the fetching).

This change updates and "deprecates" the existing stdio_thread_[gs]et_destination methods (although it doesn't have access to a decorator to do that), and introduces generic thread-local state methods which include all thread-local state required by engine APIs.

Fixes #15887.

[ci skip-build-wheels]

…te stdio-specific methods (pantsbuild#15890)

As described in pantsbuild#15887: `StreamingWorkunit` plugins have never been able to set thread-local `WorkunitStore` state, but that apparently didn't matter until pantsbuild#11331 made it possible for the `StreamingWorkunitContext` file-fetching methods to encounter data which had not yet been fetched (and thus needed to create a workunit for the fetching).

This change updates and "deprecates" the existing `stdio_thread_[gs]et_destination` methods (although it doesn't have access to a decorator to do that), and introduces generic thread-local state methods which include all thread-local state required by engine APIs.

Fixes pantsbuild#15887.

[ci skip-build-wheels]
@stuhood stuhood merged commit d7e7a1a into pantsbuild:2.13.x Jun 24, 2022
@stuhood stuhood deleted the cherry-pick-15890-to-2.13.x branch June 24, 2022 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants