mapbox / cfn-config

Quickly configure, start, and update AWS CloudFormation stacks.
BSD 2-Clause "Simplified" License
53 stars 17 forks source link

Directions traffic deploys broken with version 2.3.0 #127

Closed TheMarex closed 7 years ago

TheMarex commented 7 years ago

I'm seeing this error when attempting a deploy with latest (2.6.1, 2.6.0 works) mapbox-cli on api-directions.

> git checkout 5.5.0
> mbx update traf-staging
You are deploying branch '5.5.0' instead of 'master'. Are you sure? [Y/n]
20:55:33Z us-east-1: updating template of stack api-directions-traf-staging
params.name required.
Error
   at shardError (/home/patrick/Code/api-directions/cloudformation/shards.js:11:36)
       at /home/patrick/Code/api-directions/cloudformation/shards.js:35:23
           at /home/patrick/.nvm/versions/node/v4.4.2/lib/node_modules/mbxcli/node_modules/cfn-config/lib/template.js:40:47
               at FSReqWrap.oncomplete (fs.js:82:15)
karenzshea commented 7 years ago

Sorry, directed @TheMarex to open a ticket here about something else. This is likely a program bug.

TheMarex commented 7 years ago

I think this is a bug in cfn-config as this is the variable that changed. It works with 2.6.0 which uses 2.2.1.

Since this was a minor version bump in mbx-cli it should never break user code as per semantic versioning.

rclark commented 7 years ago

The line of code in your stack trace is the code that calls the function exported by your template. Higher in the stack trace are errors from your application, in cloudformation/shards.js

Without more info I also have to agree with @karenzshea that this looks like something downstream.

TheMarex commented 7 years ago

Either mapbox-cli or cnf-config changed behavior between 2.6.0 and 2.6.1, may it be intentional (this would have needed a major version bump) or unintentional (this would mean it is a bug.)

If you look at the corresponding code in shards.js

        // these params are supplied by cfn-config on deploy
        if (params.name === undefined) {
            return cb(shardError('params.name required.'));
        }

This points to cnf-config as even the comment indicates.

TheMarex commented 7 years ago

Fix is underway downstream in mbxcli.