Content-Length: 452317 | pFad | http://github.com/apache/airflow/pull/50868

80 Bumping pinecone sdk to 7.0.0 to improve podspec handling by amoghrajesh · Pull Request #50868 · apache/airflow · GitHub
Skip to content

Bumping pinecone sdk to 7.0.0 to improve podspec handling #50868

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

Merged
merged 5 commits into from
May 21, 2025

Conversation

amoghrajesh
Copy link
Contributor

Due to pinecone bump to 7.0.0 as in https://github.com/apache/airflow/actions/runs/15151908599/job/42599727921, the argument type has changed leading to failures like:

providers/pinecone/src/airflow/providers/pinecone/hooks/pinecone.py:206: error:
Argument "pod_type" to "PodSpec" has incompatible type "Optional[str]"; expected
"Union[PodType, str]"  [arg-type]
                pod_type=pod_type,
                         ^~~~~~~~
Found 1 error in 1 file (checked 3787 source files)

Removing Optional[str] and making it str with a default. Also adding type[ignore]


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@amoghrajesh amoghrajesh added the backport-to-v3-0-test Mark PR with this label to backport to v3-0-test branch label May 21, 2025
@amoghrajesh amoghrajesh self-assigned this May 21, 2025
@amoghrajesh
Copy link
Contributor Author

@uranusjr @gopidesupavan @eladkal tried handling it better. LMK what you think

Copy link
Contributor

@eladkal eladkal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@amoghrajesh
Copy link
Contributor Author

@eladkal should i bump the pinecone provider to 7.0.0 and up?

@eladkal
Copy link
Contributor

eladkal commented May 21, 2025

@eladkal should i bump the pinecone provider to 7.0.0 and up?

This is a bug fix i don't think anything needs to be bumped.
pinecone provider latest release is 2.3 why 7?

@eladkal
Copy link
Contributor

eladkal commented May 21, 2025

Ah you are referring to the pinecone sdk.
If the fix isn't backward compatible then we should bump the min version of the sdk

@amoghrajesh
Copy link
Contributor Author

Yeah doesn't seem that it is. They do the same in their code:

        object.__setattr__(
            self, "pod_type", pod_type.value if isinstance(pod_type, PodType) else str(pod_type)
        )

Let me bump it

@amoghrajesh
Copy link
Contributor Author

@eladkal bumped it. Looks ok?

@eladkal
Copy link
Contributor

eladkal commented May 21, 2025

Yes, lets please update the commit message to notify about the version bump. The mypy issue is secondary.

@amoghrajesh amoghrajesh changed the title Fixing mypy checks on pinecone provider Bumping pinecone sdk to 7.0.0 to improve podspec handling May 21, 2025
@amoghrajesh amoghrajesh merged commit 4af10c9 into apache:main May 21, 2025
64 checks passed
Copy link

Backport failed to create: v3-0-test. View the failure log Run details

Status Branch Result
v3-0-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 4af10c9 v3-0-test

This should apply the commit to the v3-0-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

@potiuk
Copy link
Member

potiuk commented May 21, 2025

Ideally we should not need to cherry-pick that one if it's just a mypy check.

@potiuk potiuk removed the backport-to-v3-0-test Mark PR with this label to backport to v3-0-test branch label May 21, 2025
@amoghrajesh
Copy link
Contributor Author

@potiuk its a bump to the pinecone version used. But shouldn't be cherry picked imo

@eladkal
Copy link
Contributor

eladkal commented May 21, 2025

We do need it in v3 branch for constraints generation

@potiuk
Copy link
Member

potiuk commented May 21, 2025

We do need it in v3 branch for constraints generation

Not any more after we split the providers to separate pyproject.toml files - it should only be (rarely) needed if the changes in dependencies are conflicting and in "preinstalled" dependencies like FAB. Generally we should only cherry-pick provider dependency changes if v3-0-test is broken without it.

@potiuk
Copy link
Member

potiuk commented May 21, 2025

Why? The pypi constraints are generally using released providers from PyPI -> if thos providers can be installed with 3.0.* airflow, all is fine.

@eladkal
Copy link
Contributor

eladkal commented May 21, 2025

Why? The pypi constraints are generally using released providers from PyPI -> if thos providers can be installed with 3.0.* airflow, all is fine.

But we could have a case that pypi backtrack and uses older versions which are under the lower limit. So there is a possibility that generating the constraints will work but it would produce unsupported versions.

@potiuk
Copy link
Member

potiuk commented May 21, 2025

But we could have a case that pypi backtrack and uses older versions which are under the lower limit. So there is a possibility that generating the constraints will work but it would produce unsupported versions.

Unlikely - but even if it does, it does not matter as we are not running provider tests in release branches. It's only a problem if the image cannot be built in 3.0-test due to conflicts

nailo2c pushed a commit to nailo2c/airflow that referenced this pull request May 21, 2025
* Fixing mypy checks on pinecone provider

* bump pinecone to 7.0.0
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.

6 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/apache/airflow/pull/50868

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy