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

Add back shade profile for shade removed in #12712 #12979

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

xiangfu0
Copy link
Contributor

@xiangfu0 xiangfu0 commented Apr 21, 2024

Per #12969, this PR add back the profiles removed in #12712 for backward compatibility for submodules:

Use profile default to control, can enable by adding flag -Pbuild-shaded-jar:

pinot-spi
pinot-common(default is enabled)
pinot-core

Use property to control profile enable, default enabled, allow disable by adding flag -DskipShade=true

pinot-jdbc-client
pinot-s3
pinot-kinesis

Usage:

  1. Enable the profile build-shaded-jar, default is true or false
mvn clean install -Pbin-dist -DskipTests -T1C  -pl pinot-spi -Pbuild-shaded-jar
  1. Skip shade for certain plugin submodules:
mvn clean install -Pbin-dist -DskipTests -T1C  -pl :pinot-jdbc-client -DskipShade=true

@xiangfu0 xiangfu0 added dependencies Pull requests that update a dependency file build labels Apr 21, 2024
@codecov-commenter
Copy link

codecov-commenter commented Apr 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.18%. Comparing base (59551e4) to head (5992270).
Report is 345 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #12979      +/-   ##
============================================
+ Coverage     61.75%   62.18%   +0.43%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2502      +66     
  Lines        133233   136503    +3270     
  Branches      20636    21128     +492     
============================================
+ Hits          82274    84882    +2608     
- Misses        44911    45349     +438     
- Partials       6048     6272     +224     
Flag Coverage Δ
custom-integration1 <0.01% <ø> (-0.01%) ⬇️
integration <0.01% <ø> (-0.01%) ⬇️
integration1 <0.01% <ø> (-0.01%) ⬇️
integration2 0.00% <ø> (ø)
java-11 62.13% <ø> (+0.42%) ⬆️
java-21 62.06% <ø> (+0.43%) ⬆️
skip-bytebuffers-false 62.16% <ø> (+0.41%) ⬆️
skip-bytebuffers-true 62.02% <ø> (+34.29%) ⬆️
temurin 62.18% <ø> (+0.43%) ⬆️
unittests 62.17% <ø> (+0.43%) ⬆️
unittests1 46.73% <ø> (-0.16%) ⬇️
unittests2 27.94% <ø> (+0.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xiangfu0
Copy link
Contributor Author

cc: @jasperjiaguo

@xiangfu0 xiangfu0 changed the title Add back profile for shade Add back shade profile for shade removed in #12712 Apr 22, 2024
@xiangfu0 xiangfu0 self-assigned this Apr 22, 2024
Comment on lines +93 to +95
<properties>
<shade.phase.prop>package</shade.phase.prop>
</properties>
Copy link
Contributor

@gortiz gortiz Apr 22, 2024

Choose a reason for hiding this comment

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

nit: Isn't that the default phase? IICU we don't need to provide the phase.

@gortiz
Copy link
Contributor

gortiz commented Apr 22, 2024

So... IICU:

  • Shading is enabled by default
  • Some projects disable it
  • In some projects we can tune whether it is enabled or not by using a property

Is that correct?

PS: I guess we can discuss this in another PR but... why do we need shade to be on by default? I think we should only shade drivers and some plugins and at least it should be pretty safe to only turn shade on in profile bin-dist.

@xiangfu0
Copy link
Contributor Author

It's disabled by default. Plugins modules are enabled by default.
We added this profile to enable shading for modules like pinot-spi, or disable plugin modules like pinot-s3.

Copy link
Contributor

@Jackie-Jiang Jackie-Jiang left a comment

Choose a reason for hiding this comment

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

Having per module behavior and using different key to skip shading can be very confusing. Since we are bringing back the old behavior, we can merge it for now to fix the immediate issue.
Ideally, we should categorize the modules into different levels, and put all configs into root pom and use level to control how many modules to shade

Copy link
Contributor

@jasperjiaguo jasperjiaguo left a comment

Choose a reason for hiding this comment

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

Thanks for the fix

@mcvsubbu mcvsubbu merged commit a5c728f into apache:master Apr 22, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants