You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "deepyaman (via GitHub)" <gi...@apache.org> on 2023/08/04 18:59:06 UTC
[GitHub] [flink] deepyaman opened a new pull request, #23141: [python] Remove PyFlink dependencies' upper bounds
deepyaman opened a new pull request, #23141:
URL: https://github.com/apache/flink/pull/23141
<!--
*Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
*Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
## Contribution Checklist
- Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
- Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
- Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
- Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Azure Pipelines CI to do that following [this guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
- Each pull request should address only one issue, not mix up code from multiple issues.
- Each commit in the pull request has a meaningful commit message (including the JIRA id)
- Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
**(The sections below can be removed for hotfixes of typos)**
-->
## What is the purpose of the change
*(For example: This pull request makes task deployment go through the blob server, rather than through RPC. That way we avoid re-transferring them on each deployment (during recovery).)*
## Brief change log
*(for example:)*
- *The TaskInfo is stored in the blob store on job creation time as a persistent artifact*
- *Deployments RPC transmits only the blob storage reference*
- *TaskManagers retrieve the TaskInfo from the blob cache*
## Verifying this change
Please make sure both new and modified tests in this PR follows the conventions defined in our code quality guide: https://flink.apache.org/contributing/code-style-and-quality-common.html#testing
*(Please pick either of the following options)*
This change is a trivial rework / code cleanup without any test coverage.
*(or)*
This change is already covered by existing tests, such as *(please describe tests)*.
*(or)*
This change added tests and can be verified as follows:
*(example:)*
- *Added integration tests for end-to-end deployment with large payloads (100MB)*
- *Extended integration test for recovery after master (JobManager) failure*
- *Added test that validates that TaskInfo is transferred only once across recoveries*
- *Manually verified the change by running a 4 node cluster with 2 JobManagers and 4 TaskManagers, a stateful streaming program, and killing one JobManager and two TaskManagers during the execution, verifying that recovery happens correctly.*
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (yes / no)
- The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / no)
- The serializers: (yes / no / don't know)
- The runtime per-record code paths (performance sensitive): (yes / no / don't know)
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)
- The S3 file system connector: (yes / no / don't know)
## Documentation
- Does this pull request introduce a new feature? (yes / no)
- If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] deepyaman commented on a diff in pull request #23141: [FLINK-32758][python] Remove PyFlink dependencies' upper bounds
Posted by "deepyaman (via GitHub)" <gi...@apache.org>.
deepyaman commented on code in PR #23141:
URL: https://github.com/apache/flink/pull/23141#discussion_r1303757617
##########
flink-python/dev/dev-requirements.txt:
##########
@@ -15,20 +15,20 @@
pip>=20.3
setuptools>=18.0
wheel
-apache-beam==2.43.0
-cython==0.29.24
+apache-beam>=2.43.0,<2.49.0
+cython>=0.29.24
Review Comment:
```suggestion
cython>=0.29.24,3
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] dianfu commented on pull request #23141: [FLINK-32758][python] Remove PyFlink dependencies' upper bounds
Posted by "dianfu (via GitHub)" <gi...@apache.org>.
dianfu commented on PR #23141:
URL: https://github.com/apache/flink/pull/23141#issuecomment-1691003379
@deepyaman All the tests passed after the changes of cython.
BTW, it seems that there is one minor problem for the latest update. It should be `cython>=0.29.24,<3` instead of `cython>=0.29.24,3`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] deepyaman commented on pull request #23141: [FLINK-32758][python] Remove PyFlink dependencies' upper bounds
Posted by "deepyaman (via GitHub)" <gi...@apache.org>.
deepyaman commented on PR #23141:
URL: https://github.com/apache/flink/pull/23141#issuecomment-1684033176
@flinkbot run azure
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] deepyaman commented on a diff in pull request #23141: [FLINK-32758][python] Remove PyFlink dependencies' upper bounds
Posted by "deepyaman (via GitHub)" <gi...@apache.org>.
deepyaman commented on code in PR #23141:
URL: https://github.com/apache/flink/pull/23141#discussion_r1295230147
##########
flink-python/dev/dev-requirements.txt:
##########
@@ -15,20 +15,20 @@
pip>=20.3
setuptools>=18.0
wheel
-apache-beam==2.43.0
-cython==0.29.24
+apache-beam>=2.43.0,<2.49.0
+cython>=0.29.24
py4j==0.10.9.7
python-dateutil>=2.8.0,<3
-cloudpickle==2.2.0
-avro-python3>=1.8.1,!=1.9.2,<1.10.0
-pandas>=1.3.0,<1.4.0
-pyarrow>=5.0.0,<9.0.0
+cloudpickle>=2.2.0
Review Comment:
Hi @HuangXingBo! Thank you for reviewing.
I tested it out, and, unfortunately, I can't resolve dependencies between Ibis and PyFlink (based on the loosened dependencies in this PR) if I pin `cloudpickle==2.2.0`. I didn't realize that there's only been one release since, but I confirmed that `cloudpickle==2.2.1` does indeed resolve.
All I see in [the changelog](https://github.com/cloudpipe/cloudpickle/blob/master/CHANGES.md) for 2.2.1 is fixing `NamedTuple` pickling; do you think it's possible to provide a more conservative range that would at least include 2.2.1? My guess is some other dependencies pinned `>=2.2.1` because they rely on `NamedTuple` pickling working (but I haven't verified).
Perhaps something like:
```suggestion
cloudpickle~=2.2.0
```
or even
```suggestion
cloudpickle~=2.2
```
depending on what you level of future compatibility you're worried about.
Personally, I think it would also be fine with leaving it uncapped, and users can always bound `cloudpickle` themselves if a breaking release comes out. Preferable to capping it too aggressively, where it requires another release for users to use newer versions. (I quite believe in the rationale in [a popular post on the topic](https://iscinumpy.dev/post/bound-version-constraints/), but in the end you know better how it applies to PyFlink.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] dianfu closed pull request #23141: [FLINK-32758][python] Remove PyFlink dependencies' upper bounds
Posted by "dianfu (via GitHub)" <gi...@apache.org>.
dianfu closed pull request #23141: [FLINK-32758][python] Remove PyFlink dependencies' upper bounds
URL: https://github.com/apache/flink/pull/23141
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] HuangXingBo commented on pull request #23141: [FLINK-32758][python] Remove PyFlink dependencies' upper bounds
Posted by "HuangXingBo (via GitHub)" <gi...@apache.org>.
HuangXingBo commented on PR #23141:
URL: https://github.com/apache/flink/pull/23141#issuecomment-1678397196
@flinkbot run azure
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] deepyaman commented on a diff in pull request #23141: [FLINK-32758][python] Remove PyFlink dependencies' upper bounds
Posted by "deepyaman (via GitHub)" <gi...@apache.org>.
deepyaman commented on code in PR #23141:
URL: https://github.com/apache/flink/pull/23141#discussion_r1298543188
##########
flink-python/dev/dev-requirements.txt:
##########
@@ -15,20 +15,20 @@
pip>=20.3
setuptools>=18.0
wheel
-apache-beam==2.43.0
-cython==0.29.24
+apache-beam>=2.43.0,<2.49.0
+cython>=0.29.24
py4j==0.10.9.7
python-dateutil>=2.8.0,<3
-cloudpickle==2.2.0
-avro-python3>=1.8.1,!=1.9.2,<1.10.0
-pandas>=1.3.0,<1.4.0
-pyarrow>=5.0.0,<9.0.0
+cloudpickle>=2.2.0
Review Comment:
@HuangXingBo Sounds good! I have bound `cloudpickle~=2.2.0` for now, as you suggest. :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] deepyaman commented on a diff in pull request #23141: [FLINK-32758][python] Remove PyFlink dependencies' upper bounds
Posted by "deepyaman (via GitHub)" <gi...@apache.org>.
deepyaman commented on code in PR #23141:
URL: https://github.com/apache/flink/pull/23141#discussion_r1303757967
##########
flink-python/pyproject.toml:
##########
@@ -18,12 +18,12 @@
[build-system]
# Minimum requirements for the build system to execute.
requires = [
- "packaging==20.5; platform_machine=='arm64'", # macos M1
+ "packaging>=20.5; platform_machine=='arm64'", # macos M1
"setuptools>=18.0",
"wheel",
- "apache-beam==2.43.0",
- "cython==0.29.24",
- "fastavro>=1.1.0,<1.4.8"
+ "apache-beam>=2.43.0,<2.49.0",
+ "cython>=0.29.24",
Review Comment:
```suggestion
"cython>=0.29.24,<3",
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot commented on pull request #23141: [python] Remove PyFlink dependencies' upper bounds
Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #23141:
URL: https://github.com/apache/flink/pull/23141#issuecomment-1666055186
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "118206bfb082af7903c5c0ec135d0f4ef9c6841e",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "118206bfb082af7903c5c0ec135d0f4ef9c6841e",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 118206bfb082af7903c5c0ec135d0f4ef9c6841e UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] dianfu commented on pull request #23141: [FLINK-32758][python] Remove PyFlink dependencies' upper bounds
Posted by "dianfu (via GitHub)" <gi...@apache.org>.
dianfu commented on PR #23141:
URL: https://github.com/apache/flink/pull/23141#issuecomment-1681506724
@flinkbot run azure
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] deepyaman commented on pull request #23141: [FLINK-32758][python] Remove PyFlink dependencies' upper bounds
Posted by "deepyaman (via GitHub)" <gi...@apache.org>.
deepyaman commented on PR #23141:
URL: https://github.com/apache/flink/pull/23141#issuecomment-1692105446
> BTW, it seems that there is one minor problem for the latest update. It should be `cython>=0.29.24,<3` instead of `cython>=0.29.24,3`
Sorry, made a typo in one place; fixed!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] deepyaman commented on a diff in pull request #23141: [FLINK-32758][python] Remove PyFlink dependencies' upper bounds
Posted by "deepyaman (via GitHub)" <gi...@apache.org>.
deepyaman commented on code in PR #23141:
URL: https://github.com/apache/flink/pull/23141#discussion_r1304628782
##########
flink-python/dev/dev-requirements.txt:
##########
@@ -15,20 +15,20 @@
pip>=20.3
setuptools>=18.0
wheel
-apache-beam==2.43.0
-cython==0.29.24
+apache-beam>=2.43.0,<2.49.0
+cython>=0.29.24,3
Review Comment:
```suggestion
cython>=0.29.24,<3
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] deepyaman commented on pull request #23141: [FLINK-32758][python] Remove PyFlink dependencies' upper bounds
Posted by "deepyaman (via GitHub)" <gi...@apache.org>.
deepyaman commented on PR #23141:
URL: https://github.com/apache/flink/pull/23141#issuecomment-1690955164
> @deepyaman Thanks a lot for the PR. Big +1 for this improvement. The PR LGTM overall.
>
> I found that the change of Cython may break the tests, see https://dev.azure.com/dianfu/Flink/_build/results?buildId=729&view=logs&j=fba17979-6d2e-591d-72f1-97cf42797c11&t=727942b6-6137-54f7-1ef9-e66e706ea068 (I have triggered nightly tests which will run more tests. Cython tests are skipped in the PR CI) for more details.
>
> It seems related to recently released cython 3.0.0. After changing `cython>=0.29.24` to `cython>=0.29.24,<3`, all the tests passed: https://dev.azure.com/dianfu/Flink/_build/results?buildId=733&view=logs&j=fba17979-6d2e-591d-72f1-97cf42797c11&t=727942b6-6137-54f7-1ef9-e66e706ea068
@dianfu Sounds great! Let me know if the nightly job raises any other issues. In the meantime, I've gone ahead and updated `cython>=0.29.24` to `cython>=0.29.24,<3` in this PR, too, as you found necessary.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] dianfu commented on pull request #23141: [FLINK-32758][python] Remove PyFlink dependencies' upper bounds
Posted by "dianfu (via GitHub)" <gi...@apache.org>.
dianfu commented on PR #23141:
URL: https://github.com/apache/flink/pull/23141#issuecomment-1690832931
@deepyaman Thanks a lot for the PR. Big +1 for this improvement. The PR LGTM overall.
I found that the change of Cython may break the tests, see https://dev.azure.com/dianfu/Flink/_build/results?buildId=729&view=logs&j=fba17979-6d2e-591d-72f1-97cf42797c11&t=727942b6-6137-54f7-1ef9-e66e706ea068 (I have triggered nightly tests which will run more tests. Cython tests are skipped in the PR CI) for more details.
It seems related to recently released cython 3.0.0. After changing `cython>=0.29.24` to `cython>=0.29.24,<3`, all the tests passed:
https://dev.azure.com/dianfu/Flink/_build/results?buildId=733&view=logs&j=fba17979-6d2e-591d-72f1-97cf42797c11&t=727942b6-6137-54f7-1ef9-e66e706ea068
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] HuangXingBo commented on a diff in pull request #23141: [FLINK-32758][python] Remove PyFlink dependencies' upper bounds
Posted by "HuangXingBo (via GitHub)" <gi...@apache.org>.
HuangXingBo commented on code in PR #23141:
URL: https://github.com/apache/flink/pull/23141#discussion_r1294158183
##########
flink-python/dev/dev-requirements.txt:
##########
@@ -15,20 +15,20 @@
pip>=20.3
setuptools>=18.0
wheel
-apache-beam==2.43.0
-cython==0.29.24
+apache-beam>=2.43.0,<2.49.0
+cython>=0.29.24
py4j==0.10.9.7
python-dateutil>=2.8.0,<3
-cloudpickle==2.2.0
-avro-python3>=1.8.1,!=1.9.2,<1.10.0
-pandas>=1.3.0,<1.4.0
-pyarrow>=5.0.0,<9.0.0
+cloudpickle>=2.2.0
Review Comment:
Currently, we use `2.2.0` of clouldpickle in `flink-python/lib` directory to compile pyflink job in client side and use the `cloudpicke` of pyflink in cluster. I'm a bit worried about the compatibility of cloudpickle in the future.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] HuangXingBo commented on a diff in pull request #23141: [FLINK-32758][python] Remove PyFlink dependencies' upper bounds
Posted by "HuangXingBo (via GitHub)" <gi...@apache.org>.
HuangXingBo commented on code in PR #23141:
URL: https://github.com/apache/flink/pull/23141#discussion_r1296599910
##########
flink-python/dev/dev-requirements.txt:
##########
@@ -15,20 +15,20 @@
pip>=20.3
setuptools>=18.0
wheel
-apache-beam==2.43.0
-cython==0.29.24
+apache-beam>=2.43.0,<2.49.0
+cython>=0.29.24
py4j==0.10.9.7
python-dateutil>=2.8.0,<3
-cloudpickle==2.2.0
-avro-python3>=1.8.1,!=1.9.2,<1.10.0
-pandas>=1.3.0,<1.4.0
-pyarrow>=5.0.0,<9.0.0
+cloudpickle>=2.2.0
Review Comment:
Thanks for the explanation. I agree that we should try not to limit the upper bound of python packages. I think it is a relatively safe way to limit `cloudpickle~=2.2.0`. In the future, whenever we upgrade the cloudpickle source package under `lib`, we may need to modify the corresponding python dependencies accordingly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] deepyaman commented on pull request #23141: [FLINK-32758][python] Remove PyFlink dependencies' upper bounds
Posted by "deepyaman (via GitHub)" <gi...@apache.org>.
deepyaman commented on PR #23141:
URL: https://github.com/apache/flink/pull/23141#issuecomment-1726225185
@dianfu @HuangXingBo Do you all have an estimated timeline for when an update PyFlink 1.17 (and possibly 1.18) will be available, now that this has been merged for a while, and the corresponding Jira is closed?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] dianfu commented on a diff in pull request #23141: [FLINK-32758][python] Remove PyFlink dependencies' upper bounds
Posted by "dianfu (via GitHub)" <gi...@apache.org>.
dianfu commented on code in PR #23141:
URL: https://github.com/apache/flink/pull/23141#discussion_r1303803252
##########
flink-python/dev/dev-requirements.txt:
##########
@@ -15,20 +15,20 @@
pip>=20.3
setuptools>=18.0
wheel
-apache-beam==2.43.0
-cython==0.29.24
+apache-beam>=2.43.0,<2.49.0
+cython>=0.29.24,3
Review Comment:
```suggestion
cython>=0.29.24,<3
```
##########
flink-python/dev/dev-requirements.txt:
##########
@@ -15,20 +15,20 @@
pip>=20.3
setuptools>=18.0
wheel
-apache-beam==2.43.0
-cython==0.29.24
+apache-beam>=2.43.0,<2.49.0
+cython>=0.29.24,3
Review Comment:
```suggestion
cython>=0.29.24,<3
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org