api-manager icon indicating copy to clipboard operation
api-manager copied to clipboard

API thumbnail is not getting updated when doing an API import --update

Open 01oseluiz opened this issue 1 year ago • 1 comments

Description

When exporting an API with thumbnail image the image is not getting archived. Hence at import using apictl the thumbnail image is not getting reflected in the imported environment.

Steps to Reproduce

  1. Add an image thumbnail to an API through the publisher portal.
  2. Export that API using: apictl export api -n "$API_NAME" -v "$API_VERSION" -e $ENV --latest.
  3. Unzip the file. The thumbnail image is not present anywere.

(step 1) image

(step 2 and 3) image

Affected Component

APICTL

Version

apim 4.3.0; apictl 4.3.0

Environment Details (with versions)

ubuntu 22

Relevant Log Output

No response

Related Issues

https://github.com/wso2/product-apim-tooling/issues/216

At this issue seems that exporting with thumbnail (.jpg, .png, ...) was working

Suggested Labels

No response

01oseluiz avatar Jul 12 '24 18:07 01oseluiz

RCA

API thumbnail is not getting exported when the --latest tag is used with the export command. However, this behavior is only noticed when the thumbnail uploading was done post-deployment. Thereby, the deployed API had no knowledge on the thumbnail update that was made to the current API.

In order to resolve this issue, we have replaced the revisioned version with the current API state when it comes to the thumbnail extraction flow. The same applies to API products as well. This PR fixes the issue for both APIs and API Products.

ashera96 avatar Oct 11 '24 11:10 ashera96