Skip to content

Migrate AutomaticUpdateScheduler from IStartup to OSGi EventHandler#400

Merged
vogella merged 2 commits into
eclipse-equinox:masterfrom
HannesWell:update-scheduler-as-eventHandler
May 30, 2026
Merged

Migrate AutomaticUpdateScheduler from IStartup to OSGi EventHandler#400
vogella merged 2 commits into
eclipse-equinox:masterfrom
HannesWell:update-scheduler-as-eventHandler

Conversation

@HannesWell

Copy link
Copy Markdown
Member

... for the UIEvents.UILifeCycle.APP_STARTUP_COMPLETE event.

This is a less Eclipse specific approach and also prevents the user from disabling the start-up task.
The automatic search for updates can still be disabled.

Based on the work in eclipse-platform/eclipse.platform.ui#1362.

@github-actions

github-actions Bot commented Dec 9, 2023

Copy link
Copy Markdown

Test Results

   18 files  ±0     18 suites  ±0   26m 17s ⏱️ - 3m 28s
2 169 tests ±0  2 166 ✅ ±0  3 💤 ±0  0 ❌ ±0 
5 161 runs  ±0  5 152 ✅ ±0  9 💤 ±0  0 ❌ ±0 

Results for commit 39478e7. ± Comparison against base commit 5f7adc7.

♻️ This comment has been updated with latest results.


@Override
public void earlyStartup() {
public void handleEvent(Event event) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn't we check if automated updates are disabled before starting the job?

@iloveeclipse

Copy link
Copy Markdown
Member

With "Early startup" one could disable updates job. Now it is always started even if updates are not enabled. I think this is a regression.

@HannesWell HannesWell force-pushed the update-scheduler-as-eventHandler branch from 52b2783 to 613cd77 Compare December 9, 2023 14:17
@HannesWell

HannesWell commented Dec 9, 2023

Copy link
Copy Markdown
Member Author

With "Early startup" one could disable updates job. Now it is always started even if updates are not enabled. I think this is a regression.

There is a dedicated preference to control the automatic search for updates:
grafik

So yes now the job always runs, but the job still respects the preference so if you have disabled updates, it is basically a noop.

I can also refactor this to only run the job if the preference is enabled, but I'm not sure what's best in regard of IDE start-up speed. Check the preference before running the job or within the job and potentially exit early?
Of course starting a job has an overhead but so does checking a preference.

@HannesWell HannesWell force-pushed the update-scheduler-as-eventHandler branch from 613cd77 to b3215ef Compare January 19, 2024 17:57
@laeubi

laeubi commented Jun 16, 2024

Copy link
Copy Markdown
Member

@HannesWell @iloveeclipse should we further work on this or should we close this?

@HannesWell HannesWell force-pushed the update-scheduler-as-eventHandler branch 2 times, most recently from bfe3d8e to f5213b9 Compare October 12, 2024 11:27
@HannesWell

Copy link
Copy Markdown
Member Author

@HannesWell @iloveeclipse should we further work on this or should we close this?

I would still be in favor of having this and was waiting for the response of @iloveeclipse on my previous response:

I can also refactor this to only run the job if the preference is enabled, but I'm not sure what's best in regard of IDE start-up speed. Check the preference before running the job or within the job and potentially exit early?
Of course starting a job has an overhead but so does checking a preference.

@eclipse-equinox-bot

eclipse-equinox-bot commented Oct 12, 2024

Copy link
Copy Markdown
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/META-INF/MANIFEST.MF
features/org.eclipse.equinox.p2.rcp.feature/feature.xml
features/org.eclipse.equinox.p2.sdk/feature.xml
features/org.eclipse.equinox.p2.user.ui/feature.xml

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From 16368b7d0e9a8072211b3d35b0fbcbf8f73132ff Mon Sep 17 00:00:00 2001
From: Eclipse Equinox Bot <equinox-bot@eclipse.org>
Date: Sat, 30 May 2026 08:25:22 +0000
Subject: [PATCH] Version bump(s) for 4.41 stream


diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/META-INF/MANIFEST.MF
index 0bb668af9..e5086c1b8 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
 Bundle-SymbolicName: org.eclipse.equinox.p2.ui.sdk.scheduler;singleton:=true
-Bundle-Version: 1.7.100.qualifier
+Bundle-Version: 1.7.200.qualifier
 Bundle-Activator: org.eclipse.equinox.internal.p2.ui.sdk.scheduler.AutomaticUpdatePlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/features/org.eclipse.equinox.p2.rcp.feature/feature.xml b/features/org.eclipse.equinox.p2.rcp.feature/feature.xml
index eaba47d6d..074dab22b 100644
--- a/features/org.eclipse.equinox.p2.rcp.feature/feature.xml
+++ b/features/org.eclipse.equinox.p2.rcp.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.equinox.p2.rcp.feature"
       label="%featureName"
-      version="1.4.3200.qualifier"
+      version="1.4.3300.qualifier"
       provider-name="%providerName"
       license-feature="org.eclipse.license"
       license-feature-version="0.0.0">
diff --git a/features/org.eclipse.equinox.p2.sdk/feature.xml b/features/org.eclipse.equinox.p2.sdk/feature.xml
index 7784e65dd..c92a18762 100644
--- a/features/org.eclipse.equinox.p2.sdk/feature.xml
+++ b/features/org.eclipse.equinox.p2.sdk/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.equinox.p2.sdk"
       label="%featureName"
-      version="3.11.3200.qualifier"
+      version="3.11.3300.qualifier"
       provider-name="%providerName"
       license-feature="org.eclipse.license"
       license-feature-version="0.0.0">
diff --git a/features/org.eclipse.equinox.p2.user.ui/feature.xml b/features/org.eclipse.equinox.p2.user.ui/feature.xml
index db829b849..b1b9ae3f6 100644
--- a/features/org.eclipse.equinox.p2.user.ui/feature.xml
+++ b/features/org.eclipse.equinox.p2.user.ui/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.equinox.p2.user.ui"
       label="%featureName"
-      version="2.4.3200.qualifier"
+      version="2.4.3300.qualifier"
       provider-name="%providerName"
       license-feature="org.eclipse.license"
       license-feature-version="0.0.0">
-- 
2.54.0

Further information are available in Common Build Issues - Missing version increments.

@HannesWell HannesWell force-pushed the update-scheduler-as-eventHandler branch 2 times, most recently from b426237 to 4a67dd8 Compare October 15, 2024 17:31
@iloveeclipse

Copy link
Copy Markdown
Member

Check the preference before running the job or within the job and potentially exit early?
Of course starting a job has an overhead but so does checking a preference.

I would avoid starting job if possible, because compared with a single preference check extra job adds extra complexity for the overall IDE startup, uses shared resources (worker pool), adds async execution effects.

@vogella

vogella commented Dec 6, 2024

Copy link
Copy Markdown
Contributor

@HannesWell could you move the preference check before starting the job? Would be nice to have this finished.

@laeubi

laeubi commented Nov 11, 2025

Copy link
Copy Markdown
Member

@HannesWell my suggestion would be to either finish this for 2026-03 M1 or we close the PR as it is celebrating its second anniversary soon.

@vogella

vogella commented May 14, 2026

Copy link
Copy Markdown
Contributor

2026-03 M1

Lets try 2026-09 M1

@vogella vogella force-pushed the update-scheduler-as-eventHandler branch from 8e319bf to cca7da1 Compare May 14, 2026 04:48
@vogella

vogella commented May 14, 2026

Copy link
Copy Markdown
Contributor

API errors showing up in the full CI build are unrelated to this change, ,they come from other bundles.

@vogella vogella force-pushed the update-scheduler-as-eventHandler branch from cca7da1 to 39aee07 Compare May 21, 2026 11:24
@vogella vogella force-pushed the update-scheduler-as-eventHandler branch from 39aee07 to 6bf4200 Compare May 30, 2026 08:21
@merks

merks commented May 30, 2026

Copy link
Copy Markdown
Contributor

I'm concerned that pushing multiple p2 changes at the same time will result in increment that will then conflict.

E.g., with this PR:

#1075

I assume one can always force push the original commit and then there will be new different version increments, but this approach does result in a much large set of builds and notifications.

Maybe we can control the flow a little bit so get one PR through for a given repository?

HannesWell and others added 2 commits May 30, 2026 11:11
... for the UIEvents.UILifeCycle.APP_STARTUP_COMPLETE event.

This is a less Eclipse specific approach and also prevents the user from
disabling the start-up task.
The automatic search for updates can still be disabled.
@vogella vogella force-pushed the update-scheduler-as-eventHandler branch from 39478e7 to d7a0f24 Compare May 30, 2026 09:11
@vogella

vogella commented May 30, 2026

Copy link
Copy Markdown
Contributor

Build already validated.

@vogella vogella merged commit ef0e5d5 into eclipse-equinox:master May 30, 2026
9 of 10 checks passed
HannesWell added a commit that referenced this pull request Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants