-
Notifications
You must be signed in to change notification settings - Fork 42
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
Feat: Add docker image override for connectors in Cloud #420
base: main
Are you sure you want to change the base?
Conversation
…er-image-for-connectors
📝 Walkthrough📝 WalkthroughWalkthroughThis pull request introduces enhancements to Airbyte's API utility module, focusing on Docker image override management for connectors. The changes include a new Changes
Sequence DiagramsequenceDiagram
participant User
participant APIUtil
participant ConfigAPI
User->>APIUtil: get_connector_image_override()
APIUtil->>ConfigAPI: Request image override
ConfigAPI-->>APIUtil: Return override details
APIUtil-->>User: Return DockerImageOverride or None
User->>APIUtil: set_actor_override()
APIUtil->>ConfigAPI: Send override configuration
ConfigAPI-->>APIUtil: Confirm override set
Possibly related PRs
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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: 4
🧹 Outside diff range and nitpick comments (4)
airbyte/_util/api_util.py (2)
20-20
: Consider importingLiteral
fromtyping
instead oftyping_extensions
Should we import
Literal
directly from thetyping
module since it's available in Python 3.8+? This could help reduce external dependencies. Wdyt?🧰 Tools
🪛 Ruff (0.8.0)
20-20: Import from
typing
instead:Literal
Import from
typing
(UP035)
776-776
: Add issue links to TODO commentsCould we add issue links to the TODO comments to provide more context and facilitate tracking these tasks? Wdyt?
Also applies to: 780-780, 782-782, 822-822
🧰 Tools
🪛 Ruff (0.8.0)
776-776: Missing issue link on the line following this TODO
(TD003)
airbyte/cloud/workspaces.py (2)
17-17
: Unused import ofSyncResult
It seems that
SyncResult
is imported but not used in this file. Should we remove the unused import to keep the code clean? Wdyt?🧰 Tools
🪛 Ruff (0.8.0)
17-17:
airbyte.cloud.sync_results.SyncResult
imported but unusedRemove unused import:
airbyte.cloud.sync_results.SyncResult
(F401)
25-25
: MoveDestination
import outside ofTYPE_CHECKING
blockSince
Destination
is used at runtime and not just for type hinting, should we move its import out of theTYPE_CHECKING
block to avoid potential import errors? Wdyt?🧰 Tools
🪛 Ruff (0.8.0)
25-25: Move import
airbyte.destinations.base.Destination
out of type-checking block. Import is used for more than type hinting.Move out of type-checking block
(TC004)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
airbyte/_util/api_util.py
(7 hunks)airbyte/cloud/connections.py
(3 hunks)airbyte/cloud/workspaces.py
(2 hunks)
🧰 Additional context used
🪛 Ruff (0.8.0)
airbyte/cloud/workspaces.py
17-17: airbyte.cloud.sync_results.SyncResult
imported but unused
Remove unused import: airbyte.cloud.sync_results.SyncResult
(F401)
25-25: Move import airbyte.destinations.base.Destination
out of type-checking block. Import is used for more than type hinting.
Move out of type-checking block
(TC004)
airbyte/cloud/connections.py
93-93: Redefinition of unused source
from line 81
(F811)
124-124: Redefinition of unused destination
from line 112
(F811)
airbyte/_util/api_util.py
20-20: Import from typing
instead: Literal
Import from typing
(UP035)
776-776: Missing issue link on the line following this TODO
(TD003)
780-780: Missing issue link on the line following this TODO
(TD003)
782-782: Missing issue link on the line following this TODO
(TD003)
822-822: Missing issue link on the line following this TODO
(TD003)
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: 1
🧹 Outside diff range and nitpick comments (2)
tests/integration_tests/cloud/test_cloud_api_util.py (1)
249-268
: Consider enhancing the test once check_connector is implemented.The test structure looks good, but it might need additional assertions and test cases once the
check_connector
function is fully implemented. Would you like me to help draft additional test cases when the implementation is ready?airbyte/_util/api_util.py (1)
784-828
: Consider tracking TODOs with GitHub issues.The implementation looks good, but there are several TODOs that should be tracked:
- Line 805: Fix the config_key
- Line 808: Implement get_actor_definition call
- Line 810: Determine user ID or alternative origin type
Would you like me to help create GitHub issues for tracking these tasks?
🧰 Tools
🪛 Ruff (0.8.0)
805-805: Missing issue link on the line following this TODO
(TD003)
808-808: Missing issue link on the line following this TODO
(TD003)
810-810: Missing issue link on the line following this TODO
(TD003)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
airbyte/_util/api_util.py
(9 hunks)tests/integration_tests/cloud/test_cloud_api_util.py
(2 hunks)
🧰 Additional context used
🪛 Ruff (0.8.0)
airbyte/_util/api_util.py
805-805: Missing issue link on the line following this TODO
(TD003)
808-808: Missing issue link on the line following this TODO
(TD003)
810-810: Missing issue link on the line following this TODO
(TD003)
832-832: Unused function argument: actor_id
(ARG001)
833-833: Unused function argument: connector_type
(ARG001)
845-845: Local variable bearer_token
is assigned to but never used
Remove assignment to unused variable bearer_token
(F841)
850-850: Undefined name source_id
(F821)
850-850: Undefined name api_key
(F821)
882-882: Missing issue link on the line following this TODO
(TD003)
🔇 Additional comments (6)
tests/integration_tests/cloud/test_cloud_api_util.py (1)
235-246
: LGTM! The test looks good.
The test properly validates the token retrieval and handles exceptions appropriately.
airbyte/_util/api_util.py (5)
49-61
: LGTM! Well-documented constants.
The API root URLs are clearly defined with helpful documentation links.
744-773
: LGTM! The implementation looks secure and robust.
The function properly handles authentication and uses SecretString for sensitive data.
776-781
: LGTM! Clean and simple dataclass definition.
The dataclass is well-structured with appropriate type hints.
877-880
:
Fix the Content-Type header value.
The Content-Type header value should be "application/json" instead of "application".
headers: dict[str, Any] = {
- "Content-Type": "application",
+ "Content-Type": "application/json",
"Authorization": SecretString(f"Bearer {bearer_token}"),
}
Likely invalid or redundant comment.
881-889
: Consider using GET for retrieving configurations.
The function uses POST for listing configurations. While this might be intentional based on the API design, typically GET is used for retrieving data. Could you confirm if this aligns with the API documentation? Wdyt?
🧰 Tools
🪛 Ruff (0.8.0)
882-882: Missing issue link on the line following this TODO
(TD003)
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: 3
🧹 Outside diff range and nitpick comments (2)
tests/integration_tests/cloud/test_cloud_api_util.py (1)
236-247
: Consider enhancing test coverageThe test verifies basic token retrieval, but we could make it more robust. Would you like to add assertions for:
- Token format (should be a non-empty string)
- Error cases (invalid credentials)
- Token expiration handling
wdyt?airbyte/_util/api_util.py (1)
776-833
: Enhance function documentation and type hintsThe implementation looks good, but a few suggestions:
- Add return value documentation in the docstring
- Consider using a TypedDict or dataclass for the response structure instead of tuple
- Add examples in the docstring
wdyt?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
airbyte/_util/api_util.py
(9 hunks)tests/integration_tests/cloud/test_cloud_api_util.py
(2 hunks)
🧰 Additional context used
🪛 Ruff (0.8.0)
airbyte/_util/api_util.py
870-870: Missing issue link on the line following this TODO
(TD003)
873-873: Missing issue link on the line following this TODO
(TD003)
875-875: Missing issue link on the line following this TODO
(TD003)
923-923: Missing issue link on the line following this TODO
(TD003)
🔇 Additional comments (2)
airbyte/_util/api_util.py (2)
835-893
:
Address TODOs and security considerations
Several items need attention:
- The TODOs need to be addressed with proper implementation:
- Line 870: Fix config_key
- Line 873: Implement get_actor_definition
- Line 875: Handle user ID or origin type
- The Authorization header contains a bearer token wrapped in SecretString, but it's converted to string in the f-string, potentially exposing it in logs
wdyt?
🧰 Tools
🪛 Ruff (0.8.0)
870-870: Missing issue link on the line following this TODO
(TD003)
873-873: Missing issue link on the line following this TODO
(TD003)
875-875: Missing issue link on the line following this TODO
(TD003)
895-956
:
Fix API request issues and improve error handling
Several issues need attention:
- The Content-Type header value is incorrect:
headers: dict[str, Any] = {
- "Content-Type": "application",
+ "Content-Type": "application/json",
"Authorization": SecretString(f"Bearer {bearer_token}"),
}
- Using POST for a read operation seems unusual. Should we consider using GET? wdyt?
- The TODO for config_key needs to be addressed
- Consider adding pagination handling for the list of overrides
Likely invalid or redundant comment.
🧰 Tools
🪛 Ruff (0.8.0)
923-923: Missing issue link on the line following this TODO
(TD003)
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
🧹 Outside diff range and nitpick comments (1)
tests/integration_tests/cloud/test_cloud_api_util.py (1)
240-261
: Consider enhancing token validation test casesThe current test validates basic token retrieval, but we could make it more robust. What do you think about adding:
- Token format validation (JWT structure)
- Negative test cases (invalid credentials)
- Timeout handling for API calls
wdyt?@pytest.mark.parametrize( "client_id, client_secret, api_root, expected_exception", [ (airbyte_cloud_client_id, airbyte_cloud_client_secret, CLOUD_API_ROOT, None), ("invalid_id", "invalid_secret", CLOUD_API_ROOT, AirbyteError), # Add more test cases ], )
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
tests/integration_tests/cloud/test_cloud_api_util.py
(2 hunks)
🔇 Additional comments (2)
tests/integration_tests/cloud/test_cloud_api_util.py (2)
263-289
: Enhance error handling assertions
Building upon the previous feedback about test coverage, I noticed we're not asserting the content of error_message
. Since we're capturing it in the response, should we add assertions to validate error scenarios? For example:
- Assert specific error messages for invalid connector IDs
- Validate error format and content
wdyt?
291-310
: 🛠️ Refactor suggestion
Consider improving test isolation
The test uses a hardcoded actor_id which could cause issues. What if we:
- Create a temporary connector for testing
- Add proper teardown to clean up test data
- Use pytest fixtures for test data setup
wdyt?
Example approach:
@pytest.fixture
def test_connector():
# Setup: Create temporary connector
connector = create_test_connector()
yield connector
# Teardown: Clean up
delete_test_connector(connector.id)
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
🧹 Outside diff range and nitpick comments (1)
airbyte/_util/api_util.py (1)
874-880
: Consider linking TODOs to GitHub issuesThere are several TODO comments without corresponding issue links. Would you like me to help create GitHub issues for tracking these tasks?
🧰 Tools
🪛 Ruff (0.8.0)
874-874: Missing issue link on the line following this TODO
(TD003)
877-877: Missing issue link on the line following this TODO
(TD003)
879-879: Missing issue link on the line following this TODO
(TD003)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
airbyte/_util/api_util.py
(9 hunks)tests/integration_tests/cloud/test_cloud_api_util.py
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- tests/integration_tests/cloud/test_cloud_api_util.py
🧰 Additional context used
🪛 Ruff (0.8.0)
airbyte/_util/api_util.py
874-874: Missing issue link on the line following this TODO
(TD003)
877-877: Missing issue link on the line following this TODO
(TD003)
879-879: Missing issue link on the line following this TODO
(TD003)
927-927: Missing issue link on the line following this TODO
(TD003)
🔇 Additional comments (5)
airbyte/_util/api_util.py (5)
49-61
: LGTM! Well-documented API constants.
The API root constants are well-defined with comprehensive docstrings and helpful documentation links.
756-759
: Consider updating the Content-Type header
The Content-Type header should be "application/json" for JSON payloads. Wdyt?
headers: dict[str, str] = {
- "content-type": "application/json",
+ "Content-Type": "application/json",
"accept": "application/json",
}
929-934
: Consider using GET request for listing configurations
HTTP GET is more appropriate for retrieving data. The current implementation uses POST with a request body, which some clients might ignore. Should we change this to use query parameters with a GET request? Wdyt?
888-896
: LGTM! Comprehensive error handling.
The error handling is thorough and consistent, providing good context in error messages.
Also applies to: 935-943
922-925
:
Fix Content-Type header value
The Content-Type header value should be "application/json". Wdyt?
headers: dict[str, Any] = {
- "Content-Type": "application",
+ "Content-Type": "application/json",
"Authorization": SecretString(f"Bearer {bearer_token}"),
}
Likely invalid or redundant comment.
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: 2
🧹 Outside diff range and nitpick comments (4)
tests/integration_tests/cloud/test_cloud_api_util.py (2)
247-260
: Enhance token validation in the testThe test verifies that the token is not None, but we could make it more robust. Consider:
- Adding assertions to verify the token format (e.g., JWT structure)
- Testing with invalid credentials to verify error handling
- Adding a timeout parameter to prevent hanging on network issues
wdyt?
Line range hint
824-826
: Remove debug print statementsThese debug print statements should be removed before merging:
print(f"URL: {prepared.url}") print(f"Headers: {prepared.headers}") print(f"Body: {prepared.body}")Consider replacing them with proper logging if the information is valuable for debugging.
🧰 Tools
🪛 Ruff (0.8.2)
18-18:
airbyte._util.api_util.CLOUD_CONFIG_API_ROOT
imported but unusedRemove unused import:
airbyte._util.api_util.CLOUD_CONFIG_API_ROOT
(F401)
airbyte/_util/api_util.py (2)
837-845
: Improve error handling and remove debug TODOsThe error handling includes debug information that should be cleaned up:
- Remove the "TODO: Remove extra debug prints" comment
- Consider structuring the error context more cleanly
- Add proper logging instead of debug prints
wdyt?🧰 Tools
🪛 Ruff (0.8.2)
837-837: Missing issue link on the line following this TODO
(TD003)
988-992
: Document multiple overrides limitationThe function raises NotImplementedError for multiple overrides. Consider:
- Adding this limitation to the function's docstring
- Creating a tracking issue for supporting multiple overrides
- Specifying which override would be preferred when support is added (e.g., most recent, workspace level over actor level)
wdyt?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
airbyte/_util/api_util.py
(9 hunks)tests/integration_tests/cloud/test_cloud_api_util.py
(2 hunks)
🧰 Additional context used
🪛 Ruff (0.8.2)
tests/integration_tests/cloud/test_cloud_api_util.py
18-18: airbyte._util.api_util.CLOUD_CONFIG_API_ROOT
imported but unused
Remove unused import: airbyte._util.api_util.CLOUD_CONFIG_API_ROOT
(F401)
airbyte/_util/api_util.py
837-837: Missing issue link on the line following this TODO
(TD003)
900-900: Missing issue link on the line following this TODO
(TD003)
903-903: Missing issue link on the line following this TODO
(TD003)
905-905: Missing issue link on the line following this TODO
(TD003)
956-956: Missing issue link on the line following this TODO
(TD003)
🔇 Additional comments (2)
tests/integration_tests/cloud/test_cloud_api_util.py (1)
241-269
: Consider expanding test coverage with additional test cases
The parameterized test currently has only one active test case. Would you consider adding:
- A test case for destination connectors (uncomment and update the commented test case)
- A test case for invalid connector IDs to verify error handling
- A test case for expired/invalid credentials
wdyt?
airbyte/_util/api_util.py (1)
949-954
:
Fix HTTP headers and request method
Several issues with the request headers:
- Content-Type should be "application/json" instead of "application"
- Setting headers to None is unusual, consider removing these lines:
- "Connection": None,
- "User-Agent": None,
- Consider using GET method without a request body as per HTTP standards
wdyt?
Likely invalid or redundant comment.
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
♻️ Duplicate comments (1)
airbyte/_util/api_util.py (1)
771-775
:⚠️ Potential issueInclude
grant_type
parameter in OAuth 2.0 token requestIn the
get_bearer_token
function, should we include thegrant_type
parameter set to'client_credentials'
in the request body to comply with the OAuth 2.0 specification? Wdyt?
🧹 Nitpick comments (6)
airbyte/cloud/connectors.py (2)
39-45
: Update__repr__
method to reflect the correct class nameIn the
__repr__
method ofCheckResult
, the class name is displayed asCloudCheckResult
, but the actual class name isCheckResult
. Should we update the string to match the class name? Wdyt?
103-104
: Consider raising a more specific exception for check failuresCurrently, we're raising a
ValueError
when the check fails. Would it be better to raise a more specific exception, perhaps a custom exception likeAirbyteCheckError
, to provide clearer context? Wdyt?airbyte/_util/api_util.py (4)
894-894
: Add issue link to TODO comment on line 894There's a
TODO
comment on line 894 without an associated issue link. Could we add an issue link to track this task? Wdyt?🧰 Tools
🪛 Ruff (0.8.2)
894-894: Missing issue link on the line following this TODO
(TD003)
950-950
: Add issue link to TODO comment on line 950The
TODO
comment on line 950 is missing an issue link. Adding one would help in managing pending tasks. Wdyt?🧰 Tools
🪛 Ruff (0.8.2)
950-950: Missing issue link on the line following this TODO
(TD003)
953-953
: Add issue link to TODO comment on line 953Line 953 contains a
TODO
comment without an issue link. Should we include an issue link for better tracking? Wdyt?🧰 Tools
🪛 Ruff (0.8.2)
953-953: Missing issue link on the line following this TODO
(TD003)
955-955
: Add issue link to TODO comment on line 955The
TODO
comment on line 955 lacks an associated issue link. Adding one could improve task management. Wdyt?🧰 Tools
🪛 Ruff (0.8.2)
955-955: Missing issue link on the line following this TODO
(TD003)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
airbyte/_util/api_util.py
(9 hunks)airbyte/cloud/connectors.py
(2 hunks)tests/integration_tests/cloud/test_cloud_api_util.py
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- tests/integration_tests/cloud/test_cloud_api_util.py
🧰 Additional context used
🪛 Ruff (0.8.2)
airbyte/_util/api_util.py
894-894: Missing issue link on the line following this TODO
(TD003)
950-950: Missing issue link on the line following this TODO
(TD003)
953-953: Missing issue link on the line following this TODO
(TD003)
955-955: Missing issue link on the line following this TODO
(TD003)
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: 1
🧹 Nitpick comments (3)
airbyte/_util/api_util.py (3)
890-893
: Confirm the correctness of 'config_key' and resolve TODOThe
config_key
is currently set to"docker_image"
with a TODO comment to fix it. Should we verify if"docker_image"
is the correct key or update it accordingly? This might prevent potential issues when making the API request. Wdyt?🧰 Tools
🪛 Ruff (0.8.2)
892-892: Missing issue link on the line following this TODO
(TD003)
911-916
: Consider adding error handling for missing keys in 'entry'When constructing the
overrides
list, the code assumes that eachentry
inscoped_configurations
contains the keys"value"
and"scope_type"
. Would it be beneficial to add error handling or validation to ensure these keys exist in eachentry
, preventing possibleKeyError
exceptions? Wdyt?
918-924
: Implement support for multiple overrides or clarify the limitationCurrently, if multiple overrides are found (
len(overrides) > 1
), aNotImplementedError
is raised stating that this is not yet supported. Should we consider implementing support for multiple overrides or provide more detailed guidance on this limitation to inform users? Wdyt?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
airbyte/_util/api_util.py
(2 hunks)
🧰 Additional context used
🪛 Ruff (0.8.2)
airbyte/_util/api_util.py
892-892: Missing issue link on the line following this TODO
(TD003)
948-948: Missing issue link on the line following this TODO
(TD003)
951-951: Missing issue link on the line following this TODO
(TD003)
953-953: Missing issue link on the line following this TODO
(TD003)
🔇 Additional comments (3)
airbyte/_util/api_util.py (3)
17-17
: Importing 'dataclass' is appropriate
Importing dataclass
from the dataclasses
module is necessary for defining the DockerImageOverride
dataclass below.
864-870
: 'DockerImageOverride' dataclass is well-defined
The DockerImageOverride
dataclass appropriately encapsulates the docker image override details, including the docker_image_override
and override_level
fields.
948-949
: Address TODO comments and placeholders
There are several TODO comments and placeholder values that may need attention:
- Line 948:
"config_key": "docker_image", # TODO: Fix this.
- Line 951:
"resource_id": "", # TODO: Need to call something like get_actor_definition
- Line 953:
"origin": "", # TODO: Need to get user ID somehow or use another origin type
Would it be helpful to resolve these TODOs or add issue links to track them for future implementation? I'm happy to assist if needed. Wdyt?
Also applies to: 951-955
🧰 Tools
🪛 Ruff (0.8.2)
948-948: Missing issue link on the line following this TODO
(TD003)
/format-fix |
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: 1
🧹 Nitpick comments (1)
airbyte/_util/api_util.py (1)
892-909
: Consider enhancing error handling and TODO tracking.A few suggestions to improve this section:
- The TODO comment needs tracking. Would you like me to create a GitHub issue for this?
- Consider adding type hints for the json_result dictionary to improve type safety.
- The error message could be more descriptive by including the actual response content.
Here's a suggested improvement:
json_result = _make_config_api_request( path="/scoped_configuration/list", json={ - "config_key": "docker_image", # TODO: Fix this. + "config_key": "docker_image", # TODO(#issue): Update config_key based on API requirements }, api_root=api_root, client_id=client_id, client_secret=client_secret, ) try: scoped_configurations = json_result["scopedConfigurations"] except KeyError as ex: raise AirbyteError( message="Could not find 'scoped_configurations' in response.", context={ "workspace_id": workspace_id, "actor_id": actor_id, "actor_type": actor_type, "response_keys": list(json_result.keys()), + "response_content": json_result, # Add actual response for better debugging }, ) from exwdyt?
🧰 Tools
🪛 Ruff (0.8.2)
892-892: Missing issue link on the line following this TODO
(TD003)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
airbyte/_util/api_util.py
(2 hunks)
🧰 Additional context used
🪛 Ruff (0.8.2)
airbyte/_util/api_util.py
892-892: Missing issue link on the line following this TODO
(TD003)
948-948: Missing issue link on the line following this TODO
(TD003)
951-951: Missing issue link on the line following this TODO
(TD003)
953-953: Missing issue link on the line following this TODO
(TD003)
🔇 Additional comments (2)
airbyte/_util/api_util.py (2)
864-870
: LGTM! Well-structured dataclass.
The DockerImageOverride
dataclass is clean, well-documented, and follows best practices with appropriate type hints.
872-925
: LGTM! Robust implementation with good error handling.
The function is well-structured with comprehensive error handling and clear documentation.
🧰 Tools
🪛 Ruff (0.8.2)
892-892: Missing issue link on the line following this TODO
(TD003)
"value": override.docker_image_override, | ||
"config_key": "docker_image", # TODO: Fix this. | ||
"scope_id": actor_id, | ||
"scope_type": actor_type, | ||
"resource_id": "", # TODO: Need to call something like get_actor_definition | ||
"resource_type": "ACTOR_DEFINITION", | ||
"origin": "", # TODO: Need to get user ID somehow or use another origin type | ||
"origin_type": "USER", |
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.
These are placeholders and probably wrong.
For instance, "config_key": "docker_image"
is psuedocode.
This PR aims to add capability of overriding the docker image used by a connector.
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Bug Fixes
Tests