-
Notifications
You must be signed in to change notification settings - Fork 20
App-Handling failed on API Re-Creation when org is removed #73
Comments
Also tested same api with no changes in orgs and apps in the existed api . It worked fine and at the end I am left with one api . But if there are changes in orgs and apps , then it is throwing exceptions leaving two apis at the end. This is leading to inconsistent behaviour. Is it possible to fix this asap? |
@hakila, I assume you are running the tool with default-settings for clientAppsMode & clientOrgsMode, both default to "add". Can you confirm this❓ |
In general, there is actually no such thing like a controlled roll-back when something goes wrong. For instance in your case, the permission couldn't be set for that API, hence you see the "work in progress" state. Normally the following should happen: |
scripts/run-swagger-import.sh -a samples/petstore.json -c samples/minimal-config.json -f true I am invoking like this. I am not sure of default-settings for clientAppsMode & clientOrgsMode? How they can be set? |
Just saw the help for the script. Yes , clientAppsMode & clientOrgsMode, both default to "add" |
Okay, in that case I will create an Integration-Test covering your scenario. Let's see if I'm able to reproduce the issue. |
The following must happen in the Test-Case:
Expected behavior: Existing API is re-created and only the smaller set of Orgs & Apps are handled. |
I have created a new Test-Case: UpdateOrgsAndAppsDuringReCreationTestIT.java and with that successfully replicated the problem. |
Glad you were able to reproduce. Also can you give some info on I assume add option is to add new orgs and do not do anything with existing. But in this case, it does not behave like add rather it worked like replace. Please give some information on this. |
Created a dedicated branch actually failing due to that issue: |
Released with version 1.5.3 |
I have api TEST Minimum Stay (Category 06) Rules already defined and published. It has orgs ATP_ATP_Org, X91_91_Org,ATP_CUS_Org and Apps ATP_ATP_Apps, X91_91_App,ATP_CUS_App. But i could not get the image due to bug in 1.5.1.
Now I tried the same API to upload image with 1.5.2 release. In the the cofig file , I have everything same except the orgs and apps. ATP_ATP_Org, X91_91_Org .ATP_ATP_Apps, X91_91_App . If you notice, I dont have ATP_CUS_Org, ATP_CUS_App. I expected the api that was existed before is updated with latest orgs (ATP_ATP_Org, X91_91_Org) and apps (ATP_ATP_Apps, X91_91_App) and with image uploaded.
It seems it created new api with same name and path but failed with attached error.
If you see the attached log
2938 INFO APIChangeState| Changed property: applications[Desired: '[[ATP_ATP_Apps], [X91_91_App]]' vs Actual: '[[X91_91_App], [ATP_CUS_App], [ATP_ATP_Apps]]']
Desired state is correct. But when applying
6101 INFO APIManagerAdapter| Creating API-Access for the following apps: '[[X91_91_App], [ATP_CUS_App], [ATP_ATP_Apps]]'
Seems there is inconsistency here. As it failed with exception, I assume it could not deleted the old api leaving two apis at the end. Correct me if I am wrong.
1.5.2 img test issue.txt
1.5.2 img test issue.txt
1.5.2 img test issue.txt
The text was updated successfully, but these errors were encountered: