launchdarkly-labs / project-migrator-script

Migrate Project Information from one account to another
3 stars 7 forks source link

Segment fix #8

Closed durw4rd closed 1 year ago

durw4rd commented 1 year ago

Made three functional changes: 1) Use inputArgs.projKeyDestas the target project name. 2) Update the initial log message to mention the target rather than the source project key. 3) Fix a typo in the URL of the segment POST request - reference the target project key instead of the source project key.

3 should resolve the problem of user segments not being created correctly.

The rest of the changes are just cosmetic/adding some comments

durw4rd commented 1 year ago

After discussing in Slack, I've removed the newProj variable and replaced the one instance where this object was used with a value taken from the input argument to keep consistency. I've also removed the two arbitrary timeouts as they don't seem to be necessary anymore - tested by migrating a relatively sizeable project (~30-40 flags, 12 environments) and it all went fine, just relying on the logic embedded inside the rateLimitRequest() utils function.

tanben commented 1 year ago

looks good