Update developer Keys error when they already exists
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 221
- Forks
- 174
- PR merge metrics
- No merged PRs in 30d
Description
I noticed that in sackmesser deploy when we do incremental deploy of the configs folder. ApiProducts, developers, and developerApps that already exists gets updated, but, if the key already exists it throws an error and stop the whole deployment.
Is this an expected behavior or should it be similar to the other resources? if it's expected, Is there a feature to bypass these error and keep the deployment? Do you think it makes sense to add this feature?
My goal is to be able to do incremental migrations with the sackmesser deploy command from apigee edge to apigee X.
Example
**************************
POST https://url/v1/organizations/apigee-org/developers/developerEmail/apps/appname/keys/create
accept-encoding: [gzip]
authorization: [Bearer [Not shown in log]
x-goog-api-format-version: 2
content-type: application/json
[Request body]
{"consumerKey":"Key","consumerSecret":"secret"}
Apigee call failed 409 Conflict
{
"error": {
"code": 409,
"message": "ConsumerKey already exists",
"status": "ABORTED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.PreconditionFailure",
"violations": [
{
"type": "keymanagement.service.ConsumerKeyAlreadyExists",
"subject": "[2002:a05:6148:86a1:b0:578:9331:5126]:4001:uycjd5-20020a0574147d0500b0004b11ec048b:9801:943860:291277",
"description": "ConsumerKey already exists"
}
]
},
{
"@type": "type.googleapis.com/google.rpc.RequestInfo",
"requestId": "7850316936529017734"
}
]
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the sackmesser deploy incremental migration for the configs folder and inspect the developer app key creation request shown in the issue. Clarify whether existing consumer keys should be skipped or updated, and define done as a migration that handles already-existing keys without stopping the deployment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100