-
Notifications
You must be signed in to change notification settings - Fork 24
fix: When grouping streams, ensure stream is declarative before checking in the manifest #425
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
Conversation
/autofix
|
📝 WalkthroughWalkthroughThe modification enhances type checking in the Changes
Sequence Diagram(s)sequenceDiagram
participant GS as _group_streams
participant DS as DeclarativeStream
participant OS as OtherStream
GS->>GS: Evaluate declarative_stream type
alt Is DeclarativeStream
GS->>DS: Process with StateDelegatingStream logic
else Not DeclarativeStream
GS->>GS: Skip specialized state processing
end
Possibly related PRs
Suggested labels
Suggested reviewers
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (9)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
airbyte_cdk/sources/declarative/concurrent_declarative_source.py (1)
209-209
: Good type check to prevent KeyError, but suggest minor formatting adjustmentThe added check to verify if the stream is an instance of
DeclarativeStream
before accessing its properties in the manifest is a proper defensive programming approach. This prevents the KeyError mentioned in the PR description when processing non-declarative streams.The Ruff linter reports a formatting issue in the pipeline failure. Could we fix that by running
ruff format
on this file, wdyt?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
airbyte_cdk/sources/declarative/concurrent_declarative_source.py
(1 hunks)
🧰 Additional context used
🪛 GitHub Actions: Linters
airbyte_cdk/sources/declarative/concurrent_declarative_source.py
[error] 1-1: Ruff formatting check failed. 1 file would be reformatted. Run 'ruff format' to fix code style issues in this file.
⏰ Context from checks skipped due to timeout of 90000ms (9)
- GitHub Check: Check: 'source-pokeapi' (skip=false)
- GitHub Check: Check: 'source-amplitude' (skip=false)
- GitHub Check: Check: 'source-shopify' (skip=false)
- GitHub Check: Check: 'source-hardcoded-records' (skip=false)
- GitHub Check: Pytest (All, Python 3.11, Ubuntu)
- GitHub Check: Pytest (All, Python 3.10, Ubuntu)
- GitHub Check: SDM Docker Image Build
- GitHub Check: Pytest (Fast)
- GitHub Check: Analyze (python)
What
If a stream returned by
streams
is not declarative, we would get a key error as such:How
Checking if the stream is declarative before checking in the manifest
Summary by CodeRabbit