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

Fix: Fail to run route with toD #4972 #4976

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

claudio4j
Copy link
Contributor

Fix #4972

Release Note

Enhancement of the dependency calculation for dynamic endpoints

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.

LGTM, however I am not understanding how this is solving the issue. I mean, we still will need to include the component dependency manually, right?

@claudio4j
Copy link
Contributor Author

LGTM, however I am not understanding how this is solving the issue.

This fix only the parsing bug, as the toD notation allows a flexible placeholder, so instead to check only the ending of the string, it if the remaining scheme contains the ending placeholder.

I mean, we still will need to include the component dependency manually, right?

Yes, the camel-k dependency resolver is mostly a regexp parsing the strings, which in the case of the placeholder is not know at this time, only when the code is parsed by camel-core (after camel-k operator build).

@claudio4j claudio4j force-pushed the fix_propplaceholder_parse branch from 279ae51 to 53d3bbe Compare December 7, 2023 22:31
@MotaOcimar
Copy link
Contributor

Hi @squakez! Thanks for reviewing!

The full discussion of the issue is at this Zulip topic.

But in short, the following route doesn't work even if we specify the camel-http dependency:

<route id="start-route">
    <from uri="timer:my-timer"/>
    <setBody>
        <constant>Hello!</constant>
    </setBody>
    <toD uri="{{endpoint}}/test"/>
</route>

If we remove /test from the path it works, exemplifying the parsing bug.

I'm hoping it will be approved until the next release 🙏

@claudio4j
Copy link
Contributor Author

The only CI error check is fixed by #4957

@claudio4j claudio4j merged commit 137b7ed into apache:main Dec 11, 2023
15 of 16 checks passed
@claudio4j claudio4j deleted the fix_propplaceholder_parse branch December 20, 2023 13:55
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.

Fail to run route with toD
4 participants