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

[Enrich]Exchanges in bottom route tracing is missing #318

Closed
Hooghof opened this issue Nov 22, 2024 · 6 comments
Closed

[Enrich]Exchanges in bottom route tracing is missing #318

Hooghof opened this issue Nov 22, 2024 · 6 comments
Assignees
Labels
accepted bug Something isn't working
Milestone

Comments

@Hooghof
Copy link

Hooghof commented Nov 22, 2024

In the tracing, the steps in the bottom route of the enrich component are missing.

This finding follows after #307

Test case on Development
Tenant: Regression Tests
Flow: EnrichArchiveWithTextBody

Image
Image

@Hooghof Hooghof added the bug Something isn't working label Nov 22, 2024
@brunovg brunovg self-assigned this Nov 22, 2024
@brunovg brunovg added this to the 5.0.2 milestone Nov 22, 2024
@brunovg brunovg removed their assignment Nov 22, 2024
@brunovg
Copy link
Collaborator

brunovg commented Nov 22, 2024

This problem was already on 4.14.9
Postpone to 4.17.3

@brunovg brunovg self-assigned this Nov 25, 2024
@brunovg
Copy link
Collaborator

brunovg commented Dec 6, 2024

From what I can see, on this scenario, the generated CamelContext is not fully correct.
One thing that I spot was the bottom branch, after the FTP, that route is not reachable on any point on the CamelContext.
Another main difference, is the use of a pollEnrich directly, without using an Enrich on a previous route.
@skin27 let's talk about this next week, maybe you can spot the main problem more quickly than I

@skin27 skin27 assigned skin27 and unassigned brunovg Dec 9, 2024
@Hooghof
Copy link
Author

Hooghof commented Dec 19, 2024

All exchanges in the transaction are visible now.

The flow should produce a zip file which contains the files enrich1.txt and enrich3.txt, but it produces a zip file with the files enrich1.txt and an inner zip file with the name enrich1.zip. The file enrich1.zip has the 2 text files enrich1.txt and enrich3.txt in it.

After the aggregate component, the header CamelFileName has the value enrich1.zip. See version 43 of the test flow.

@brunovg
Copy link
Collaborator

brunovg commented Dec 19, 2024

It seems that the last change we made on Enrich component (calling a extra route with the pollEnrich from an enrich), is causing this issue.

    <route id="2634551c-5244-4930-97b3-bcde9ae0f057">
        <from uri="direct:672b994ec6210718c600033e_test_25f89152-25eb-46c4-86b9-9d83629b9d0c_split" />
        <setProperty propertyName="Enrich-Type">
            <simple>application/zip</simple>
        </setProperty>
        <setProperty propertyName="Error-Route">
            <simple>true</simple>
        </setProperty>
        <enrich strategyRef="CurrentEnrichStrategy">
            <simple>
                direct:672b994ec6210718c600033e_test_2634551c-5244-4930-97b3-bcde9ae0f057_BottomCenter</simple>
        </enrich>
        <to uri="direct:672b994ec6210718c600033e_test_2634551c-5244-4930-97b3-bcde9ae0f057" />
    </route>
    ...
    <route id="88f6c2ed-5136-471b-94c9-2a7e145ee622">
        <from
            uri="direct:672b994ec6210718c600033e_test_2634551c-5244-4930-97b3-bcde9ae0f057_BottomCenter" />
        <choice>
            <when>
                <simple>${exchangeProperty.Enrich-Type} == null</simple>
                <setProperty propertyName="Enrich-Type">
                    <simple>application/override</simple>
                </setProperty>
            </when>
        </choice>
        <pollEnrich strategyRef="CurrentEnrichStrategy" timeout="5000">
            <simple>
                sftp:[email protected]:2022//development/Regression
                Tests/test/in?autoCreate=true&amp;delete=false&amp;recursive=false&amp;fileName=enrich3.txt&amp;passiveMode=true&amp;disconnect=true&amp;throwExceptionOnConnectFailed=true&amp;consumer.bridgeErrorHandler=true&amp;password=RAW(Unmwrnf4bM3RUwoG)&amp;binary=true&amp;moveFailed=RAW(.error)&amp;serverHostKeys=ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256,ssh-rsa&amp;publicKeyAcceptedAlgorithms=ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256,ssh-rsa&amp;keyExchangeProtocols=curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group1-sha1,diffie-hellman-group14-sha1</simple>
        </pollEnrich>
        <to uri="direct:672b994ec6210718c600033e_test_88f6c2ed-5136-471b-94c9-2a7e145ee622" />
    </route>

@brunovg brunovg self-assigned this Jan 7, 2025
@brunovg brunovg added on hold and removed on hold labels Jan 15, 2025
@brunovg
Copy link
Collaborator

brunovg commented Jan 15, 2025

We found out that when using Queues, the CamelFileName header was not propagated by default to the next route (changed on 4.8.0).

@Hooghof
Copy link
Author

Hooghof commented Jan 16, 2025

Test findings

  1. The first transaction gives a corrupt zip file
  2. The second transactions delivers a zip file that can be opened
  3. The second zip file contains 3 files: enrich1.txt, enrich2.txt and enrich.zip. The last one contains enrich1.txt, enrich2.txt and enrich3.txt. The included enrich.zip is basically the expected zip file, which should be the response of the flow

Enrich_20250116090323016.zip
Enrich_20250116090621535.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants