-
Notifications
You must be signed in to change notification settings - Fork 115
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
Don't replace the monitor set by a group when starting a new job #666
Don't replace the monitor set by a group when starting a new job #666
Conversation
23f484a
to
2e978fb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me. I obviously agree with the behavioral change in the JobManager
, as stated in #654 (comment). I have some minor comments regarding code style within the added test.
And I would be in favor of separating the version bump from the functional changes in terms of different commits, but I am not sure if there is a policy for that.
...me/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/jobs/JobTest.java
Outdated
Show resolved
Hide resolved
...me/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/jobs/JobTest.java
Outdated
Show resolved
Hide resolved
...me/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/jobs/JobTest.java
Outdated
Show resolved
Hide resolved
...me/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/jobs/JobTest.java
Outdated
Show resolved
Hide resolved
2e978fb
to
a055cfa
Compare
I'm not aware of one such policy but I'm 99% sure I have bumped the version in the same PR as the functional changes before. It makes sense to me since bumping the version is mandatory in this case :) |
There is no strict policy, but the recommendation is to make the change and the bump as 2 distinct commits in the same PR, so the functional part can be cherry-picked to older branches more easily if needed. But we usually won't reject a PR if the bump is included in the same commit as the code change. |
Add hints about providing 2 different commits in the PR when bumping versions. See eclipse-platform/eclipse.platform#666 (comment)
Add hints about providing 2 different commits in the PR when bumping versions. See eclipse-platform/eclipse.platform#666 (comment)
Thank you both for the hint, I'll take it into account from now on 👍 I created a PR to mention this in the documentation --> eclipse-platform/.github#151 |
Add hints about providing 2 different commits in the PR when bumping versions. See eclipse-platform/eclipse.platform#666 (comment)
a055cfa
to
eeda1d7
Compare
I had to bump another version so I split the commits anyway |
Looks like the feature version of |
eeda1d7
to
0273f91
Compare
- Only set the progress monitor of the Job if it hasn't one already. This makes sure that the progress monitor set via Job::setProgressGroup is not replaced with a new one and ergo when the group is canceled, all the monitors in that group are canceled too. - Add regression test: JobTest.testSetProgressGroup_progressGroupIsCanceled_monitorInJobIsCanceled() - Simplify private method JobManager::createMonitor(Job). Remove the annotation "@GuardedBy" in it. Fixes eclipse-platform#664
0273f91
to
bc44cdf
Compare
The commit message of the version bump commit is not correct. It does neither bump the core.tests.runtime bundle version (I guess that was already done by another commit on which this PR was rebased) nor the version of the feature bundle. I am not sure why the ToC tests (see #668) are failing again, as they succeeded in test runs this morning. There also seems to be some other configuration problem w.r.t. the changed jobs plug-in as the builds fail with validation errors:
The logs also show this, which I have not seen for the core.jobs plug-in in other builds yet:
|
bc44cdf
to
7096c22
Compare
* org.eclipse.core.jobs --> 3.15.100
7096c22
to
5b68124
Compare
Correct,
No idea why since my changes are rather simple, nothing I haven't done before. Let's see if it's a random failure, I just rebased. |
Great, checks now run successfully. |
Only set the progress monitor of the Job if it hasn't one already. This makes sure that the progress monitor set via
Job::setProgressGroup
is not replaced with a new one and ergo when the group is canceled, all the monitors in that group are canceled too.Add regression test:
JobTest.testSetProgressGroup_progressGroupIsCanceled_monitorInJobIsCanceled()
Simplify private method
JobManager::createMonitor(Job)
and remove the annotation@GuardedBy
in it.Fixes #664