apigeecs / apigee-migrate-tool

Export/Import Org Data. Import from CSV files
MIT License
54 stars 50 forks source link

Fix for issue #32 exportApps and #33 exportDevs #39

Closed kurtkanaskie closed 4 years ago

kurtkanaskie commented 4 years ago

The iterateOverDevs function was calling done() when it needed to still wait for callbacks to finish.

Testing by adjusting the count param on GET /developers (default is 1000) for boundary conditions.

  1. 0 developers
  2. 1 developer, 1 app
  3. 1 developer, 0 app
  4. N developers, X apps (count = N-2, N-1, N, N+1, N+2)
karsten-wagner commented 4 years ago

Great! Works for me based on this PR: $ grunt exportApps Running "exportApps" task

Retrieved 248 developers Retrieved TOTAL of 248 developers, waiting for callbacks to complete [...] Exported 126 apps for 248 developers

kurtkanaskie commented 4 years ago

Up to here fixes for:

kurtkanaskie commented 4 years ago

Previously, KVMs tried to export all KVMs from all Environments, which didn't work because done() was being called prematurely. Now, it just exports the KVMs for the environment in config.js.

kurtkanaskie commented 4 years ago

Fixed importKeys, the flow to migrate Apps and their existing keys is: exportApps - includes original keys importApps - Edge ignores original keys and creates new keys, importApps then deletes them. importKeys - to import original keys.