garnaat / kappa

What precedes Lambda
http://kappa.readthedocs.org/en/develop/
Apache License 2.0
902 stars 89 forks source link

UnboundLocalError: local variable 'version' referenced before assignment #103

Closed wvidana closed 7 years ago

wvidana commented 7 years ago

Still figuring out the root cause of this. When issuing kappa deploy I get the following error:

Traceback (most recent call last):
  File "/Users/foo/.pyenv/versions/2.7.11/envs/ansible2.1/lib/python2.7/site-packages/kappa/function.py", line 434, in update
    'For the {} stage'.format(self._context.environment))
  File "/Users/foo/.pyenv/versions/2.7.11/envs/ansible2.1/lib/python2.7/site-packages/kappa/function.py", line 333, in update_alias
    version = self.find_latest_version()
  File "/Users/foo/.pyenv/versions/2.7.11/envs/ansible2.1/lib/python2.7/site-packages/kappa/function.py", line 312, in find_latest_version
    return version
UnboundLocalError: local variable 'version' referenced before assignment

Though the code gets uploaded to lambda

wvidana commented 7 years ago

Seems related to list_versions not handling boto3 markers, so when a list is greater than 50, the code is unable to find the last version. Already working on a PR

wvidana commented 7 years ago

Fix here https://github.com/garnaat/kappa/pull/106