Skip to content
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

Raise error when dependency could not be resolved via CamelCatalog #3449

Closed
christophd opened this issue Jul 14, 2022 · 7 comments · Fixed by #3571
Closed

Raise error when dependency could not be resolved via CamelCatalog #3449

christophd opened this issue Jul 14, 2022 · 7 comments · Fixed by #3571
Assignees
Labels
kind/feature New feature or request
Milestone

Comments

@christophd
Copy link
Contributor

The Camel K operator tries to resolve dependencies for a given integration by having a look at the source code of the integration (e.g. by looking at the used Camel route URIs from('componentA:foo').to('componentB:bar')).

In this process the operator tries to resolve the dependency via the given CamelCatalog.

We should raise build errors when such a dependency is not resolvable with the given CamelCatalog. At the moment the dependency is left unresolved causing runtime errors when the integration is running (due to missing artifact in the runtime classpath).

The integration should be put to error phase as a result.

@squakez
Copy link
Contributor

squakez commented Jul 14, 2022

Relates #3127

@squakez squakez added the kind/feature New feature or request label Aug 9, 2022
@tadayosi
Copy link
Member

Can we assume that every available component is really provided in the Camel catalog? For instance, camel-quarkus-management is not listed in the Camel catalog 1.13.0. I'm concerned that if we throw errors and reject building it if a dependency is not listed in the catalog we might end up rejecting some projects that are in fact valid in terms of dependencies.

@squakez
Copy link
Contributor

squakez commented Aug 22, 2022

I think it should not be related to dependencies but as mentioned in #3127 to capabilities/components.

@tadayosi
Copy link
Member

@christophd @squakez BTW, I noticed that if we implement this strict guard on components using catalog, users won't be able to use custom components or renaming of existing components unless we provide a way for the users to extend the catalog. Do we support such use cases right now?

@squakez
Copy link
Contributor

squakez commented Aug 25, 2022

I am not sure we do allow any extension, as everything should be present in Camel Quarkus as well. @astefanutti do you recall if we had any extension mechanism in place?

@claudio4j
Copy link
Contributor

It seems to me there should be a parameter of kamel run --verify-deps=<true|false> to allow the integration to run and provide feedback to the user in the case the integrations uses a dependency not in the catalog but is a resolvable one.

@tadayosi
Copy link
Member

tadayosi commented Sep 9, 2022

@claudio4j FYI there is kamel local inspect <integration-file> that does similar check but locally. And along with #3127 I plan to change the command so that it shows warnings when there are invalid/unavailable dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants