Skip to content
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

kvms import aborts after first conflict, should continue #538

Closed
kurtkanaskie opened this issue Sep 13, 2024 · 4 comments · Fixed by #539
Closed

kvms import aborts after first conflict, should continue #538

kurtkanaskie opened this issue Sep 13, 2024 · 4 comments · Fixed by #539

Comments

@kurtkanaskie
Copy link
Collaborator

kurtkanaskie commented Sep 13, 2024

When importing KVM files, the first conflict causes processing of subsequent files.

apigeecli --org=$ORG kvms import --folder=$X_IMPORT_DIR

Would be great if it continued to process all the files.

Use case is migrating from Edge to X.

@kurtkanaskie
Copy link
Collaborator Author

kurtkanaskie commented Sep 13, 2024

Found another issue with this command, given this list of files in the import folder

env__prod__GeoIPFilter__kvmfile__0.json
env__prod__GetLogValues__kvmfile__0.json
env__test__addresses-v1-mock__kvmfile__0.json
env__test__pingstatus-v1__kvmfile__0.json
org__org-config-private__kvmfile__0.json
org__org-config__kvmfile__0.json
proxy__kvm-demo__kvm-demo__kvmfile__0.json
proxy__pingstatus-v1__pingstatus-v1-kvm1__kvmfile__0.json

After import I see

$ apigeecli -t $TOKEN --org=$ORG kvms list
[
	"org-config",
	"org-config-private"
]

$ apigeecli -t $TOKEN --org=$ORG --env=prod kvms list
[
	"GeoIPFilter",
	"GetLogValues",
	"kvm-demo",
	"pingstatus-v1-kvm1"
]

$ apigeecli -t $TOKEN --org=$ORG --env=test kvms list
[
	"addresses-v1-mock",
	"pingstatus-v1"
]

$ apigeecli -t $TOKEN --org=$ORG --proxy=kvm-demo kvms list
[]

$ apigeecli -t $TOKEN --org=$ORG --proxy=pingstatus-v1 kvms list
[]

It's putting the proxy KVMs in prod env.
Works OK when just proxy KVM files in the folder, but not with mixed.

Here's the output from the import command
I starting looking into it and printed out the kvmMetadata values (the KURT prefixed output below)
Note the ScopeType ='ENVIRONMENTS' for the proxy imports

Map name GeoIPFilter, path env__prod__GeoIPFilter__kvmfile__0.json
Map name GetLogValues, path env__prod__GetLogValues__kvmfile__0.json
Map name addresses-v1-mock, path env__test__addresses-v1-mock__kvmfile__0.json
Map name pingstatus-v1, path env__test__pingstatus-v1__kvmfile__0.json
Map name org-config-private, path org__org-config-private__kvmfile__0.json
Map name org-config, path org__org-config__kvmfile__0.json
Map name kvm-demo, path proxy__kvm-demo__kvm-demo__kvmfile__0.json
Map name pingstatus-v1-kvm1, path proxy__pingstatus-v1__pingstatus-v1-kvm1__kvmfile__0.json
Importing org scoped KVMs...
	Creating KVM /Users/kurtkanaskie/work/APIGEEX/edge-x-migration-test/x-import-small-to-test-kvm-continue-on-error/org__org-config-private__kvmfile__0.json
KURT kvmMeta1: org-config-private
KURT kvmMeta2: kvmfile
	Importing entries for /Users/kurtkanaskie/work/APIGEEX/edge-x-migration-test/x-import-small-to-test-kvm-continue-on-error/org__org-config-private__kvmfile__0.json
{
  "error": {
    "code": 404,
    "message": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ORGANIZATION', Organization = 'apigeex-custom-non-prod'},Map=org-config-private) Entry=key1 does not exist",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_entry_doesnt_exist",
            "subject": "[2002:add:cc0e:0:b0:3ee:b490:a695]:4001:blbws5-20020a056693958500b00085a1f18c8f:9805:3837140:39847146",
            "description": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ORGANIZATION', Organization = 'apigeex-custom-non-prod'},Map=org-config-private) Entry=key1 does not exist"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "15886747468471192262"
      }
    ]
  }
}

Creating a new entry in map [org-config-private] with key [key1]
{
  "error": {
    "code": 404,
    "message": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ORGANIZATION', Organization = 'apigeex-custom-non-prod'},Map=org-config-private) Entry=key2 does not exist",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_entry_doesnt_exist",
            "subject": "[2002:add:cdc2:0:b0:3ee:cdc3:946e]:4001:blcbt23-20020a0566939d9700b000845dd6cd2c:9805:1205066:38901793",
            "description": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ORGANIZATION', Organization = 'apigeex-custom-non-prod'},Map=org-config-private) Entry=key2 does not exist"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "6203149492777720161"
      }
    ]
  }
}

