Skip to content

Update developer Keys error when they already exists #764

Open
@gabrieldiasabreu

Description

@gabrieldiasabreu

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"
      }
    ]
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions