GoogleCloudPlatform / application-integration-management-toolkit

This tool lets you interact with Application Integration, Integration Connectors or Apigee Integration/Connector APIs. The tool lets you manage (create, del, get, list) integrations, connections etc.
Apache License 2.0
23 stars 16 forks source link

[BUG] "Invalid value at 'integration_version.database_persistence_policy' error when creating a new integration #280

Closed carlosmscabral closed 3 months ago

carlosmscabral commented 3 months ago

Describe the bug When trying to create a new integration with the following command:

integrationcli integrations create -n vertex-agents -p cabral-app-integration -r southamerica-east1 -f ./big-query-integration.json

The following 400 error appears:

{
  "error": {
    "code": 400,
    "message": "Invalid value at 'integration_version.database_persistence_policy' (type.googleapis.com/google.cloud.integrations.v1alpha.DatabasePersistencePolicy), \"\"",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.BadRequest",
        "fieldViolations": [
          {
            "field": "integration_version.database_persistence_policy",
            "description": "Invalid value at 'integration_version.database_persistence_policy' (type.googleapis.com/google.cloud.integrations.v1alpha.DatabasePersistencePolicy), \"\""
          }
        ]
      }
    ]
  }
}

Error: Bad Request - malformed request syntax: {
  "error": {
    "code": 400,
    "message": "Invalid value at 'integration_version.database_persistence_policy' (type.googleapis.com/google.cloud.integrations.v1alpha.DatabasePersistencePolicy), \"\"",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.BadRequest",
        "fieldViolations": [
          {
            "field": "integration_version.database_persistence_policy",
            "description": "Invalid value at 'integration_version.database_persistence_policy' (type.googleapis.com/google.cloud.integrations.v1alpha.DatabasePersistencePolicy), \"\""
          }
        ]
      }
    ]
  }
}

It seems to be a mandatory field when creating the Integration.

Version version 0.76.2 date: 2024-06-11T19:27:05Z [commit: c92f9be]

srinandan commented 3 months ago

integrationcli is working as intended. The most likely cause of this issue was an incorrect folder structure and therefore the default values were not applied. Please re-open if that wasn't the case