You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "christophd (via GitHub)" <gi...@apache.org> on 2023/05/22 17:10:11 UTC

[GitHub] [camel-k] christophd opened a new pull request, #4402: fix(#4361): Avoid errors when components not available in Camel catalog

christophd opened a new pull request, #4402:
URL: https://github.com/apache/camel-k/pull/4402

   - Allow integrations that uses components that are not listed in the Camel catalog
   - Components may not be listed in the catalog for many reasons (e.g. custom components)
   - Just log a warning message in case the component is missing in the catalog


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] tadayosi commented on pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "tadayosi (via GitHub)" <gi...@apache.org>.
tadayosi commented on PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#issuecomment-1560429923

   > I noticed this in the newly created E2E tests where camel:resilience4j is not available as Camel Quarkus extension but got resolved to camel-quarkus-resilience4j which is simply not available. This was causing the integration to fail at build time with Maven dependency resolving errors. I have fixed that so now Camel dependencies get resolved to camel-xxx instead when there are no Camel Quarkus extensions for this specific dependency available.
   
   What does it mean to use a `camel-xxx` dependecy on a Quarkus runtime, since in Camel K 1.12.x Quarkus is still the default and only runtime?  Doesn't trying to use `camel-resilience4j` directly mean running a library not yet ready for Quarkus, as the raw Camel dependency shouldn't yet go through stripping of possible runtime usages of reflection or dynamic loading which aren't allowed on Quarkus?


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] christophd commented on pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#issuecomment-1558669751

   @squakez I have tried to fix the failing E2E tests could you please rerun the workflows?


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] christophd commented on pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#issuecomment-1559814686

   @squakez I have found another issue and fixed it in this PR. 
   
   The issue is related to Camel dependencies that are not available in Camel Quarkus extensions. These dependencies should not get resolved to `camel-quarkus-xxx` dependencies but rather fallback to arbitrary `camel-xxx` dependencies. 
   
   I noticed this in the newly created E2E tests where `camel:resilience4j` is not available as Camel Quarkus extension but got resolved to `camel-quarkus-resilience4j` which is simply not available. This was causing the integration to fail at build time with Maven dependency resolving errors. I have fixed that so now Camel dependencies get resolved to `camel-xxx` instead when there are no Camel Quarkus extensions available.


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] squakez commented on a diff in pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on code in PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#discussion_r1201705824


##########
pkg/util/camel/camel_dependencies.go:
##########
@@ -49,57 +50,49 @@ func NormalizeDependency(dependency string) string {
 	return newDep
 }
 
-type Output interface {
-	OutOrStdout() io.Writer
-	ErrOrStderr() io.Writer
-}
-
 // ValidateDependencies validates dependencies against Camel catalog.
 // It only shows warning and does not throw error in case the Catalog is just not complete
 // and we don't want to let it stop the process.
-func ValidateDependencies(catalog *RuntimeCatalog, dependencies []string, out Output) {
-	for _, d := range dependencies {
-		ValidateDependency(catalog, d, out)
+func ValidateDependencies(catalog *RuntimeCatalog, dependencies []string, logger log.Logger) {
+	for _, dependency := range dependencies {
+		s := strings.Builder{}
+		ValidateDependency(catalog, dependency, &s)
+
+		if s.Len() > 0 {
+			logger.Info(strings.TrimSpace(s.String()))
+		}
 	}
 }
 
 // ValidateDependency validates a dependency against Camel catalog.
 // It only shows warning and does not throw error in case the Catalog is just not complete
 // and we don't want to let it stop the process.
-func ValidateDependency(catalog *RuntimeCatalog, dependency string, out Output) {
+func ValidateDependency(catalog *RuntimeCatalog, dependency string, out io.Writer) {
+	var artifact string
 	switch {
 	case strings.HasPrefix(dependency, "camel:"):
-		artifact := strings.TrimPrefix(dependency, "camel:")
-		if ok := catalog.IsValidArtifact(artifact); !ok {
-			fmt.Fprintf(out.ErrOrStderr(), "Warning: dependency %s not found in Camel catalog\n", dependency)

Review Comment:
   Okey, I see. I was confused by the usage of `out` variable, thinking it was bound to stdout. Thanks for clarifying.



-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] squakez commented on pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#issuecomment-1560590775

   I think that the usage of non "quarkified" dependencies/components should not be supported but neither restricted if the user, for any reason, want to use such dependency. I think the approach we are taking here is to tentatively run the Integration, reporting the warning. At this stage I am wondering if it makes sense to include an Integration condition to specify that. I think would be the neatest approach. Basically, if an integration fails, the user can quickly discover the reason of the failure (ie, non supported component) in the Integration conditions.


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] squakez closed pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez closed pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog
URL: https://github.com/apache/camel-k/pull/4402


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] christophd commented on pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#issuecomment-1560715191

   @squakez @lburgazzoli @tadayosi sorry, resolving to `camel-xxx` instead of `camel-quarkus-xxx` for dependencies not listed in the catalog is also not working because the raw Camel version is not resolvable in the generated Maven builder project. I see errors such as `'dependencies.dependency.version' for org.apache.camel:camel-resilience4j:jar is missing` because there is no bom that resolves the raw Camel dependency.
   
   So that makes me think that we should maybe go back to throwing errors when the Camel dependency is not in the catalog. In https://github.com/apache/camel-k-runtime/issues/1029 we have fixed the issue that the catalog does not list miscellaneous Camel dependencies and this is the root cause for the initial issue reported in #4361 
   
   I think @lburgazzoli made a good point. When a user needs to use a custom Camel component it should not be using the Camel `groupId` and it should be added to the integration with the `mvn:` GAV dependency instead of `camel:`. Also in case the catalog is incomplete we need to fix it there as @tadayosi has mentioned.
   
   So maybe I close this PR and we keep things as they have been with throwing errors once the Camel dependency is not resolvable via the catalog. Sorry folks for the back and forth. WDYT?


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] christophd commented on pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#issuecomment-1560644069

   @squakez yes, still same error in E2E test. I am diving deeper into this locally in order to provide a fix


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] christophd commented on pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#issuecomment-1561618010

   @claudio4j yes, but what should be the proper version value? At the moment the operator will overwrite all user defined versions on Camel dependencies in order to force the versions coming from the bom. We would need to also manage the raw Camel version in the catalog to actually set the proper version


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] squakez commented on a diff in pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on code in PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#discussion_r1201662531


##########
pkg/util/camel/camel_dependencies.go:
##########
@@ -49,57 +50,49 @@ func NormalizeDependency(dependency string) string {
 	return newDep
 }
 
-type Output interface {
-	OutOrStdout() io.Writer
-	ErrOrStderr() io.Writer
-}
-
 // ValidateDependencies validates dependencies against Camel catalog.
 // It only shows warning and does not throw error in case the Catalog is just not complete
 // and we don't want to let it stop the process.
-func ValidateDependencies(catalog *RuntimeCatalog, dependencies []string, out Output) {
-	for _, d := range dependencies {
-		ValidateDependency(catalog, d, out)
+func ValidateDependencies(catalog *RuntimeCatalog, dependencies []string, logger log.Logger) {
+	for _, dependency := range dependencies {
+		s := strings.Builder{}
+		ValidateDependency(catalog, dependency, &s)
+
+		if s.Len() > 0 {
+			logger.Info(strings.TrimSpace(s.String()))
+		}
 	}
 }
 
 // ValidateDependency validates a dependency against Camel catalog.
 // It only shows warning and does not throw error in case the Catalog is just not complete
 // and we don't want to let it stop the process.
-func ValidateDependency(catalog *RuntimeCatalog, dependency string, out Output) {
+func ValidateDependency(catalog *RuntimeCatalog, dependency string, out io.Writer) {
+	var artifact string
 	switch {
 	case strings.HasPrefix(dependency, "camel:"):
-		artifact := strings.TrimPrefix(dependency, "camel:")
-		if ok := catalog.IsValidArtifact(artifact); !ok {
-			fmt.Fprintf(out.ErrOrStderr(), "Warning: dependency %s not found in Camel catalog\n", dependency)

Review Comment:
   This one was sent to stderr on purpose. As we may use `kamel run -o yaml` to get the output of an Integration, we cannot mix stdout and stderr kind of messages.



-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] squakez commented on pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#issuecomment-1560592514

   >  This was causing the integration to fail at build time with Maven dependency resolving errors. I have fixed that so now Camel dependencies get resolved to camel-xxx instead when there are no Camel Quarkus extensions for this specific dependency available.
   
   Was it already committed? I can see the same error still in the checks.


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] ppalaga commented on pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "ppalaga (via GitHub)" <gi...@apache.org>.
ppalaga commented on PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#issuecomment-1560752479

   I see several options: 
   
   1. Care that all Camel components have at least a JVM-only extension in Camel Quarkus. In their most basic form, the JVM-only extensions are 100% generated and have no tests (except for an autogenerated test that does nothing else than making sure that the component can be loaded at all - see an example [here](https://github.com/apache/camel-quarkus/blob/main/integration-tests-jvm/asterisk/src/main/java/org/apache/camel/quarkus/component/asterisk/it/AsteriskResource.java#LL44C15-L44C19)). We typically do not know about these basic JVM-only extensions whether they work, because they have no proper functional tests. We assume they work at least in JVM mode and through the fact that they are "thrown out to the wild" the  folks using them can prove the opposite. JVM-only extensions are also listed in the Catalog and they are managed in the BOM. So Camel K would not need to get changed.
   
   2. Use camel jars directly. As @christophd mentioned, they are not managed in Camel Quarkus BOM. You could perhaps auto-generate the missing entries in Camel K BOM by diffing Camel Quarkus Catalog against Camel Catalog at Camel K build time?


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] christophd commented on pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#issuecomment-1561623343

   I think we can close this one in favor of using #4411 which keeps the logic to throw errors when a Camel dependency is not part of the catalog


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] christophd commented on pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#issuecomment-1560538260

   thanks @tadayosi for your comments.
   
   > all valid dependencies for camel-k should be listed in the catalog
   
   +1 but recent history has shown that the catalog may be incomplete (see https://github.com/apache/camel-k-runtime/issues/1029 which fixed that)
   
   > Doesn't trying to use camel-resilience4j directly mean running a library not yet ready for Quarkus
   
   I think the raw Camel component is not optimized for Quarkus but still is able to run isn't it? 
   
   Of course using the Camel Quarkus extensions should be the first choice and the catalog makes sure to use those extensions once they are listed. But we should not fail when the user explicitly uses a non-listed Camel dependency. This would then prevent any customized Camel components and other things that are not listed. In the past I have also been requesting the error based on the catalog checks but today I think this is too restrictive. 


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] lburgazzoli commented on pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "lburgazzoli (via GitHub)" <gi...@apache.org>.
lburgazzoli commented on PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#issuecomment-1560716279

   > @lburgazzoli sounds good. How do we identify those banned dependencies in the first place?
   
   I think we need to ask the quarkus team, @jamesnetherton @ppalaga  any hint ?


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] christophd commented on pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#issuecomment-1557595887

   Fixes #463 


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] christophd commented on a diff in pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on code in PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#discussion_r1201680120


##########
pkg/util/camel/camel_dependencies.go:
##########
@@ -49,57 +50,49 @@ func NormalizeDependency(dependency string) string {
 	return newDep
 }
 
-type Output interface {
-	OutOrStdout() io.Writer
-	ErrOrStderr() io.Writer
-}
-
 // ValidateDependencies validates dependencies against Camel catalog.
 // It only shows warning and does not throw error in case the Catalog is just not complete
 // and we don't want to let it stop the process.
-func ValidateDependencies(catalog *RuntimeCatalog, dependencies []string, out Output) {
-	for _, d := range dependencies {
-		ValidateDependency(catalog, d, out)
+func ValidateDependencies(catalog *RuntimeCatalog, dependencies []string, logger log.Logger) {
+	for _, dependency := range dependencies {
+		s := strings.Builder{}
+		ValidateDependency(catalog, dependency, &s)
+
+		if s.Len() > 0 {
+			logger.Info(strings.TrimSpace(s.String()))
+		}
 	}
 }
 
 // ValidateDependency validates a dependency against Camel catalog.
 // It only shows warning and does not throw error in case the Catalog is just not complete
 // and we don't want to let it stop the process.
-func ValidateDependency(catalog *RuntimeCatalog, dependency string, out Output) {
+func ValidateDependency(catalog *RuntimeCatalog, dependency string, out io.Writer) {
+	var artifact string
 	switch {
 	case strings.HasPrefix(dependency, "camel:"):
-		artifact := strings.TrimPrefix(dependency, "camel:")
-		if ok := catalog.IsValidArtifact(artifact); !ok {
-			fmt.Fprintf(out.ErrOrStderr(), "Warning: dependency %s not found in Camel catalog\n", dependency)

Review Comment:
   things are a bit different here. the function that you mention that prints to the stderr has not been used before. instead there was another function in usage that raised the error as part of the integration phase. I have removed this latter function and changed the logic of the unused function to the new logic. In fact we do not have stderr access as this function is run as part of the traits execution. kamel run command is completed already at this point.



-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] christophd commented on pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#issuecomment-1558875719

   @squakez E2E test did fail again 😵‍💫. this is the 2nd try to fix it. I also added some words to the dependencies page in the documentation


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] squakez commented on pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#issuecomment-1558975863

   > @squakez E2E test did fail again face_with_spiral_eyes. this is the 2nd try to fix it. I also added some words to the dependencies page in the documentation
   
   Yes, [1] it's failing with:
   ```
   ❌ TestKamelCLIRun (16m26.42s)
         run_test.go:147: 
             Timed out after 900.000s.
             Expected
                 <v1.PodPhase>: 
             to equal
                 <v1.PodPhase>: Running
   ```
   IIUC the test want to run an integration, even when a `camel:missing-dep` is not existing, is it? or the goal is to have an existing camel component that is not in the catalog (but which dependency exists?). In the latter case, you can check any camel component which is not supported by Camel Quarkus and use it instead of `camel-main` which may try to run the Integration as it was a Camel Main runtime.
   [1] https://github.com/apache/camel-k/actions/runs/5054316425/jobs/9069142273


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] claudio4j commented on pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "claudio4j (via GitHub)" <gi...@apache.org>.
claudio4j commented on PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#issuecomment-1561189122

   > for dependencies not listed in the catalog is also not working because the raw Camel version is not resolvable in the generated Maven builder project. I see errors such as 'dependencies.dependency.version' for org.apache.camel:camel-resilience4j:jar is missing because there is no bom that resolves the raw Camel dependency.
   
   In this case the `<version>` should be also added as part of the dependency, as the quarkus platform bom cannot resolve it.


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] lburgazzoli commented on pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "lburgazzoli (via GitHub)" <gi...@apache.org>.
lburgazzoli commented on PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#issuecomment-1560618322

   > thanks @tadayosi for your comments.
   > 
   > > all valid dependencies for camel-k should be listed in the catalog
   > 
   > +1 but recent history has shown that the catalog may be incomplete (see [apache/camel-k-runtime#1029](https://github.com/apache/camel-k-runtime/issues/1029) which fixed that)
   > 
   > > Doesn't trying to use camel-resilience4j directly mean running a library not yet ready for Quarkus
   > 
   > I think the raw Camel component is not optimized for Quarkus but still is able to run isn't it?
   > 
   > Of course using the Camel Quarkus extensions should be the first choice and the catalog makes sure to use those extensions once they are listed. But we should not fail when the user explicitly uses a non-listed Camel dependency. This would then prevent any customized Camel components and other things that are not listed. In the past I have also been requesting the error based on the catalog checks but today I think this is too restrictive.
   
   I think we should made a distinction between:
   1. not optimized for the runtime or not known by the runtime 
   2. not supported by the runtime. 
   
   About case 1, we should allow the user to add such dependency as it could be a component/extension non part of the camel distribution but still a valid component/extensions. However in such case I think the user should define the component using a maven coordinate and the component should not use the ´camel.apache.org` as artifact group  which should bypass the catalog check (at least this is what I recall). 
   About case 2, I think the catalog can also include a list of banned dependencies so if we know ahead of time that a specific dependency can cause harm to the runtime, then we can either fail or ad a warning to the integration CR.
   
   Does this make any sense ?
   


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] christophd commented on pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#issuecomment-1560646758

   @lburgazzoli sounds good. How do we identify those banned dependencies in the first place?


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] ppalaga commented on pull request #4402: fix(#4361): Avoid errors when components not available in Camel catalog

Posted by "ppalaga (via GitHub)" <gi...@apache.org>.
ppalaga commented on PR #4402:
URL: https://github.com/apache/camel-k/pull/4402#issuecomment-1568083168

   > what should be the proper version value?
   
   For the record, the Camel version is present in Camel Quarkus catalog under `metadata` (which is a free form map):
   
   ```
   {
     "component": {
       "kind": "component",
       "name": "amqp",
       "title": "AMQP",
   ...
       "metadata": { "quarkusVersion": "3.1.0.CR1", "camelArtifact": "org.apache.camel:camel-amqp", "camelVersion": "4.0.0-M3" },
   ...
   ```
   
   Of course, there is no catalog entry for the missing components, but the `camelVersion` is the same for all components (at least in the community). So you could take the version from some foundation component, such as `direct` and use it for all missing camel jars. 


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org