Closed ctessier closed 1 year ago
What does Gravitee need in the JSON file to know it is the same API and the same plan ?
I tried adding the id
property, but it still create new plans.
From v3.10.8, the import tries to delete my existing plans but fails because it has subscriptions.
Why doesn't it detect that it is the same plan and it must simply be updated?
A little help would be much appreciated! Thank you :smiley:
Hi @ctessier
We've experienced some plans duplications issue in 3.10.x that has been fixed now. I strongly suggest to upgrade to 3.18.x since we've been introducing crossId
from 3.16 in order to identify easily apis, pages and plans accros several environments.
Let me know if you need further info
:collision: Describe the bug
Since I migrated from v3.9. to v3.10, when I import my APIs, new plans are created instead of the current ones being updated. I didn't change my import script. It performs a cURL PUT request on the management API
/apis/{api.id}/import
with a JSON definition provided. In my the JSON definitions (created a while ago from exports), I don't have ids. Only the following properties for the plans:name
description
validation
security
securityDefinition
type
status
order
characteristics
paths
excluded_groups
comment_required
I checked the changelog and the upgrade guide but I couldn't find anything that could explain this new behaviour.
Any idea if this is a known bug which is fixed in a more recent version? I am trying to perform a step by step upgrade but I don't want to move on until I know what causes this.
:sunrise_over_mountains: To Reproduce
Steps to reproduce the behaviour:
/apis/{api.id}/import
endpoint or through the UI:rainbow: Expected behaviour
Same as with v3.9. Making a PUT request of a JSON API definition on the
/apis/{api.id}/import
endpoint updates the API and its existing plans.Current behaviour
Since v3.10.0, making a PUT request of a JSON API definition on the
/apis/{api.id}/import
endpoint updates the API but create new plans (generating duplicates).:movie_camera: Useful information
I have tested on v3.10.0 and v3.11.1 where I can reproduce the issue. It happens also when using the export/import feature from the UI.
:computer: Desktop:
Please complete the following information:
graviteeio/apim-management-api:3.10.0
:warning: Potential impacts
Which other features may be impacted by this fix. This could be populated after fix
What are the impacted versions?
v3.10.0 and above
:link: Dependencies
Link a story or other related things...