Informatievlaanderen / VSDS-Linked-Data-Interactions

https://informatievlaanderen.github.io/VSDS-Linked-Data-Interactions/
European Union Public License 1.2
4 stars 6 forks source link

LdesClientRunner FAILURE: java.lang.UnsupportedOperationException: Cannot handle response 429 of TreeNodeRequest #176

Closed xdxxxdx closed 1 year ago

xdxxxdx commented 1 year ago

Prerequisites:

The version is : LDI_ORCHESTRATOR_TAG=20230407T130529 I am trying to configure LDES-Client to replicate the LDES stream from the endpoint:https://apim-iow-apimanagement.azure-api.net/ldes/water-quality-observations-by-time

The configuration in the ldio-workflow is:

server:
  port: 8080
orchestrator:
  pipelines:
    - name: LDES-to-server-pipeline
      description: "This pipeline uses an LDES client to read an existing LDES and send the members as N-Quads to a LDES Server"
      input:
        name: be.vlaanderen.informatievlaanderen.ldes.ldi.client.LdioLdesClient
        config:
          url: https://apim-iow-apimanagement.azure-api.net/ldes/water-quality-observations/water-quality-observations-by-time
          source-format: text/turtle
          retries:
            enabled: true
        adapter:
          name: be.vlaanderen.informatievlaanderen.ldes.ldi.RdfAdapter
      outputs:
        - name: be.vlaanderen.informatievlaanderen.ldes.ldio.LdioHttpOut
          config:
            endpoint: http://ldes-server:8080/water-quality-observations
            content-type: application/n-quads

please see: Idio-workflow.config.yml in Demonstrator2 - iow.zip

Scenario: run:docker compose --user-file .env  up ldio-workflow -d to start the ldio-workflow

Current result:

2023-05-02 20:21:19 2023-05-02T18:21:19.092Z ERROR 1 --- [pool-4-thread-1] b.v.i.ldes.ldio.LdesClientRunner         : LdesClientRunner FAILURE
2023-05-02 20:21:19 
2023-05-02 20:21:19 java.lang.UnsupportedOperationException: Cannot handle response 429 of TreeNodeRequest TreeNodeRequest{treeNodeUrl='https://apim-iow-apimanagement.azure-api.net/ldes/water-quality-observations/water-quality-observations-by-time?pageNumber=59', lang=Lang:Turtle, etag='null'}

failure.txt

Expected result: The LdesClient should be able to handle response 429. A retry should be initiated by LDES Client after a certian periond. (e.g. follow the retry-after header from the response? if there is one )

xdxxxdx commented 1 year ago

To be tested with Sprint 28

xdxxxdx commented 1 year ago

validated on ldes/ldi-orchestrator:1.0.0-SNAPSHOT