-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API are getting deleted in higher enviornments #410
Comments
|
I remember seeing the same question being brought up recently in another issue. Please check the other issues as your question has been answered there. Take a look at both the open and closed issues please. |
I saw previous issues and read all the documentation. Is there a way to extract only a single API and migrate to higher environments with out deleting old APIs ? Why does the pipeline delete the existing API ? It does not make sense to me. |
The publisher picks up the changes in your last commit. If you only modified a single API then that is the only change that will be published. Nothing should be deleted if you didn't delete explicitly. Something else most be going on. |
Thank you for the reply. I have another question. Is It recomended to have branch for each APIM environments ? I mean, the namedvalues and many other values are specific to environments. How to store envirnment specific metadata in git repo ? What is the best way to store the API metdata ?(Single main branch or multiple branches followed by one main branch) |
When we built APIops, we envisioned that you would have one set of artifacts, which usually represent the artifacts of the lowest APIm environment, and then, as you promote to higher environments, you would override using environment specific configuration files (configuration.EnV.yaml. If you follow that set up, then you would need a single git repository, which would store the artifacts of the lowest environment. Remember that at the end of the day, you are at liberty to extract from any git environment to any git repository as you see fit. |
Just to add, it's not recommended that you have multiple git repositories with artifacts, extracted from different environments as it would make it hard to keep them in sync. Instead, as I mentioned before, it is recommended to extract from the lowest environment and then start using the apiops to promote across higher environments while overriding using your environment specific configuration files. |
When I extract an API or a named value using extractor config, Why it is proposing to delete all other api and all named values ? If this is a feature, How should we promote only required changes to QA and PROD ? |
My last commit was modifying the extractor.yaml to extract only one namedvalue. When I ran extractor tool, It is propsing to delete all extsting namedvalues . configuration.extractor.yaml
|
@guythetechie any thoughts on this? |
To fix this, We are doing currently the below steps.
Could you provide any best approach , so that extractor pipeline should include all old files and add new files which are mentioned in the extractor.yaml file. |
In this case you may want to temporarily use gitignore to ignore api2 in this example. As for the extractor its behaving as expected as the moment you include select pais in the configuration.extractor.yaml file you are telling the tool that the only apis you are interested in are those on the list. Also check issue #401 for more information |
Release version
all version
Describe the bug
Generally speaking, how could we support a scenario in which in dev 2 apis (api-1, api-2) were updated but only 1 (api-1) needs to be promoted?
I thought by using the config extract.
So I put api-1 in the config extract and I saw I could "extract" one specific api, api-1, and create PR-A.
Now, my prod apim is already in place and tracked in the git repository. When I look to PR-A this is proposing to delete all the other Apis (which are missing in the branch created by the run - extract pipeline) and update api-1. If I understand this correctly, this will give me in the end a prod apim with api-1 updated and all the other ones deleted.
What I would have expected was to keep all the other apis and update api-1. I hope I made myself clear.
Expected behavior
Only selective api should be deployed to higher environments.
Actual behavior
API are getting deleted in higher enviornments
Reproduction Steps
Generally speaking, how could we support a scenario in which in dev 2 apis (api-1, api-2) were updated but only 1 (api-1) needs to be promoted?
I thought by using the config extract.
So I put api-1 in the config extract and I saw I could "extract" one specific api, api-1, and create PR-A.
Now, my prod apim is already in place and tracked in the git repository. When I look to PR-A this is proposing to delete all the other Apis (which are missing in the branch created by the run - extract pipeline) and update api-1. If I understand this correctly, this will give me in the end a prod apim with api-1 updated and all the other ones deleted.
What I would have expected was to keep all the other apis and update api-1. I hope I made myself clear.
The text was updated successfully, but these errors were encountered: