Skip to content
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

fix(udf): add embedded-python-udf feature and fix dockerfile #15328

Merged
merged 7 commits into from
Feb 28, 2024

Conversation

wangrunji0408
Copy link
Contributor

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

This PR makes embedded-python-udf an optional feature. This feature is not enabled by default so that developers are not required to have Python 3.12 installed. To enable it, you can run ENABLE_PYTHON_UDF=1 ./risedev d or cargo build --features embedded-python-udf. This feature is enabled in production build.

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

@wangrunji0408 wangrunji0408 requested a review from a team as a code owner February 28, 2024 07:12
@wangrunji0408 wangrunji0408 changed the title feat(udf): add embedded-python-udf feature and fix dockerfile fix(udf): add embedded-python-udf feature and fix dockerfile Feb 28, 2024
@github-actions github-actions bot added type/fix Bug fix and removed type/feature labels Feb 28, 2024
Signed-off-by: Runji Wang <[email protected]>
@wangrunji0408 wangrunji0408 force-pushed the wrj/feature-embedded-python-udf branch from d0b6477 to 51ce3d9 Compare February 28, 2024 07:21
Copy link
Member

@fuyufjh fuyufjh left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
@BugenZhao
Copy link
Member

My concern is that off-by-default features could be fragile to maintain as most of the developers won't realize its existence. 😕 Fortunately, check on CI will run with all features. I hope this can enforce the functionality and quality.

cargo clippy --all-targets --all-features --locked -- -D warnings

@wangrunji0408 wangrunji0408 added this pull request to the merge queue Feb 28, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 28, 2024
@Li0k Li0k added this pull request to the merge queue Feb 28, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 28, 2024
@wangrunji0408 wangrunji0408 added this pull request to the merge queue Feb 28, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 28, 2024
@Li0k Li0k added this pull request to the merge queue Feb 28, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 28, 2024
@wangrunji0408 wangrunji0408 added this pull request to the merge queue Feb 28, 2024
Merged via the queue into main with commit ff02b76 Feb 28, 2024
34 of 35 checks passed
@wangrunji0408 wangrunji0408 deleted the wrj/feature-embedded-python-udf branch February 28, 2024 10:30
Copy link
Member

@xxchan xxchan left a comment

Choose a reason for hiding this comment

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

release.sh is not updated, so binary release won't contain it. 😄

@xxchan
Copy link
Member

xxchan commented Feb 29, 2024

Hmmm, but if we enable it for binary release, users without python3.12 will not be able to start RisingWave. 🤔

@wangrunji0408
Copy link
Contributor Author

Indeed... We should make it static linked.

@BugenZhao
Copy link
Member

BugenZhao commented Mar 1, 2024

Indeed... We should make it static linked.

Strong +1 for this. 🥺


Also I think it's okay to make it a default feature.

  • It's not a big deal that developers need to install a new build-time dependency.
  • If the developer is familiar with cargo and rust-analyzer, they can set --no-default-features to improve DX.
  • All existing build scripts work seamlessly.

@xxchan xxchan mentioned this pull request Mar 1, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/fix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants