Re: [PR] [KARAF-7754] Upgrade to Pax Web 9.0.11 & Jetty 10.0.16 [karaf]
grgrzybek commented on PR #1785: URL: https://github.com/apache/karaf/pull/1785#issuecomment-1816912448 I'll get back to https://github.com/grgrzybek/karaf/commits/KARAF-7544-Jetty10-PaxWeb9 at some point. I'm working on Jolokia now and I need Pax Web with jakarta support, so I got back to Pax Web 10 and realized that Pax URL War needs `jakarta.servlet` version too, so I started checking Pax URL 3 (work in progress) and realized there are Maven Resolver things to solve (we should move to Maven Resolver 2 soon). But I didn't lost track of what I work on ;) (https://www.youtube.com/watch?v=AbSehcT19u0) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@karaf.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[BUILD-FAILURE]: Job 'Karaf/karaf-runtime/karaf-4.3.x [karaf-4.3.x] [318]'
BUILD-FAILURE: Job 'Karaf/karaf-runtime/karaf-4.3.x [karaf-4.3.x] [318]': Check console output at "https://ci-builds.apache.org/job/Karaf/job/karaf-runtime/job/karaf-4.3.x/318/";>Karaf/karaf-runtime/karaf-4.3.x [karaf-4.3.x] [318]"
(karaf) branch karaf-4.3.x updated: [KARAF-7751] upgrade plugins to solve RB issues
This is an automated email from the ASF dual-hosted git repository. jbonofre pushed a commit to branch karaf-4.3.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.3.x by this push: new 8c8defd7b0 [KARAF-7751] upgrade plugins to solve RB issues 8c8defd7b0 is described below commit 8c8defd7b03c6aad00859aca09ad0ebdb2a5d832 Author: Hervé Boutemy AuthorDate: Mon Sep 18 00:00:28 2023 +0200 [KARAF-7751] upgrade plugins to solve RB issues (cherry picked from commit e982f65806ee39cf8ad43600c7a029da69cee7be) --- pom.xml | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index c81b28ef9b..72dd5da867 100644 --- a/pom.xml +++ b/pom.xml @@ -84,8 +84,8 @@ ${scm.connection} ${scm.developerConnection} ${scm.url} - HEAD - +HEAD + @@ -344,7 +344,7 @@ 1.1.2 -1.4.0 +1.5.0 UTF-8 @@ -468,7 +468,7 @@ org.apache.maven.plugins maven-release-plugin -2.5.3 +3.0.1 false clean install @@ -513,7 +513,7 @@ org.apache.maven.plugins maven-assembly-plugin -3.4.2 +3.6.0 org.apache.maven.plugins
(karaf) branch karaf-4.4.x updated: [KARAF-7751] upgrade plugins to solve RB issues
This is an automated email from the ASF dual-hosted git repository. jbonofre pushed a commit to branch karaf-4.4.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.4.x by this push: new c8eef47437 [KARAF-7751] upgrade plugins to solve RB issues c8eef47437 is described below commit c8eef474375acfd0b97bd8e3119cdbce02da83e3 Author: Hervé Boutemy AuthorDate: Mon Sep 18 00:00:28 2023 +0200 [KARAF-7751] upgrade plugins to solve RB issues (cherry picked from commit e982f65806ee39cf8ad43600c7a029da69cee7be) --- pom.xml | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index f0ba449ecf..2ab769f184 100644 --- a/pom.xml +++ b/pom.xml @@ -84,8 +84,8 @@ ${scm.connection} ${scm.developerConnection} ${scm.url} - HEAD - +HEAD + @@ -356,7 +356,7 @@ 1.4.0 -1.4.0 +1.5.0 UTF-8 @@ -480,7 +480,7 @@ org.apache.maven.plugins maven-release-plugin -2.5.3 +3.0.1 false clean install @@ -525,7 +525,7 @@ org.apache.maven.plugins maven-assembly-plugin -3.4.2 +3.6.0 org.apache.maven.plugins
Re: [PR] [KARAF-7751] upgrade plugins to solve RB issues [karaf]
asfgit closed pull request #1769: [KARAF-7751] upgrade plugins to solve RB issues URL: https://github.com/apache/karaf/pull/1769 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@karaf.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(karaf) branch main updated: [KARAF-7751] upgrade plugins to solve RB issues
This is an automated email from the ASF dual-hosted git repository. jbonofre pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/main by this push: new e982f65806 [KARAF-7751] upgrade plugins to solve RB issues new 30657b6928 This closes #1769 e982f65806 is described below commit e982f65806ee39cf8ad43600c7a029da69cee7be Author: Hervé Boutemy AuthorDate: Mon Sep 18 00:00:28 2023 +0200 [KARAF-7751] upgrade plugins to solve RB issues --- pom.xml | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 80126e033c..befcc6b776 100644 --- a/pom.xml +++ b/pom.xml @@ -84,8 +84,8 @@ ${scm.connection} ${scm.developerConnection} ${scm.url} - HEAD - +HEAD + @@ -356,7 +356,7 @@ 1.4.0 -1.4.0 +1.5.0 UTF-8 ${basedir}/etc/appended-resources @@ -479,7 +479,7 @@ org.apache.maven.plugins maven-release-plugin -2.5.3 +3.0.1 false clean install @@ -531,7 +531,7 @@ org.apache.maven.plugins maven-assembly-plugin -3.4.2 +3.6.0 org.apache.maven.plugins
[PR] [KARAF-6606] Fixed felix.fileinstall.filename property availability via ConfigMBean (getConfig method) [karaf]
cala87 opened a new pull request, #1793: URL: https://github.com/apache/karaf/pull/1793 The problem should be due to loading properties from file. When the execution is in this section of code, the call to load(file) does not enrich the properties with the file itself. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@karaf.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[BUILD-STABLE]: Job 'Karaf/karaf-runtime/main [main] [460]'
BUILD-STABLE: Job 'Karaf/karaf-runtime/main [main] [460]': Is back to normal.
[BUILD-FAILURE]: Job 'Karaf/karaf-runtime/main [main] [459]'
BUILD-FAILURE: Job 'Karaf/karaf-runtime/main [main] [459]': Check console output at "https://ci-builds.apache.org/job/Karaf/job/karaf-runtime/job/main/459/";>Karaf/karaf-runtime/main [main] [459]"
[BUILD-FAILURE]: Job 'Karaf/karaf-runtime/karaf-4.3.x [karaf-4.3.x] [317]'
BUILD-FAILURE: Job 'Karaf/karaf-runtime/karaf-4.3.x [karaf-4.3.x] [317]': Check console output at "https://ci-builds.apache.org/job/Karaf/job/karaf-runtime/job/karaf-4.3.x/317/";>Karaf/karaf-runtime/karaf-4.3.x [karaf-4.3.x] [317]"
[BUILD-FAILURE]: Job 'Karaf/karaf-runtime/karaf-4.3.x [karaf-4.3.x] [316]'
BUILD-FAILURE: Job 'Karaf/karaf-runtime/karaf-4.3.x [karaf-4.3.x] [316]': Check console output at "https://ci-builds.apache.org/job/Karaf/job/karaf-runtime/job/karaf-4.3.x/316/";>Karaf/karaf-runtime/karaf-4.3.x [karaf-4.3.x] [316]"
[BUILD-FAILURE]: Job 'Karaf/karaf-runtime/karaf-4.3.x [karaf-4.3.x] [315]'
BUILD-FAILURE: Job 'Karaf/karaf-runtime/karaf-4.3.x [karaf-4.3.x] [315]': Check console output at "https://ci-builds.apache.org/job/Karaf/job/karaf-runtime/job/karaf-4.3.x/315/";>Karaf/karaf-runtime/karaf-4.3.x [karaf-4.3.x] [315]"
Re: [PR] [KARAF-7768]: Provide SPI Fly from framework [karaf]
jbonofre commented on code in PR #1784: URL: https://github.com/apache/karaf/pull/1784#discussion_r1397331349 ## assemblies/features/framework/src/main/feature/feature.xml: ## @@ -45,6 +45,20 @@ mvn:org.apache.felix/org.apache.felix.fileinstall/${felix.fileinstall.version} mvn:org.apache.karaf.features/org.apache.karaf.features.core/${project.version} + + +mvn:org.ow2.asm/asm/${asm.version} Review Comment: do we really think it's a good idea to provide spifly at framework level ? Just thinking :) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@karaf.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [KARAF-7754] Upgrade to Pax Web 9.0.11 & Jetty 10.0.16 [karaf]
jbonofre commented on PR #1785: URL: https://github.com/apache/karaf/pull/1785#issuecomment-1816452393 Better to resume what @grgrzybek started imho. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@karaf.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [KARAF-7754] Upgrade to Pax Web 9.0.11 & Jetty 10.0.16 [karaf]
jbonofre closed pull request #1785: [KARAF-7754] Upgrade to Pax Web 9.0.11 & Jetty 10.0.16 URL: https://github.com/apache/karaf/pull/1785 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@karaf.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(karaf) branch karaf-4.3.x updated: avoid long evaluation chain for JRE property
This is an automated email from the ASF dual-hosted git repository. jbonofre pushed a commit to branch karaf-4.3.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.3.x by this push: new 4e5b429e7f avoid long evaluation chain for JRE property 4e5b429e7f is described below commit 4e5b429e7f28b22563bd4a408e04a6ba364ee33f Author: Bernd AuthorDate: Mon Nov 6 00:08:50 2023 +0100 avoid long evaluation chain for JRE property (cherry picked from commit a7f64687fc45a631c7a8f5ea67400d18c5501977) --- .../resources/etc/jre.properties | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties index cea56132b8..50c95a8746 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties +++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties @@ -493,14 +493,14 @@ jre-9= \ com.sun.security.sasl.util jre-10 = ${jre-9} -jre-11 = ${jre-10} -jre-12 = ${jre-11} -jre-13 = ${jre-12} -jre-14 = ${jre-13} -jre-15 = ${jre-14} -jre-16 = ${jre-15} -jre-17 = ${jre-16} -jre-18 = ${jre-17} -jre-19 = ${jre-18} -jre-20 = ${jre-19} -jre-21 = ${jre-20} +jre-11 = ${jre-9} +jre-12 = ${jre-9} +jre-13 = ${jre-9} +jre-14 = ${jre-9} +jre-15 = ${jre-9} +jre-16 = ${jre-9} +jre-17 = ${jre-9} +jre-18 = ${jre-9} +jre-19 = ${jre-9} +jre-20 = ${jre-9} +jre-21 = ${jre-9}
(karaf) branch karaf-4.4.x updated: avoid long evaluation chain for JRE property
This is an automated email from the ASF dual-hosted git repository. jbonofre pushed a commit to branch karaf-4.4.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.4.x by this push: new 99b299f610 avoid long evaluation chain for JRE property 99b299f610 is described below commit 99b299f61027dbb4fec9d8d856d3be92a9a043f2 Author: Bernd AuthorDate: Mon Nov 6 00:08:50 2023 +0100 avoid long evaluation chain for JRE property (cherry picked from commit a7f64687fc45a631c7a8f5ea67400d18c5501977) --- .../resources/etc/jre.properties | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties index cea56132b8..50c95a8746 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties +++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties @@ -493,14 +493,14 @@ jre-9= \ com.sun.security.sasl.util jre-10 = ${jre-9} -jre-11 = ${jre-10} -jre-12 = ${jre-11} -jre-13 = ${jre-12} -jre-14 = ${jre-13} -jre-15 = ${jre-14} -jre-16 = ${jre-15} -jre-17 = ${jre-16} -jre-18 = ${jre-17} -jre-19 = ${jre-18} -jre-20 = ${jre-19} -jre-21 = ${jre-20} +jre-11 = ${jre-9} +jre-12 = ${jre-9} +jre-13 = ${jre-9} +jre-14 = ${jre-9} +jre-15 = ${jre-9} +jre-16 = ${jre-9} +jre-17 = ${jre-9} +jre-18 = ${jre-9} +jre-19 = ${jre-9} +jre-20 = ${jre-9} +jre-21 = ${jre-9}
Re: [PR] avoid long evaluation chain for JRE property [karaf]
jbonofre merged PR #1789: URL: https://github.com/apache/karaf/pull/1789 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@karaf.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(karaf) branch main updated: avoid long evaluation chain for JRE property
This is an automated email from the ASF dual-hosted git repository. jbonofre pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/main by this push: new a7f64687fc avoid long evaluation chain for JRE property new c97848d9d4 Merge pull request #1789 from ecki/patch-2 a7f64687fc is described below commit a7f64687fc45a631c7a8f5ea67400d18c5501977 Author: Bernd AuthorDate: Mon Nov 6 00:08:50 2023 +0100 avoid long evaluation chain for JRE property --- .../resources/etc/jre.properties | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties index cea56132b8..50c95a8746 100644 --- a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties +++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties @@ -493,14 +493,14 @@ jre-9= \ com.sun.security.sasl.util jre-10 = ${jre-9} -jre-11 = ${jre-10} -jre-12 = ${jre-11} -jre-13 = ${jre-12} -jre-14 = ${jre-13} -jre-15 = ${jre-14} -jre-16 = ${jre-15} -jre-17 = ${jre-16} -jre-18 = ${jre-17} -jre-19 = ${jre-18} -jre-20 = ${jre-19} -jre-21 = ${jre-20} +jre-11 = ${jre-9} +jre-12 = ${jre-9} +jre-13 = ${jre-9} +jre-14 = ${jre-9} +jre-15 = ${jre-9} +jre-16 = ${jre-9} +jre-17 = ${jre-9} +jre-18 = ${jre-9} +jre-19 = ${jre-9} +jre-20 = ${jre-9} +jre-21 = ${jre-9}
(karaf) branch karaf-4.3.x updated: [KARAF-7779] Fix deployment scenario where feature has a fragment for existing bundle
This is an automated email from the ASF dual-hosted git repository. jbonofre pushed a commit to branch karaf-4.3.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.3.x by this push: new 046b4e159a [KARAF-7779] Fix deployment scenario where feature has a fragment for existing bundle 046b4e159a is described below commit 046b4e159a90c1c155254bb7f7adbe8b2202d08c Author: Grzegorz Grzybek AuthorDate: Mon Nov 13 08:27:40 2023 +0100 [KARAF-7779] Fix deployment scenario where feature has a fragment for existing bundle (cherry picked from commit b47601a93131ea52403dd4281a6b2132dd623431) --- .../internal/region/SubsystemResolver.java | 15 +++- .../features/internal/service/DeployerTest.java| 69 + .../internal/support/TestBundleRevision.java | 86 ++ .../karaf/features/internal/service/data4/b.mf | 4 + .../karaf/features/internal/service/data4/f.mf | 5 ++ .../features/internal/service/data4/features.xml | 22 ++ 6 files changed, 200 insertions(+), 1 deletion(-) diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/region/SubsystemResolver.java b/features/core/src/main/java/org/apache/karaf/features/internal/region/SubsystemResolver.java index 6019e63305..137c4f786a 100644 --- a/features/core/src/main/java/org/apache/karaf/features/internal/region/SubsystemResolver.java +++ b/features/core/src/main/java/org/apache/karaf/features/internal/region/SubsystemResolver.java @@ -473,7 +473,20 @@ public class SubsystemResolver implements SubsystemResolverResolution, Subsystem if (wire != null) { String region = (String) wire.getCapability().getAttributes().get(IDENTITY_NAMESPACE); region = flats.get(region); -resources.put(resource, region); +Resource toStore = resource; +if (resource instanceof BundleRevision) { +// there may be a situation where a bundle is already installed, but new feature +// installs a fragment attached to this bundle. In this case, what we effectively +// need to install is not the bundle again +// (we'd get "java.lang.IllegalStateException: Resource has no uri"), but the fragment +Resource originalRequirer = wire.getRequirement().getResource(); +if (originalRequirer != null && originalRequirer != resource) { +// it means the source of this requirement is NOT the installed bundle, which +// should be a fragment +toStore = originalRequirer; +} +} +resources.put(toStore, region); } } } diff --git a/features/core/src/test/java/org/apache/karaf/features/internal/service/DeployerTest.java b/features/core/src/test/java/org/apache/karaf/features/internal/service/DeployerTest.java index be83b4f222..85cac4d2b7 100644 --- a/features/core/src/test/java/org/apache/karaf/features/internal/service/DeployerTest.java +++ b/features/core/src/test/java/org/apache/karaf/features/internal/service/DeployerTest.java @@ -19,6 +19,7 @@ package org.apache.karaf.features.internal.service; import java.io.IOException; import java.io.InputStream; import java.net.URL; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; @@ -40,6 +41,7 @@ import org.apache.karaf.features.FeatureEvent; import org.apache.karaf.features.FeaturesService; import org.apache.karaf.features.internal.resolver.Slf4jResolverLog; import org.apache.karaf.features.internal.support.TestBundle; +import org.apache.karaf.features.internal.support.TestBundleRevision; import org.apache.karaf.features.internal.support.TestDownloadManager; import org.easymock.EasyMock; import org.easymock.IAnswer; @@ -49,6 +51,7 @@ import org.junit.Test; import org.osgi.framework.Bundle; import org.osgi.framework.BundleException; import org.osgi.framework.InvalidSyntaxException; +import org.osgi.framework.wiring.BundleRevision; import org.osgi.resource.Resource; import org.osgi.resource.Wire; import org.osgi.service.resolver.Resolver; @@ -58,6 +61,7 @@ import org.slf4j.LoggerFactory; import static org.apache.karaf.features.FeaturesService.*; import static org.apache.karaf.features.internal.util.MapUtils.addToMapSet; import static org.easymock.EasyMock.anyInt; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; public class DeployerTest { @@ -134,6 +138,71 @@ public class DeployerTest { c.verify(); } +@Test +public void tes
(karaf) branch karaf-4.4.x updated: [KARAF-7779] Fix deployment scenario where feature has a fragment for existing bundle
This is an automated email from the ASF dual-hosted git repository. jbonofre pushed a commit to branch karaf-4.4.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.4.x by this push: new b47601a931 [KARAF-7779] Fix deployment scenario where feature has a fragment for existing bundle new c0d6cbd3f1 Merge pull request #1790 from grgrzybek/KARAF-7779 b47601a931 is described below commit b47601a93131ea52403dd4281a6b2132dd623431 Author: Grzegorz Grzybek AuthorDate: Mon Nov 13 08:27:40 2023 +0100 [KARAF-7779] Fix deployment scenario where feature has a fragment for existing bundle --- .../internal/region/SubsystemResolver.java | 15 +++- .../features/internal/service/DeployerTest.java| 69 + .../internal/support/TestBundleRevision.java | 86 ++ .../karaf/features/internal/service/data4/b.mf | 4 + .../karaf/features/internal/service/data4/f.mf | 5 ++ .../features/internal/service/data4/features.xml | 22 ++ 6 files changed, 200 insertions(+), 1 deletion(-) diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/region/SubsystemResolver.java b/features/core/src/main/java/org/apache/karaf/features/internal/region/SubsystemResolver.java index a7ec9551e2..8ff50728bd 100644 --- a/features/core/src/main/java/org/apache/karaf/features/internal/region/SubsystemResolver.java +++ b/features/core/src/main/java/org/apache/karaf/features/internal/region/SubsystemResolver.java @@ -472,7 +472,20 @@ public class SubsystemResolver implements SubsystemResolverResolution, Subsystem if (wire != null) { String region = (String) wire.getCapability().getAttributes().get(IDENTITY_NAMESPACE); region = flats.get(region); -resources.put(resource, region); +Resource toStore = resource; +if (resource instanceof BundleRevision) { +// there may be a situation where a bundle is already installed, but new feature +// installs a fragment attached to this bundle. In this case, what we effectively +// need to install is not the bundle again +// (we'd get "java.lang.IllegalStateException: Resource has no uri"), but the fragment +Resource originalRequirer = wire.getRequirement().getResource(); +if (originalRequirer != null && originalRequirer != resource) { +// it means the source of this requirement is NOT the installed bundle, which +// should be a fragment +toStore = originalRequirer; +} +} +resources.put(toStore, region); } } } diff --git a/features/core/src/test/java/org/apache/karaf/features/internal/service/DeployerTest.java b/features/core/src/test/java/org/apache/karaf/features/internal/service/DeployerTest.java index be83b4f222..85cac4d2b7 100644 --- a/features/core/src/test/java/org/apache/karaf/features/internal/service/DeployerTest.java +++ b/features/core/src/test/java/org/apache/karaf/features/internal/service/DeployerTest.java @@ -19,6 +19,7 @@ package org.apache.karaf.features.internal.service; import java.io.IOException; import java.io.InputStream; import java.net.URL; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; @@ -40,6 +41,7 @@ import org.apache.karaf.features.FeatureEvent; import org.apache.karaf.features.FeaturesService; import org.apache.karaf.features.internal.resolver.Slf4jResolverLog; import org.apache.karaf.features.internal.support.TestBundle; +import org.apache.karaf.features.internal.support.TestBundleRevision; import org.apache.karaf.features.internal.support.TestDownloadManager; import org.easymock.EasyMock; import org.easymock.IAnswer; @@ -49,6 +51,7 @@ import org.junit.Test; import org.osgi.framework.Bundle; import org.osgi.framework.BundleException; import org.osgi.framework.InvalidSyntaxException; +import org.osgi.framework.wiring.BundleRevision; import org.osgi.resource.Resource; import org.osgi.resource.Wire; import org.osgi.service.resolver.Resolver; @@ -58,6 +61,7 @@ import org.slf4j.LoggerFactory; import static org.apache.karaf.features.FeaturesService.*; import static org.apache.karaf.features.internal.util.MapUtils.addToMapSet; import static org.easymock.EasyMock.anyInt; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; public class DeployerTest { @@ -134,6 +138,71 @@ public class DeployerTest { c.verify(); } +@Test +public void testInstal
Re: [PR] [KARAF-7779] Fix deployment scenario where feature has a fragment for… [karaf]
jbonofre merged PR #1790: URL: https://github.com/apache/karaf/pull/1790 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@karaf.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(karaf) branch main updated: [KARAF-7779] Fix deployment scenario where feature has a fragment for existing bundle
This is an automated email from the ASF dual-hosted git repository. jbonofre pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/main by this push: new 9bbb965eff [KARAF-7779] Fix deployment scenario where feature has a fragment for existing bundle new 506a890ce4 Merge pull request #1791 from grgrzybek/KARAF-7779-main 9bbb965eff is described below commit 9bbb965effc521096b6186e55680d91d8296977a Author: Grzegorz Grzybek AuthorDate: Mon Nov 13 08:27:40 2023 +0100 [KARAF-7779] Fix deployment scenario where feature has a fragment for existing bundle --- .../internal/region/SubsystemResolver.java | 15 +++- .../features/internal/service/DeployerTest.java| 69 + .../internal/support/TestBundleRevision.java | 86 ++ .../karaf/features/internal/service/data4/b.mf | 4 + .../karaf/features/internal/service/data4/f.mf | 5 ++ .../features/internal/service/data4/features.xml | 22 ++ 6 files changed, 200 insertions(+), 1 deletion(-) diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/region/SubsystemResolver.java b/features/core/src/main/java/org/apache/karaf/features/internal/region/SubsystemResolver.java index a7ec9551e2..8ff50728bd 100644 --- a/features/core/src/main/java/org/apache/karaf/features/internal/region/SubsystemResolver.java +++ b/features/core/src/main/java/org/apache/karaf/features/internal/region/SubsystemResolver.java @@ -472,7 +472,20 @@ public class SubsystemResolver implements SubsystemResolverResolution, Subsystem if (wire != null) { String region = (String) wire.getCapability().getAttributes().get(IDENTITY_NAMESPACE); region = flats.get(region); -resources.put(resource, region); +Resource toStore = resource; +if (resource instanceof BundleRevision) { +// there may be a situation where a bundle is already installed, but new feature +// installs a fragment attached to this bundle. In this case, what we effectively +// need to install is not the bundle again +// (we'd get "java.lang.IllegalStateException: Resource has no uri"), but the fragment +Resource originalRequirer = wire.getRequirement().getResource(); +if (originalRequirer != null && originalRequirer != resource) { +// it means the source of this requirement is NOT the installed bundle, which +// should be a fragment +toStore = originalRequirer; +} +} +resources.put(toStore, region); } } } diff --git a/features/core/src/test/java/org/apache/karaf/features/internal/service/DeployerTest.java b/features/core/src/test/java/org/apache/karaf/features/internal/service/DeployerTest.java index be83b4f222..85cac4d2b7 100644 --- a/features/core/src/test/java/org/apache/karaf/features/internal/service/DeployerTest.java +++ b/features/core/src/test/java/org/apache/karaf/features/internal/service/DeployerTest.java @@ -19,6 +19,7 @@ package org.apache.karaf.features.internal.service; import java.io.IOException; import java.io.InputStream; import java.net.URL; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; @@ -40,6 +41,7 @@ import org.apache.karaf.features.FeatureEvent; import org.apache.karaf.features.FeaturesService; import org.apache.karaf.features.internal.resolver.Slf4jResolverLog; import org.apache.karaf.features.internal.support.TestBundle; +import org.apache.karaf.features.internal.support.TestBundleRevision; import org.apache.karaf.features.internal.support.TestDownloadManager; import org.easymock.EasyMock; import org.easymock.IAnswer; @@ -49,6 +51,7 @@ import org.junit.Test; import org.osgi.framework.Bundle; import org.osgi.framework.BundleException; import org.osgi.framework.InvalidSyntaxException; +import org.osgi.framework.wiring.BundleRevision; import org.osgi.resource.Resource; import org.osgi.resource.Wire; import org.osgi.service.resolver.Resolver; @@ -58,6 +61,7 @@ import org.slf4j.LoggerFactory; import static org.apache.karaf.features.FeaturesService.*; import static org.apache.karaf.features.internal.util.MapUtils.addToMapSet; import static org.easymock.EasyMock.anyInt; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; public class DeployerTest { @@ -134,6 +138,71 @@ public class DeployerTest { c.verify(); } +@Test +public void testInstallFeatureW
Re: [PR] [KARAF-7779] Fix deployment scenario where feature has a fragment for… [karaf]
jbonofre merged PR #1791: URL: https://github.com/apache/karaf/pull/1791 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@karaf.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(karaf) branch karaf-4.3.x updated: Update MainLockingTest.java
This is an automated email from the ASF dual-hosted git repository. jbonofre pushed a commit to branch karaf-4.3.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.3.x by this push: new a7caf7292d Update MainLockingTest.java a7caf7292d is described below commit a7caf7292db25049a5d32d0b47b706456f2d14c5 Author: same8891 <55152301+same8...@users.noreply.github.com> AuthorDate: Thu Nov 9 16:11:08 2023 -0600 Update MainLockingTest.java (cherry picked from commit 7516c3b15191e8d87eaffb52cb0c90c132f2860c) --- main/src/test/java/org/apache/karaf/main/MainLockingTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/test/java/org/apache/karaf/main/MainLockingTest.java b/main/src/test/java/org/apache/karaf/main/MainLockingTest.java index 8a12fd45d2..0b93f7226f 100644 --- a/main/src/test/java/org/apache/karaf/main/MainLockingTest.java +++ b/main/src/test/java/org/apache/karaf/main/MainLockingTest.java @@ -187,7 +187,7 @@ public class MainLockingTest { FrameworkStartLevel sl = framework.adapt(FrameworkStartLevel.class); MockLock lock = (MockLock) main.getLock(); - +Thread.sleep(1000); Assert.assertEquals(100, sl.getStartLevel()); // simulate losing a lock
(karaf) branch karaf-4.4.x updated: Update MainLockingTest.java
This is an automated email from the ASF dual-hosted git repository. jbonofre pushed a commit to branch karaf-4.4.x in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/karaf-4.4.x by this push: new bed573cee6 Update MainLockingTest.java bed573cee6 is described below commit bed573cee63073dcc302d237f08cfd4225479955 Author: same8891 <55152301+same8...@users.noreply.github.com> AuthorDate: Thu Nov 9 16:11:08 2023 -0600 Update MainLockingTest.java (cherry picked from commit 7516c3b15191e8d87eaffb52cb0c90c132f2860c) --- main/src/test/java/org/apache/karaf/main/MainLockingTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/test/java/org/apache/karaf/main/MainLockingTest.java b/main/src/test/java/org/apache/karaf/main/MainLockingTest.java index 8a12fd45d2..0b93f7226f 100644 --- a/main/src/test/java/org/apache/karaf/main/MainLockingTest.java +++ b/main/src/test/java/org/apache/karaf/main/MainLockingTest.java @@ -187,7 +187,7 @@ public class MainLockingTest { FrameworkStartLevel sl = framework.adapt(FrameworkStartLevel.class); MockLock lock = (MockLock) main.getLock(); - +Thread.sleep(1000); Assert.assertEquals(100, sl.getStartLevel()); // simulate losing a lock
(karaf) branch main updated: Update MainLockingTest.java
This is an automated email from the ASF dual-hosted git repository. jbonofre pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/karaf.git The following commit(s) were added to refs/heads/main by this push: new 7516c3b151 Update MainLockingTest.java new cf8c426349 Merge pull request #1792 from same8891/fix-flaky 7516c3b151 is described below commit 7516c3b15191e8d87eaffb52cb0c90c132f2860c Author: same8891 <55152301+same8...@users.noreply.github.com> AuthorDate: Thu Nov 9 16:11:08 2023 -0600 Update MainLockingTest.java --- main/src/test/java/org/apache/karaf/main/MainLockingTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/test/java/org/apache/karaf/main/MainLockingTest.java b/main/src/test/java/org/apache/karaf/main/MainLockingTest.java index 8a12fd45d2..0b93f7226f 100644 --- a/main/src/test/java/org/apache/karaf/main/MainLockingTest.java +++ b/main/src/test/java/org/apache/karaf/main/MainLockingTest.java @@ -187,7 +187,7 @@ public class MainLockingTest { FrameworkStartLevel sl = framework.adapt(FrameworkStartLevel.class); MockLock lock = (MockLock) main.getLock(); - +Thread.sleep(1000); Assert.assertEquals(100, sl.getStartLevel()); // simulate losing a lock
Re: [PR] Fix flaky main.src.test.java.org.apache.karaf.main.MainLockingTest.testLostMasterLockAfterThreshold [karaf]
jbonofre merged PR #1792: URL: https://github.com/apache/karaf/pull/1792 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@karaf.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org