Uploaded image for project: 'Common Controller SDK'
  1. Common Controller SDK
  2. CCSDK-3225

CDS Component not handling REST Output for PUT/DELETE where REST is successful without a response data

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • Montreal Release
    • Istanbul Release
    • None
    • None

      Kapil(3:20:11 PM): ok

      there is another issue I am seeing there is -> if a component is not producing any output -> Example it's doing http put -> then there will not be aything to set as response in context.. -> there service is failing to get response and setting step to failure
      Kapil(3:20:17 PM): thought it's a success step
      Yuriy(3:21:03 PM): oh really
      Kapil(3:21:09 PM): yes
      Kapil(3:21:21 PM): I was checking on something today and found that
      Yuriy(3:21:24 PM): i does work for --> resource allocator
      Yuriy(3:21:30 PM): maybe other components its not working
      Kapil(3:21:40 PM): val response = genericPutPatchPostRequest(
      webclientService,
      requestPutUrl.textValue(),
      RestconfRequestType.PUT,
      putPayload.toString(),
      mutableMapOf("Content-Type" to "application/json")
      )
      val responseOutput = response.body.asJsonType()
      setAttribute(ComponentScriptExecutor.ATTRIBUTE_RESPONSE_DATA, responseOutput)

      Kapil(3:21:56 PM): I had to still right the response to ComponentScriptExecutor.ATTRIBUTE_RESPONSE_DATA
      Kapil(3:21:58 PM): then it worked
      Kapil(3:22:10 PM): but I was calling a PUT -> which will not produce any response
      Yuriy(3:22:26 PM): PUT or Delete
      Yuriy(3:22:27 PM): right
      Kapil(3:23:00 PM): yeh it can be anything but is a component is made to not set ComponentScriptExecutor.ATTRIBUTE_RESPONSE_DATA
      but it is setting ComponentScriptExecutor.ATTRIBUTE_STATUS -> that should be enough !
      Kapil(3:23:58 PM): sometimes component doesn't want to set the response data in ComponentScriptExecutor.ATTRIBUTE_RESPONSE_DATA even if it has it.. in that case step is always being marked failure !
      Kapil(3:24:04 PM): case is not handled properly !
      Yuriy(3:24:15 PM): yep, that should be fixed

            ks220y KAPIL SINGAL
            ym9479 ym9479
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: