Skip to content

Limit azure-cosmos<4.6.0 - #38175

Merged
eladkal merged 1 commit into
apache:mainfrom
eladkal:azure
Mar 15, 2024
Merged

eladkal merged 1 commit into
apache:mainfrom
eladkal:azure

Conversation

@eladkal

@eladkal eladkal commented Mar 15, 2024

Copy link
Copy Markdown
Contributor

azure-cosmos version 4.6.0 released today and it breaks mypy

airflow/providers/microsoft/azure/hooks/cosmos.py:228: error: Argument
"partition_key" to "create_container" of "DatabaseProxy" has incompatible type
"Optional[str]"; expected "PartitionKey"  [arg-type]
                    collection_name, partition_key=partition_key
                                                   ^~~~~~~~~~~~~
airflow/providers/microsoft/azure/hooks/cosmos.py:339: error: Argument
"partition_key" to "delete_item" of "ContainerProxy" has incompatible type
"Optional[str]"; expected
"Union[str, int, float, bool, Sequence[Union[str, int, float, bool, None]], Type[NonePartitionKeyValue]]"
 [arg-type]
                .delete_item(document_id, partition_key=partition_key)
                                                        ^~~~~~~~~~~~~
airflow/providers/microsoft/azure/hooks/cosmos.py:358: error: Argument
"partition_key" to "read_item" of "ContainerProxy" has incompatible type
"Optional[str]"; expected
"Union[str, int, float, bool, Sequence[Union[str, int, float, bool, None]], Type[NonePartitionKeyValue]]"
 [arg-type]
                    .read_item(document_id, partition_key=partition_key)
                                                          ^~~~~~~~~~~~~
Found 3 errors in 1 file (checked [122](https://github.com/apache/airflow/actions/runs/8291950812/job/22692722738?pr=38048#step:6:123)8 source files)
Error 1 returned

@eladkal eladkal changed the title Limit azure-cosmos Limit azure-cosmos<4.6.0 Mar 15, 2024
@eladkal
eladkal requested review from Taragolis and potiuk March 15, 2024 10:48
@ephraimbuddy ephraimbuddy added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Mar 18, 2024
@potiuk potiuk added this to the Airflow 2.8.4 milestone Mar 19, 2024
potiuk pushed a commit that referenced this pull request Mar 19, 2024
(cherry picked from commit 832571c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) provider:microsoft-azure Azure-related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants