SolaceLabs / solace-tools-typescript

This repository contains tools to enable interaction with the Solace PubSub+ Platform including an AsyncAPI Importer
https://api.solace.dev/
Apache License 2.0
5 stars 3 forks source link

AsyncAPi Importer - Import fails on valid sepc - Importer Test Run Assets Inconsistency Error #118

Closed 195858 closed 1 year ago

195858 commented 1 year ago

Describe the bug Importing a valid AsyncAPi results in an error (in a completely empty EP 2.0 account) (Please contact me for the AsyncAPi as it's custom/private)

Importer Test Run Assets Inconsistency Error

"message": "expect epSdkTask_TransactionLogData.epSdkTask_Action = 'NO_ACTION', instead got 'WOULD_CREATE_NEW_VERSION'",

To Reproduce Steps to reproduce the behavior:

  1. command line ep-async-api-importer -fp ~/Downloads/ERPO2CAPI.yaml -d ERPO2CAPI
  2. configuration CLI_TEST_SETUP_DOMAINS_FOR_APIS=false CLI_ASSETS_APPLICATION_DOMAIN_ENFORCEMENT_POLICY=off CLI_IMPORT_BROKER_TYPE=solace CLI_IMPORT_CREATE_API_APPLICATION=true CLI_IMPORT_DEFAULT_SHARED_FLAG=false CLI_IMPORT_ASSETS_TARGET_VERSION_STRATEGY=bump_minor

    { "baseName": "CliError", "name": "_CliImporterTestRunAssetsInconsistencyError", "internalLogName": "CliImporter.executeTask()", "internalMessage": "Importer Test Run Assets Inconsistency Error", "internalStack": [ "_CliImporterTestRunAssetsInconsistencyError: Importer Test Run Assets Inconsistency Error", " at CliEventApiImporter.executeTask (/Users/swenhelge/.nvm/versions/node/v18.16.0/lib/node_modules/@solace-labs/ep-async-api-importer/dist/cli.js:48129:13)", " at process.processTicksAndRejections (node:internal/process/task_queues:95:5)", " at async CliAssetsImporter.run_present_event_version (/Users/swenhelge/.nvm/versions/node/v18.16.0/lib/node_modules/@solace-labs/ep-async-api-importer/dist/cli.js:48174:53)", " at async CliAssetsImporter.run_present_channel_event (/Users/swenhelge/.nvm/versions/node/v18.16.0/lib/node_modules/@solace-labs/ep-async-api-importer/dist/cli.js:48232:21)", " at async CliAssetsImporter.run_present_channel (/Users/swenhelge/.nvm/versions/node/v18.16.0/lib/node_modules/@solace-labs/ep-async-api-importer/dist/cli.js:48490:17)", " at async CliEventApiImporter.run_present_assets (/Users/swenhelge/.nvm/versions/node/v18.16.0/lib/node_modules/@solace-labs/ep-async-api-importer/dist/cli.js:48587:21)", " at async CliEventApiImporter.run_present (/Users/swenhelge/.nvm/versions/node/v18.16.0/lib/node_modules/@solace-labs/ep-async-api-importer/dist/cli.js:49378:47)", " at async CliEventApiImporter.run_import (/Users/swenhelge/.nvm/versions/node/v18.16.0/lib/node_modules/@solace-labs/ep-async-api-importer/dist/cli.js:49446:51)", " at async CliEventApiImporter.run (/Users/swenhelge/.nvm/versions/node/v18.16.0/lib/node_modules/@solace-labs/ep-async-api-importer/dist/cli.js:49467:48)", " at async CliImporterManager.run_test_mode (/Users/swenhelge/.nvm/versions/node/v18.16.0/lib/node_modules/@solace-labs/ep-async-api-importer/dist/cli.js:51039:50)" ], "appName": "ep-async-api-importer", "cliRunContext": { "runId": "2023-08-24-11-46-16-578", "runMode": "test_pass_2", "apiFile": "/Users/swenhelge/Downloads/ERPO2CAPI.yaml", "apiTitle": "ERP API", "apiVersion": "1.0.1", "apiBrokerType": "solace", "applicationDomainName": "ksxigeoscmw", "assetApplicationDomainName": "ep-async-api-importer/test/2023-08-24-11-46-16-578/ERPO2CAPI", "channelTopic": "sales/{object}/notification/{version}/{erp_id}/{sales_organization}/{distribution_channel}/{division}", "epEventName": "Notification", "type": "publish" }, "details": { "message": "expect epSdkTask_TransactionLogData.epSdkTask_Action = 'NO_ACTION', instead got 'WOULD_CREATE_NEW_VERSION'", "epSdkTask_TransactionLogData": { "epObjectKeys": { "epObjectId": "lomx9i9an4w", "epObjectType": "eventVersion", "epVersionObjectId": "lomx9i9an4w" },

Expected behavior All the items form the Async API should be imported successfully

Log files Run Error: ------------------------ See log file for more details.

{ "baseName": "CliError", "name": "_CliImporterTestRunAssetsInconsistencyError", "internalLogName": "CliImporter.executeTask()", "internalMessage": "Importer Test Run Assets Inconsistency Error", "internalStack": [ "_CliImporterTestRunAssetsInconsistencyError: Importer Test Run Assets Inconsistency Error", " at CliEventApiImporter.executeTask (/Users/swenhelge/.nvm/versions/node/v18.16.0/lib/node_modules/@solace-labs/ep-async-api-importer/dist/cli.js:48129:13)", " at process.processTicksAndRejections (node:internal/process/task_queues:95:5)", " at async CliAssetsImporter.run_present_event_version (/Users/swenhelge/.nvm/versions/node/v18.16.0/lib/node_modules/@solace-labs/ep-async-api-importer/dist/cli.js:48174:53)", " at async CliAssetsImporter.run_present_channel_event (/Users/swenhelge/.nvm/versions/node/v18.16.0/lib/node_modules/@solace-labs/ep-async-api-importer/dist/cli.js:48232:21)", " at async CliAssetsImporter.run_present_channel (/Users/swenhelge/.nvm/versions/node/v18.16.0/lib/node_modules/@solace-labs/ep-async-api-importer/dist/cli.js:48490:17)", " at async CliEventApiImporter.run_present_assets (/Users/swenhelge/.nvm/versions/node/v18.16.0/lib/node_modules/@solace-labs/ep-async-api-importer/dist/cli.js:48587:21)", " at async CliEventApiImporter.run_present (/Users/swenhelge/.nvm/versions/node/v18.16.0/lib/node_modules/@solace-labs/ep-async-api-importer/dist/cli.js:49378:47)", " at async CliEventApiImporter.run_import (/Users/swenhelge/.nvm/versions/node/v18.16.0/lib/node_modules/@solace-labs/ep-async-api-importer/dist/cli.js:49446:51)", " at async CliEventApiImporter.run (/Users/swenhelge/.nvm/versions/node/v18.16.0/lib/node_modules/@solace-labs/ep-async-api-importer/dist/cli.js:49467:48)", " at async CliImporterManager.run_test_mode (/Users/swenhelge/.nvm/versions/node/v18.16.0/lib/node_modules/@solace-labs/ep-async-api-importer/dist/cli.js:51039:50)" ], "appName": "ep-async-api-importer", "cliRunContext": { "runId": "2023-08-24-11-46-16-578", "runMode": "test_pass_2", "apiFile": "/Users/swenhelge/Downloads/ERPO2CAPI.yaml", "apiTitle": "ERP API", "apiVersion": "1.0.1", "apiBrokerType": "solace", "applicationDomainName": "ksxigeoscmw", "assetApplicationDomainName": "ep-async-api-importer/test/2023-08-24-11-46-16-578/ERPO2CAPI", "channelTopic": "sales/{object}/notification/{version}/{erp_id}/{sales_organization}/{distribution_channel}/{division}", "epEventName": "Notification", "type": "publish" }, "details": { "message": "expect epSdkTask_TransactionLogData.epSdkTask_Action = 'NO_ACTION', instead got 'WOULD_CREATE_NEW_VERSION'", "epSdkTask_TransactionLogData": { "epObjectKeys": { "epObjectId": "lomx9i9an4w", "epObjectType": "eventVersion", "epVersionObjectId": "lomx9i9an4w" }, "taskTransactionId": "88710e5b-0f67-4145-9472-c55b4fe82cf1", "epSdkTask_Config": { "epSdkTask_TargetState": "PRESENT", "applicationDomainId": "ksxigeoscmw", "eventId": "bhitbvzhj5m", "versionString": "1.0.1", "versionStrategy": "bump_minor", "topicString": "sales/{object}/notification/{version}/{erp_id}/{sales_organization}/{distribution_channel}/{division}", "topicDelimiter": "/", "enumInfoMap": {}, "eventVersionSettings": { "description": "", "displayName": "", "schemaVersionId": "1ghz786z61l", "stateId": "2", "brokerType": "solace" }, "epSdkTask_TransactionConfig": { "groupTransactionId": "2023-08-24-11-46-16-578", "parentTransactionId": "0e462e1d-11e1-4614-a0e7-3093e723dfdf" }, "checkmode": true }, "epSdkTask_Action": "WOULD_CREATE_NEW_VERSION", "epSdkTask_GetFuncReturn": { "epObjectKeys": { "epObjectId": "bhitbvzhj5m", "epObjectType": "eventVersion", "epVersionObjectId": "lomx9i9an4w" }, "epObject": { "createdTime": "2023-08-24T11:46:31.228Z", "updatedTime": "2023-08-24T11:46:31.228Z", "createdBy": "3e2ocmx105", "changedBy": "3e2ocmx105", "id": "lomx9i9an4w", "eventId": "bhitbvzhj5m", "description": "", "version": "1.1.0", "displayName": "", "declaredProducingApplicationVersionIds": [ "g98wn0ijil7" ], "declaredConsumingApplicationVersionIds": [ "g98wn0ijil7" ], "producingEventApiVersionIds": [ "4niaxfzbevt" ], "consumingEventApiVersionIds": [ "4niaxfzbevt" ], "attractingApplicationVersionIds": [], "schemaVersionId": "1ghz786z61l", "schemaPrimitiveType": null, "deliveryDescriptor": { "brokerType": "solace", "address": { "addressLevels": [ { "name": "erp", "addressLevelType": "literal" }, { "name": "erp_id", "addressLevelType": "variable" }, { "name": "notification", "addressLevelType": "literal" }, { "name": "version", "addressLevelType": "variable" }, { "name": "object", "addressLevelType": "variable" }, { "name": "sales_organization", "addressLevelType": "variable" }, { "name": "distribution_channel", "addressLevelType": "variable" }, { "name": "division", "addressLevelType": "variable" } ], "addressType": "topic" }, "keySchemaVersionId": null, "keySchemaPrimitiveType": null }, "stateId": "2", "customAttributes": [], "messagingServiceIds": [], "type": "eventVersion" }, "epObjectExists": true }, "epSdkTask_IsUpdateRequiredFuncReturn": { "isUpdateRequired": true, "existingCompareObject": { "description": "", "displayName": "", "stateId": "2", "schemaVersionId": "1ghz786z61l", "deliveryDescriptor": { "brokerType": "solace", "address": { "addressLevels": [ { "name": "erp", "addressLevelType": "literal" }, { "name": "erp_id", "addressLevelType": "variable" }, { "name": "notification", "addressLevelType": "literal" }, { "name": "version", "addressLevelType": "variable" }, { "name": "object", "addressLevelType": "variable" }, { "name": "sales_organization", "addressLevelType": "variable" }, { "name": "distribution_channel", "addressLevelType": "variable" }, { "name": "division", "addressLevelType": "variable" } ], "addressType": "topic" }, "keySchemaVersionId": null, "keySchemaPrimitiveType": null } }, "requestedCompareObject": { "description": "", "displayName": "", "schemaVersionId": "1ghz786z61l", "stateId": "2", "deliveryDescriptor": { "brokerType": "solace", "address": { "addressLevels": [ { "name": "sales", "addressLevelType": "literal", "enumVersionId": "undefined" }, { "name": "object", "addressLevelType": "variable", "enumVersionId": "undefined" }, { "name": "notification", "addressLevelType": "literal", "enumVersionId": "undefined" }, { "name": "version", "addressLevelType": "variable", "enumVersionId": "undefined" }, { "name": "erp_id", "addressLevelType": "variable", "enumVersionId": "undefined" }, { "name": "sales_organization", "addressLevelType": "variable", "enumVersionId": "undefined" }, { "name": "distribution_channel", "addressLevelType": "variable", "enumVersionId": "undefined" }, { "name": "division", "addressLevelType": "variable", "enumVersionId": "undefined" } ], "addressType": "topic" } } }, "difference": { "deliveryDescriptor.address.addressLevels.0.name": { "from": "erp", "to": "sales" }, "deliveryDescriptor.address.addressLevels.1.name": { "from": "erp_id", "to": "object" }, "deliveryDescriptor.address.addressLevels.4.name": { "from": "object", "to": "erp_id" } } }, "epSdkTask_UpdateFuncReturn": { "epSdkTask_Action": "WOULD_CREATE_NEW_VERSION", "epObject": { "createdTime": "2023-08-24T11:46:31.228Z", "updatedTime": "2023-08-24T11:46:31.228Z", "createdBy": "3e2ocmx105", "changedBy": "3e2ocmx105", "id": "lomx9i9an4w", "eventId": "lomx9i9an4w", "description": "", "version": "1.2.0", "displayName": "", "declaredProducingApplicationVersionIds": [ "g98wn0ijil7" ], "declaredConsumingApplicationVersionIds": [ "g98wn0ijil7" ], "producingEventApiVersionIds": [ "4niaxfzbevt" ], "consumingEventApiVersionIds": [ "4niaxfzbevt" ], "attractingApplicationVersionIds": [], "schemaVersionId": "1ghz786z61l", "schemaPrimitiveType": null, "deliveryDescriptor": { "brokerType": "solace", "address": { "addressLevels": [ { "name": "sales", "addressLevelType": "literal" }, { "name": "object", "addressLevelType": "variable" }, { "name": "notification", "addressLevelType": "literal" }, { "name": "version", "addressLevelType": "variable" }, { "name": "erp_id", "addressLevelType": "variable" }, { "name": "sales_organization", "addressLevelType": "variable" }, { "name": "distribution_channel", "addressLevelType": "variable" }, { "name": "division", "addressLevelType": "variable" } ], "addressType": "topic" } }, "stateId": "2", "customAttributes": [], "messagingServiceIds": [], "type": "eventVersion" }, "epObjectKeys": { "epObjectId": "lomx9i9an4w", "epObjectType": "eventVersion", "epVersionObjectId": "lomx9i9an4w" } } } } }

Additional context Please contact me for the AsyncAPi as it's custom/private