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

OpenAPI & Telemetry traits skipped for sourceless #5680

Closed
hernanDatgDev opened this issue Jul 1, 2024 · 5 comments
Closed

OpenAPI & Telemetry traits skipped for sourceless #5680

hernanDatgDev opened this issue Jul 1, 2024 · 5 comments
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@hernanDatgDev
Copy link
Contributor

What happened?

OpenAPI & Telemetry traits are not applied as expected when using sourceless integrations. This is believed to be a regression after a previous patch. The following are 2 scenarios describing use of these two traits with sourceless integrations as well as the versions of camel-k that were used for testing.

Scenario 1:

Run a sourceless integration with openApi and telemetry traits.
An application.properties file is created with relevant openAPI and telemetry fields
File is mounted in the pod
Works as expected in v2.2.0 and v2.3.0
Fails in v2.3.2, v2.3.3, v2.4.0-SNAPSHOT:
application.properties is mounted but only has openAPI fields, not the telemetry fields.

Scenario 2: (sourceless image refactored to include openAPI spec and openAPI trait not needed)

Run a sourceless integration with telemetry trait, not the openAPI trait
An application.properties file is created with relevant Telemetry fields
File is mounted in the pod
Works as expected in v2.2.0 and v2.3.0
Fails in v2.3.2, v2.3.3, v2.4.0-SNAPSHOT:
application.properties includes relevant Telemetry fields but is not mounted

Steps to reproduce

Described above ^

Relevant log output

No response

Camel K version

2.2.x, 2.3.x, 2.4.0-SNAPSHOT

@hernanDatgDev hernanDatgDev added the kind/bug Something isn't working label Jul 1, 2024
@hernanDatgDev
Copy link
Contributor Author

@squakez
Copy link
Contributor

squakez commented Jul 2, 2024

Thanks for reporting. Feel free to have a look if you can. We are tentatively going to add this before releasing 2.4 at the end of the month. Thanks.

@squakez squakez added this to the 2.4.0 milestone Jul 2, 2024
@mdebarros
Copy link
Contributor

mdebarros commented Jul 3, 2024

There is also a 3rd issue observed on 2.3.2.

Scenario 3. When enabling both Telemetry and OpenAPI traits simultaneously.
The application.properties only contains the OpenAPI properties, meaning that the Telemetry properties are being dropped and not merged into the final application.properties. However, the application.properties are correctly mounted into the Integration pod.

@hernanDatgDev were you able to observe the same behaviour on > 2.3.2?

@gansheer gansheer self-assigned this Jul 9, 2024
@hernanDatgDev
Copy link
Contributor Author

hernanDatgDev commented Jul 12, 2024

@gansheer I didn't realize you assigned this to yourself, I apologize. I've been looking at this and it seems that the isForcefullyEnabled() approach from #5524 also works when applied to the Telemetry trait. I was wondering if this approach might be good enough to apply to other traits that also use an auto feature. As far as Telemetry goes I have this PR(#5693)

@hernanDatgDev
Copy link
Contributor Author

Also it turns out that this regression doesn't actually have anything to do with the openApi trait and it's just a regression of the telemetry trait. When using the telemetry trait w/ a sourceless integration:
The camel catalog is available until the integration reaches the deploying stage, after which the catalog from the environment variable is nil. Because of this, down the road the application.properties that had previously been configured with telemetry fields is overwritten, essentially removing the fields. The configmap (with telemetry removed) is then mounted into the pod without telemetry configuration which is not desired.

@squakez squakez linked a pull request Jul 26, 2024 that will close this issue
@squakez squakez mentioned this issue Jul 26, 2024
squakez added a commit to squakez/camel-k that referenced this issue Jul 26, 2024
squakez added a commit to squakez/camel-k that referenced this issue Jul 26, 2024
squakez added a commit to squakez/camel-k that referenced this issue Jul 26, 2024
squakez added a commit that referenced this issue Jul 29, 2024
@squakez squakez closed this as completed Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants