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

Deprecating parameters #1330

Closed
manstis opened this issue Mar 2, 2023 · 5 comments
Closed

Deprecating parameters #1330

manstis opened this issue Mar 2, 2023 · 5 comments

Comments

@manstis
Copy link

manstis commented Mar 2, 2023

By way of a real example, let me explain the issue:

The Camel Slack Component has deprecated some Query Parameters, namely iconEmoji, iconUrl and username.

Ideally the corresponding Slack Sink Kamelet needs the parameters to be marked as deprecated too so Users are aware that they may be removed in a future release.

However the underlying Kamelet.KameletSpec.JSONSCHEMAPROPS.JSONSCHEMAPROP does not support indicating that a parameter is deprecated.

What can we do?

Add a property to https://camel.apache.org/camel-k/1.12.x/apis/kamelets.html#_camel_apache_org_v1alpha1_JSONSchemaProp

Propose use of an x-descriptor to indicate the parameter is deprecated? What would it be?

Where would we also need to presumably change Kamelet documentation generation to use the new property or x-descriptor?

@oscerd
Copy link
Contributor

oscerd commented Mar 2, 2023

As of today there is no concept of deprecation in Kamelets parameters nor on Kamelets in general. So this would be something completely new.

@manstis
Copy link
Author

manstis commented Mar 2, 2023

Hi @oscerd I realise it's new.

I'm happy to collaborate as best I can; but am likely to need a little direction.

You may have guessed I'm new to Kamelets (and Camel as a whole too) but am eager to be useful.

I assume there's a process and this issue is likely to need discussion and a solution agreed.

If you're happy guiding, I'm happy helping.

@oscerd
Copy link
Contributor

oscerd commented Mar 2, 2023

I'll gather some idea like where to change the documentation generation and the schema. Thanks for helping.

@oscerd
Copy link
Contributor

oscerd commented Mar 2, 2023

This is where the documentation is generated for each Kamelet

https://github.com/apache/camel-kamelets/blob/main/docs/modules/ROOT/examples/js/kamelets.js

While this is the schema for Kamelet CRD

https://github.com/apache/camel-k/blob/main/helm/camel-k/crds/crd-kamelet.yaml#L65

We need to add a deprecated field in the crd for Kamelets, it should be false by default I guess cc @squakez

@manstis
Copy link
Author

manstis commented Mar 3, 2023

See apache/camel-k#4097

I couldn't get the validation to use a local version of camel/v1alpha1/Kamelet for love nor money.

I'll keep trying (I'm learning Go too).

@squakez squakez closed this as completed Mar 6, 2023
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

No branches or pull requests

3 participants