-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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][fn] Align WindowContext with BaseContext #23628
[fix][fn] Align WindowContext with BaseContext #23628
Conversation
@jiangpengcheng Please add the following content to your PR description and select a checkbox:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #23628 +/- ##
============================================
+ Coverage 73.57% 74.29% +0.72%
- Complexity 32624 34456 +1832
============================================
Files 1877 1944 +67
Lines 139502 147197 +7695
Branches 15299 16239 +940
============================================
+ Hits 102638 109366 +6728
- Misses 28908 29384 +476
- Partials 7956 8447 +491
Flags with carried forward coverage won't be shown. Click here to find out more.
|
...unctions/instance/src/main/java/org/apache/pulsar/functions/windowing/WindowContextImpl.java
Outdated
Show resolved
Hide resolved
/pulsarbot rerun-failure-checks |
@shibd @jiangpengcheng @Technoboy- This is a breaking change and shouldn't be cherry-picked. Existing compiled classes will have to be recompiled. This change breaks binary compatibility although source compatibility is retained. |
@jiangpengcheng Please respond. Since this is a breaking change, I think that we need a PIP for this so that we have properly documented a breaking change. There could also be ways to make the change in a way that it doesn't break binary compatibility. |
@lhotari sorry for the trouble, so now should I create a PIP for this one or:
|
@jiangpengcheng Makes sense. The need for the PIP is due to the change in a public interface. However creating a PIP isn't useful alone since in this case, it will require experimentation to find an optimal solution. An optimal solution would be one which doesn't introduce breaking changes in binary compatibility or source compatibility.
Most likely we need a slightly different solution than this PR. It's possible that the solution for preserving binary compatibility is simply one where methods don't get removed from the WindowContext interface and it's simply modified to extend |
Validating compatibility seems like a significant effort. What if this PR doesn’t need to be cherry-picked to older branches and is only merged into the master branch? Would creating a PIP and resubmitting the PR suffice? |
@jiangpengcheng It's not a significant effort. You simply have a function jar using one of the moved methods in WindowContext and have it compiled with a previous version of Pulsar. You then run this with the master branch version of Pulsar. The first step of this is to do this test manually. The required effort is around 10 to 20 minutes. |
@lhotari ok, I thought we need to add integration tests to the CI I just verified it with below steps:
|
@jiangpengcheng thanks for checking. It seems that my concerns about breaking binary compatibility don't apply. We don't need to revert this change. It would be useful to have a PIP to document that this change was made in the public interface. |
The reasons why this is binary compatible seems to be related to these points described in Java Language Specification about binary compatibility:
|
@lhotari many thx for the explain! I will create a PIP for. this change |
Fixes #23629
Main Issue: #xyz
PIP: #xyz
Motivation
Modifications
Verifying this change
Make sure that the change passes the CI checks.
This change is already covered by existing tests, such as (please describe tests).
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: jiangpengcheng#35