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

Remove usage of deprecated VS Code Didact #97

Merged
merged 2 commits into from
May 23, 2024
Merged

Conversation

tdiesler
Copy link
Contributor

Update generic languages, env, cron

Copy link
Contributor

@squakez squakez left a comment

Choose a reason for hiding this comment

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

Cool cleanup, thanks!

@tdiesler tdiesler force-pushed the ghi56 branch 2 times, most recently from d288129 to 97b694d Compare May 22, 2024 14:02
Copy link
Contributor

@squakez squakez left a comment

Choose a reason for hiding this comment

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

I think you forgot to swith resource-file-xyz examples. You've also removing resources-data files which were used by those examples.

@tdiesler
Copy link
Contributor Author

tdiesler commented May 22, 2024

I think you forgot to swith resource-file-xyz examples. You've also removing resources-data files which were used by those examples.

I removed it because I thought it was deprecated ...

## Configuration Resource file (Camel-K <= 1.12.1)

**These examples only work with a version of  Camel-K <= 1.12.1**

These examples show the different ways you can use **resource files** to configure integrations.

* provide properties from a resource file with `--config`
  * `config-file-route.groovy`

* provide properties from a resource file with `--resource`
* `resource-file-route.groovy`
* `resource-file-location-route.groovy`
* `resource-file-binary-route.groovy`
* `resource-file-base64-route.groovy`

Also when I try it I see ...

$ kamel run --resource file:resources-data.txt resource-file-route.groovy --dev
Error: could not match config or secret configuration as file:resources-data.txt

Are we expecting folks to load that file content in a configmap first?

Also, resources-data is not used in the camel-k/e2e tests (any more) either, but we have three data files for it. It may have slipped through the cracks and for parity we need to resurrect resource-file-xyz testing in both projects.

[camel-k]$ git grep resources-data
Binary file e2e/common/config/files/resources-data.zip matches

@tdiesler
Copy link
Contributor Author

tdiesler commented May 23, 2024

This commit removes resource-file-xyz.groovy route definitions without providing yaml equivalents. This was because none of the tests referenced those groovy files. Perhaps the examples provide close enough testing templates to resurrect resource-file testing.

We don't have --resource file:* (any more), only --resource configmap:* and --resource secret:*

@squakez
Copy link
Contributor

squakez commented May 23, 2024

This commit removes resource-file-xyz.groovy route definitions without providing yaml equivalents. This was because none of the tests referenced those groovy files. Perhaps the examples provide close enough testing templates to resurrect resource-file testing.

We don't have --resource file:* (any more), only --resource configmap:* and --resource secret:*

We don't need to have parity between tests and examples. Examples are typically more oriented to show basic or complex use cases for users. I think in this case we do need to convert the binary and base64 from groovy to yaml and moving also from file to configmap (if no other similar example is already available, of course) as it is a useful demo scenario to show.

@tdiesler
Copy link
Contributor Author

tdiesler commented May 23, 2024

I now migrated and restored all config/resource-file-xyz examples

With resource-file-base64-encoded-route.yaml I'm not sure about. --compression=true does not seem to do anything. The output is plain text as with resource-file-route.yaml

kamel run --dev --resource configmap:my-cm-file --compression=true resource-file-base64-encoded-route.yaml

@tdiesler
Copy link
Contributor Author

This is ready to merge

Copy link
Contributor

@squakez squakez left a comment

Choose a reason for hiding this comment

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

I've just noticed something that would require some attention. We're missing to add some comment line to explain in the same example how to run it. For example, in the groovy example we used to have:


//
// To run this integrations use:
// 
// kubectl create configmap my-cm --from-literal=my-configmap-key="configmap content"
// kamel run --resource configmap:my-cm@/tmp/app/data resource-configmap-location-route.groovy --dev
//

And now we're missing it in the new example. I think we must bring this comment back in the new specific dsl format, of course.

@squakez squakez merged commit dc5382d into apache:main May 23, 2024
@tdiesler tdiesler deleted the ghi56 branch May 24, 2024 07:10
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.

3 participants