Creating a new entry in map [org-config-private] with key [key2]
	Creating KVM /Users/kurtkanaskie/work/APIGEEX/edge-x-migration-test/x-import-small-to-test-kvm-continue-on-error/org__org-config__kvmfile__0.json
KURT kvmMeta1: org-config
KURT kvmMeta2: kvmfile
	Importing entries for /Users/kurtkanaskie/work/APIGEEX/edge-x-migration-test/x-import-small-to-test-kvm-continue-on-error/org__org-config__kvmfile__0.json
{
  "error": {
    "code": 404,
    "message": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ORGANIZATION', Organization = 'apigeex-custom-non-prod'},Map=org-config) Entry=key2 does not exist",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_entry_doesnt_exist",
            "subject": "[2002:add:d64f:0:b0:3ee:d23d:a57a]:4001:blbhh13-20020a056692698d00b0008461845981:9805:3256990:39755935",
            "description": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ORGANIZATION', Organization = 'apigeex-custom-non-prod'},Map=org-config) Entry=key2 does not exist"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "4482127181853773575"
      }
    ]
  }
}

Creating a new entry in map [org-config] with key [key2]
{
  "error": {
    "code": 404,
    "message": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ORGANIZATION', Organization = 'apigeex-custom-non-prod'},Map=org-config) Entry=key1 does not exist",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_entry_doesnt_exist",
            "subject": "[2002:a05:6132:f8d:b0:3f1:2149:dc48]:4001:blbgn14-20020a056692bd8e00b000845b41b12c:9805:2464938:42274361",
            "description": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ORGANIZATION', Organization = 'apigeex-custom-non-prod'},Map=org-config) Entry=key1 does not exist"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "14854524762219750230"
      }
    ]
  }
}

Creating a new entry in map [org-config] with key [key1]
Importing env scoped KVMs...
	Creating KVM /Users/kurtkanaskie/work/APIGEEX/edge-x-migration-test/x-import-small-to-test-kvm-continue-on-error/env__prod__GetLogValues__kvmfile__0.json
KURT kvmMeta1: prod
KURT kvmMeta2: GetLogValues
	Importing entries for /Users/kurtkanaskie/work/APIGEEX/edge-x-migration-test/x-import-small-to-test-kvm-continue-on-error/env__prod__GetLogValues__kvmfile__0.json
{
  "error": {
    "code": 404,
    "message": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=GetLogValues) Entry=logging_host does not exist",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_entry_doesnt_exist",
            "subject": "[2002:add:cc0e:0:b0:3ee:b490:a695]:4001:blk38-20020a056692052600b000845fc9eb0b:9801:261657:14398155",
            "description": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=GetLogValues) Entry=logging_host does not exist"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "16939718170907834289"
      }
    ]
  }
}

Creating a new entry in map [GetLogValues] with key [logging_host]
{
  "error": {
    "code": 404,
    "message": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=GetLogValues) Entry=logging_mask_character does not exist",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_entry_doesnt_exist",
            "subject": "[2002:ab0:9c0c:0:b0:3ee:afe4:60e4]:4001:bll41-20020a056692002900b00085a5905c0f:9805:535974:41433377",
            "description": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=GetLogValues) Entry=logging_mask_character does not exist"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "11422174985657476032"
      }
    ]
  }
}

Creating a new entry in map [GetLogValues] with key [logging_mask_character]
{
  "error": {
    "code": 404,
    "message": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=GetLogValues) Entry=logging_url does not exist",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_entry_doesnt_exist",
            "subject": "[2002:add:dc0c:0:b0:3ee:e310:3739]:4001:blbex23-20020a056692439700b000831475d90e:9805:1575240:41613146",
            "description": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=GetLogValues) Entry=logging_url does not exist"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "13079247208701870432"
      }
    ]
  }
}

Creating a new entry in map [GetLogValues] with key [logging_url]
{
  "error": {
    "code": 404,
    "message": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=GetLogValues) Entry=pingstatus-v1 does not exist",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_entry_doesnt_exist",
            "subject": "[2002:ab0:d0ce:0:b0:3f1:204f:f4b5]:4001:blbej19-20020a056692659300b000845b3154b9:9805:1829471:40234430",
            "description": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=GetLogValues) Entry=pingstatus-v1 does not exist"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "1299505564605240171"
      }
    ]
  }
}

Creating a new entry in map [GetLogValues] with key [pingstatus-v1]
{
  "error": {
    "code": 404,
    "message": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=GetLogValues) Entry=logging_path does not exist",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_entry_doesnt_exist",
            "subject": "[2002:add:cdc2:0:b0:3ee:cdc3:946e]:4001:blj14-20020a056692060e00b00085a6093328:9805:3045174:44077901",
            "description": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=GetLogValues) Entry=logging_path does not exist"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "5097428073182977884"
      }
    ]
  }
}

Creating a new entry in map [GetLogValues] with key [logging_path]
{
  "error": {
    "code": 404,
    "message": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=GetLogValues) Entry=logging_level does not exist",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_entry_doesnt_exist",
            "subject": "[2002:add:dc0c:0:b0:3ee:e310:3739]:4001:blbdf18-20020a056692429200b000831681c070:9805:1600771:41065102",
            "description": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=GetLogValues) Entry=logging_level does not exist"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "10397103230438177755"
      }
    ]
  }
}

Creating a new entry in map [GetLogValues] with key [logging_level]
{
  "error": {
    "code": 404,
    "message": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=GetLogValues) Entry=logging_log does not exist",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_entry_doesnt_exist",
            "subject": "[2002:ab0:9c0c:0:b0:3ee:afe4:60e4]:4001:blcbt23-20020a0566939d9700b000845dd6cd2c:9805:1205066:38902812",
            "description": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=GetLogValues) Entry=logging_log does not exist"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "246852892541803465"
      }
    ]
  }
}

Creating a new entry in map [GetLogValues] with key [logging_log]
	Creating KVM /Users/kurtkanaskie/work/APIGEEX/edge-x-migration-test/x-import-small-to-test-kvm-continue-on-error/env__test__addresses-v1-mock__kvmfile__0.json
KURT kvmMeta1: test
KURT kvmMeta2: addresses-v1-mock
	Importing entries for /Users/kurtkanaskie/work/APIGEEX/edge-x-migration-test/x-import-small-to-test-kvm-continue-on-error/env__test__addresses-v1-mock__kvmfile__0.json
{
  "error": {
    "code": 404,
    "message": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'test'},Map=addresses-v1-mock) Entry=entities does not exist",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_entry_doesnt_exist",
            "subject": "[2002:ab0:d0ce:0:b0:3f1:204f:f4b5]:4001:ble41-20020a056692012900b00085a3b606dd:9805:2878236:41280651",
            "description": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'test'},Map=addresses-v1-mock) Entry=entities does not exist"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "16793084362588204257"
      }
    ]
  }
}

Creating a new entry in map [addresses-v1-mock] with key [entities]
	Creating KVM /Users/kurtkanaskie/work/APIGEEX/edge-x-migration-test/x-import-small-to-test-kvm-continue-on-error/env__test__pingstatus-v1__kvmfile__0.json
KURT kvmMeta1: test
KURT kvmMeta2: pingstatus-v1
	Importing entries for /Users/kurtkanaskie/work/APIGEEX/edge-x-migration-test/x-import-small-to-test-kvm-continue-on-error/env__test__pingstatus-v1__kvmfile__0.json
{
  "error": {
    "code": 404,
    "message": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'test'},Map=pingstatus-v1) Entry=target.basepath does not exist",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_entry_doesnt_exist",
            "subject": "[2002:add:cdc2:0:b0:3ee:cdc3:946e]:4001:blcbo1-20020a0566939b8100b000845aed6627:9805:430930:38599039",
            "description": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'test'},Map=pingstatus-v1) Entry=target.basepath does not exist"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "12218520039944275130"
      }
    ]
  }
}

Creating a new entry in map [pingstatus-v1] with key [target.basepath]
{
  "error": {
    "code": 404,
    "message": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'test'},Map=pingstatus-v1) Entry=logging.level does not exist",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_entry_doesnt_exist",
            "subject": "[2002:ab0:a2a2:0:b0:3f0:788b:7ea3]:4001:blbdh9-20020a056692258900b000846125aa07:9805:723422:40311647",
            "description": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'test'},Map=pingstatus-v1) Entry=logging.level does not exist"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "16797879531511099827"
      }
    ]
  }
}

Creating a new entry in map [pingstatus-v1] with key [logging.level]
{
  "error": {
    "code": 404,
    "message": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'test'},Map=pingstatus-v1) Entry=logging.log does not exist",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_entry_doesnt_exist",
            "subject": "[2002:ab0:c8c5:0:b0:3ee:ad03:dcd]:4001:bll41-20020a056692002900b00085a5905c0f:9805:535974:41434263",
            "description": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'test'},Map=pingstatus-v1) Entry=logging.log does not exist"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "5501195319226517299"
      }
    ]
  }
}

Creating a new entry in map [pingstatus-v1] with key [logging.log]
{
  "error": {
    "code": 404,
    "message": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'test'},Map=pingstatus-v1) Entry=target_basepath does not exist",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_entry_doesnt_exist",
            "subject": "[2002:add:d64f:0:b0:3ee:d23d:a57a]:4001:blbvx14-20020a056692908e00b00085a3740d6b:9805:2636869:40361756",
            "description": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'test'},Map=pingstatus-v1) Entry=target_basepath does not exist"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "11268526641293236107"
      }
    ]
  }
}

Creating a new entry in map [pingstatus-v1] with key [target_basepath]
	Creating KVM /Users/kurtkanaskie/work/APIGEEX/edge-x-migration-test/x-import-small-to-test-kvm-continue-on-error/env__prod__GeoIPFilter__kvmfile__0.json
KURT kvmMeta1: prod
KURT kvmMeta2: GeoIPFilter
	Importing entries for /Users/kurtkanaskie/work/APIGEEX/edge-x-migration-test/x-import-small-to-test-kvm-continue-on-error/env__prod__GeoIPFilter__kvmfile__0.json
{
  "error": {
    "code": 404,
    "message": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=GeoIPFilter) Entry=ALLOW_LIST does not exist",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_entry_doesnt_exist",
            "subject": "[2002:ab0:a2a2:0:b0:3f0:788b:7ea3]:4001:blcbt23-20020a0566939d9700b000845dd6cd2c:9805:1205066:38903776",
            "description": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=GeoIPFilter) Entry=ALLOW_LIST does not exist"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "11813544576913316121"
      }
    ]
  }
}

Creating a new entry in map [GeoIPFilter] with key [ALLOW_LIST]
{
  "error": {
    "code": 404,
    "message": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=GeoIPFilter) Entry=BLOCK_LIST does not exist",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_entry_doesnt_exist",
            "subject": "[2002:ab0:c8c5:0:b0:3ee:ad03:dcd]:4001:bli39-20020a056692022700b00085a610c308:9805:201770:42349842",
            "description": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=GeoIPFilter) Entry=BLOCK_LIST does not exist"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "16424084756234494175"
      }
    ]
  }
}

Creating a new entry in map [GeoIPFilter] with key [BLOCK_LIST]
{
  "error": {
    "code": 404,
    "message": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=GeoIPFilter) Entry=DEFAULT does not exist",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_entry_doesnt_exist",
            "subject": "[2002:add:cdc2:0:b0:3ee:cdc3:946e]:4001:blbws5-20020a056693958500b00085a1f18c8f:9805:3837140:39849167",
            "description": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=GeoIPFilter) Entry=DEFAULT does not exist"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "2899980684655704"
      }
    ]
  }
}

Creating a new entry in map [GeoIPFilter] with key [DEFAULT]
Importing proxy scoped KVMs...
	Creating KVM /Users/kurtkanaskie/work/APIGEEX/edge-x-migration-test/x-import-small-to-test-kvm-continue-on-error/proxy__kvm-demo__kvm-demo__kvmfile__0.json
KURT kvmMeta1: kvm-demo
KURT kvmMeta2: kvm-demo
	Importing entries for /Users/kurtkanaskie/work/APIGEEX/edge-x-migration-test/x-import-small-to-test-kvm-continue-on-error/proxy__kvm-demo__kvm-demo__kvmfile__0.json
{
  "error": {
    "code": 404,
    "message": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=kvm-demo) Entry=k1 does not exist",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_entry_doesnt_exist",
            "subject": "[2002:ab0:8f13:0:b0:3f0:de2b:d3f5]:4004:blcbc4-20020a056692754400b000845bd88e36:9805:761933:40071317",
            "description": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=kvm-demo) Entry=k1 does not exist"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "6235857371859298501"
      }
    ]
  }
}

Creating a new entry in map [kvm-demo] with key [k1]
	Creating KVM /Users/kurtkanaskie/work/APIGEEX/edge-x-migration-test/x-import-small-to-test-kvm-continue-on-error/proxy__pingstatus-v1__pingstatus-v1-kvm1__kvmfile__0.json
KURT kvmMeta1: pingstatus-v1
KURT kvmMeta2: pingstatus-v1-kvm1
	Importing entries for /Users/kurtkanaskie/work/APIGEEX/edge-x-migration-test/x-import-small-to-test-kvm-continue-on-error/proxy__pingstatus-v1__pingstatus-v1-kvm1__kvmfile__0.json
{
  "error": {
    "code": 404,
    "message": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=pingstatus-v1-kvm1) Entry=k1 does not exist",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_entry_doesnt_exist",
            "subject": "[2002:a05:6132:2788:b0:3f0:f6f6:f67e]:4004:blbdj6-20020a056692228600b00084614c91e8:9805:1401930:44762086",
            "description": "KeyValueMap(Scope=KeyValueMapScope {ScopeType ='ENVIRONMENTS', Organization = 'apigeex-custom-non-prod', Environment = 'prod'},Map=pingstatus-v1-kvm1) Entry=k1 does not exist"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "651848486046906890"
      }
    ]
  }
}

Creating a new entry in map [pingstatus-v1-kvm1] with key [k1]

srinandan added a commit that referenced this issue Sep 13, 2024
@srinandan srinandan linked a pull request Sep 13, 2024 that will close this issue
srinandan added a commit that referenced this issue Sep 13, 2024
srinandan added a commit that referenced this issue Sep 13, 2024
* feat: adds continue on err #538

* bug: create proxy kvms first #538
@kurtkanaskie kurtkanaskie reopened this Sep 16, 2024
@kurtkanaskie
Copy link
Collaborator Author

Continue on error does not appear to be working

ll $HOME/work/APIGEEX/edge-x-migration-test/x-import-small-to-test-kvm-continue-on-error
total 64
-rw-r--r--  1 kurtkanaskie  primarygroup  260 Sep 13 12:26 env__prod__GeoIPFilter__kvmfile__0.json
-rw-r--r--  1 kurtkanaskie  primarygroup  711 Sep 13 12:26 env__prod__GetLogValues__kvmfile__0.json
-rw-r--r--  1 kurtkanaskie  primarygroup  178 Sep 13 15:20 env__test__addresses-v1-mock__kvmfile__0.json
-rw-r--r--  1 kurtkanaskie  primarygroup  373 Sep 13 15:40 env__test__pingstatus-v1__kvmfile__0.json
-rw-r--r--  1 kurtkanaskie  primarygroup  199 Sep 13 15:21 org__org-config-private__kvmfile__0.json
-rw-r--r--  1 kurtkanaskie  primarygroup  194 Sep 13 15:21 org__org-config__kvmfile__0.json
-rw-r--r--  1 kurtkanaskie  primarygroup  106 Sep 13 16:09 proxy__kvm-demo__kvm-demo__kvmfile__0.json
-rw-r--r--  1 kurtkanaskie  primarygroup  106 Sep 13 16:09 proxy__pingstatus-v1__pingstatus-v1-kvm1__kvmfile__0.json
gorun --token=$TOKEN --org=$ORG kvms import --folder=$HOME/work/APIGEEX/edge-x-migration-test/x-import-small-to-test-kvm-continue-on-error
Map name GeoIPFilter, path env__prod__GeoIPFilter__kvmfile__0.json
Map name GetLogValues, path env__prod__GetLogValues__kvmfile__0.json
Map name addresses-v1-mock, path env__test__addresses-v1-mock__kvmfile__0.json
Map name pingstatus-v1, path env__test__pingstatus-v1__kvmfile__0.json
Map name org-config-private, path org__org-config-private__kvmfile__0.json
Map name org-config, path org__org-config__kvmfile__0.json
Map name kvm-demo, path proxy__kvm-demo__kvm-demo__kvmfile__0.json
Map name pingstatus-v1-kvm1, path proxy__pingstatus-v1__pingstatus-v1-kvm1__kvmfile__0.json
Importing org scoped KVMs...
	Creating KVM /Users/kurtkanaskie/work/APIGEEX/edge-x-migration-test/x-import-small-to-test-kvm-continue-on-error/org__org-config-private__kvmfile__0.json
{
  "error": {
    "code": 409,
    "message": "KeyValueMap org-config-private already exists",
    "status": "ABORTED",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keyvaluemap.service.keyvaluemap_already_exist",
            "subject": "[2002:add:d64f:0:b0:3ee:d23d:a57a]:4001:blbbd8-20020a056692208800b000845c08cac6:9805:1222058:112108909",
            "description": "KeyValueMap org-config-private already exists"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "167255181613719421"
      }
    ]
  }
}

Error: Conflict - request conflicts with the current state of the server
exit status 1

@srinandan
Copy link
Collaborator

Can you please rerun the command with the --continue-on-error=true flag set?

@kurtkanaskie
Copy link
Collaborator Author

My bad. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants