-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix: remove stream_state from interpolation contexts #325
base: main
Are you sure you want to change the base?
fix: remove stream_state from interpolation contexts #325
Conversation
Co-Authored-By: [email protected] <[email protected]>
Co-Authored-By: [email protected] <[email protected]>
🤖 Devin AI EngineerOriginal prompt from [email protected]:
I'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: [email protected] <[email protected]>
Co-Authored-By: [email protected] <[email protected]>
Co-Authored-By: [email protected] <[email protected]>
Co-Authored-By: [email protected] <[email protected]>
) -> None: | ||
if config is None: | ||
config = {} | ||
kwargs = {"record": record, "stream_state": stream_state, "stream_slice": stream_slice} | ||
kwargs = { |
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.
Remove stream_state
from here as well
Co-Authored-By: [email protected] <[email protected]>
…_selector Co-Authored-By: [email protected] <[email protected]>
Devin is currently unreachable - the session may have died. |
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.
There are some fundamental problems with how this PR has been designed. Primarily, the issue is that Devin has either misinterpreted or been directed incorrectly to try to inject stream_interval
into every part of the codebase.
The main piece of context missing is that the stream_interval
object does not actually exist across all the different components at runtime because under the hood in jinja.py
, we alias stream_state
into stream_interval
and partition
. See this block
for alias, equivalent in _ALIASES.items(): | |
if alias in context: | |
# This is unexpected. We could ignore or log a warning, but failing loudly should result in fewer surprises | |
raise ValueError( | |
f"Found reserved keyword {alias} in interpolation context. This is unexpected and indicative of a bug in the CDK." | |
) | |
elif equivalent in context: | |
context[alias] = context[equivalent] |
jinja.py
won't receive the stream_state
object we need to alias.
What probably needs to happen is we walk back a lot of this refactor where we're replacing stream_state
with stream_interval
. But the error handling with custom error messages and the YAML schema changes should be fine.
Remove stream_state from interpolation contexts as it is not thread-safe.
Link to Devin run: https://app.devin.ai/sessions/5b6bba9b365143ef813af2e410691083
Requested by: [email protected]
Changes:
Fixes: airbytehq/airbyte-internal-issues#11591