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

Update non-working examples in Kamelet Catalog docs #897

Merged
merged 1 commit into from
Apr 26, 2022

Conversation

claudio4j
Copy link
Contributor

Fix #866

  • There are some generated kamelet bindings are invalid, the auto
    generation cannot resolve all the required steps, so there is
    a need to create it manually
  • Add a comment marker in kamelet binding examples for the auto
    generation to skip its creation
  • The doc generation source the kamelet binding example file when it
    doesn't auto generate the example
  • the camel-kamelets directory is hardcoded in kamelets.js as it is
    assumed this generation mechanism already assumes this directory

@claudio4j claudio4j marked this pull request as draft April 25, 2022 03:18
@claudio4j
Copy link
Contributor Author

I would like a review about this approach, if everything is ok, I can work to fix the remaining non working kamelet binding examples.

Fix apache#866

* There are some generated kamelet bindings are invalid, the auto
  generation cannot resolve all the required steps, so there is
  a need to create it manually
* Add a comment marker in kamelet binding examples for the auto
  generation to skip its creation
* The doc generation source the kamelet binding example file when it
  doesn't auto generate the example
* the camel-kamelets directory is hardcoded in kamelets.js as it is
  assumed this generation mechanism already assumes this directory
@claudio4j
Copy link
Contributor Author

@oscerd @squakez this is ready for review.

@oscerd oscerd merged commit 7bca19b into apache:main Apr 26, 2022
@oscerd
Copy link
Contributor

oscerd commented Apr 26, 2022

Thanks

@claudio4j claudio4j deleted the fix_klb_gen branch April 26, 2022 12:40
@@ -16,6 +16,8 @@
*/

const util = require('camel-website-util')
const fs = require('fs')
const yaml = require('js-yaml');
Copy link
Member

Choose a reason for hiding this comment

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

If you're importing here you also need to adjust package.json in camel-website, i.e. add js-yaml to devDependencies. You also need to make sure that the js-yaml is placed in the PnP cache. Or avoid using js-yaml or any non-managed dependency.

I can see the net positive of having them versioned within the module. But I don't see a way for them to be tested, debugged or linted here. So until this is figured out I can't recommend doing this here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have to revert? The website build is stuck

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ops, I will push the js-yaml dependency change to camel-website. Just forgot it.

@claudio4j
Copy link
Contributor Author

apache/camel-website#835

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.

override example template for these action kamelets
3 participants