Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to update alias #113

Open
wobeng opened this issue Feb 22, 2017 · 10 comments
Open

Unable to update alias #113

wobeng opened this issue Feb 22, 2017 · 10 comments

Comments

@wobeng
Copy link

wobeng commented Feb 22, 2017

I'm getting the error below:

[Container] 2017/02/22 22:12:14 deploying
[Container] 2017/02/22 22:12:14 -> deploying policy kappa-ca-lambda-notify_master
[Container] 2017/02/22 22:12:14 -> creating role kappa-ca-lambda-notify_master
[Container] 2017/02/22 22:12:14 -> role already exists
[Container] 2017/02/22 22:12:14 -> updating configuration for kappa-ca-lambda-notify
[Container] 2017/02/22 22:12:14 -> updating function kappa-ca-lambda-notify
[Container] 2017/02/22 22:12:14 -> uploading new function zipfile kappa-ca-lambda-notify.zip
[Container] 2017/02/22 22:12:15 -> Unable to update alias
[Container] 2017/02/22 22:12:15 Traceback (most recent call last):
[Container] 2017/02/22 22:12:15 File "/tmp/src832689071/src/venv/lib/python2.7/site-packages/kappa/function.py", line 353, in update_alias
[Container] 2017/02/22 22:12:15 Name=name)
[Container] 2017/02/22 22:12:15 File "/tmp/src832689071/src/venv/lib/python2.7/site-packages/kappa/awsclient.py", line 86, in call
[Container] 2017/02/22 22:12:15 data = op(**kwargs)
[Container] 2017/02/22 22:12:15 File "/tmp/src832689071/src/venv/lib/python2.7/site-packages/botocore/client.py", line 253, in _api_call
[Container] 2017/02/22 22:12:15 return self._make_api_call(operation_name, kwargs)
[Container] 2017/02/22 22:12:15 File "/tmp/src832689071/src/venv/lib/python2.7/site-packages/botocore/client.py", line 543, in _make_api_call
[Container] 2017/02/22 22:12:15 raise error_class(parsed_response, operation_name)
[Container] 2017/02/22 22:12:15 ResourceNotFoundException: An error occurred (ResourceNotFoundException) when calling the UpdateAlias operation: Alias not found: arn:aws:lambda:us-east-1:blah:function:kappa-ca-lambda-notify:master
[Container] 2017/02/22 22:12:15 done

With the config below


name: kappa-ca-lambda-notify
environments:
  develop:
    region: us-east-1
    policy:
      resources:
        - arn: arn:aws:logs:*:*:*
          actions:
            - "*"
        - arn: arn:aws:ses:*:*:*
          actions:
            - "*"
    event_sources:
      - arn: arn:aws:sns:us-east-1:blah:blah
  stage:
    region: us-east-1
    policy:
      resources:
        - arn: arn:aws:logs:*:*:*
          actions:
            - "*"
        - arn: arn:aws:ses:*:*:*
          actions:
            - "*"
    event_sources:
      - arn: arn:aws:sns:us-east-1:blah:blah
  master:
    region: us-east-1
    policy:
      resources:
        - arn: arn:aws:logs:*:*:*
          actions:
            - "*"
        - arn: arn:aws:ses:*:*:*
          actions:
            - "*"
    event_sources:
      - arn: arn:aws:sns:us-east-1:blah:blah
lambda:
  description: aws lamdba function to send emails
  handler: main.handler
  runtime: python2.7
  memory_size: 128
  timeout: 3
  log_retention_policy: 1

@wobeng
Copy link
Author

wobeng commented Feb 22, 2017

update: develop works well. stage and master gets the error above

-> deploying policy kappa-ca-lambda-notify_develop
-> policy unchanged
-> creating role kappa-ca-lambda-notify_develop
-> role already exists
-> updating configuration for kappa-ca-lambda-notify
-> updating function kappa-ca-lambda-notify
-> function unchanged
done

@josegonzalez
Copy link
Contributor

Does that alias exist?

@wobeng
Copy link
Author

wobeng commented Feb 23, 2017

please disregard, I got your rude email

@wobeng wobeng closed this as completed Feb 23, 2017
@josegonzalez
Copy link
Contributor

For anyone who is curious, this was the contents of my "rude email":

This might seem a bit heavy-handed, but please do not email me for support unless you are paying for it. Thats what github issues is for.

I also then immediately went to this issue to respond with the above comment - I only just woke up. Sure, I could have responded in a much nicer fashion, but I'm busy with work and wanted to respond as soon as I saw the email so the user in question wasn't waiting forever.

When I contribute to or maintain an open source project, I am doing that out of good will. It is extremely rare that someone actually pays me for any of my OSS work, and when they do, it's usually enough to buy some milk and cereal, not much else. As I contribute to quite literally hundreds of OSS projects - under my name, other devs, other organizations, $WORK, etc. - I am highly protective of how I provide support.

I do not provide email support unless I am being paid for my time, because otherwise I wouldn't actually have time for my day job, which pays for rent, bills, food, etc. I'm also free to respond however I want to an unsolicited email, and while I agree that my tone wasn't the best, I don't really regret responding that way. Actually, I regret responding at all, since now I'm not in the best of moods and I've spent more time writing this comment than I did trying to figure out what the release process for this project was.

If anyone knows the answer to @wobeng's question - or knows why its broken in the current release! - feel free to respond. I'm not quite sure whats going on, but I suspect the blah bits are semi-important to figuring out why the UpdateAlias is breaking.

@garnaat garnaat reopened this Feb 23, 2017
@garnaat
Copy link
Owner

garnaat commented Feb 23, 2017

First, let's use GitHub issues for what it is intended to do; create and track issues. We all get notified of new or updated issues so emailing someone directly seems unnecessary unless you need to provide some info or context that you are uncomfortable providing here.

As to the issue, the only way I can see that this error could occur is if the alias for master did not exist. I'm not sure why or how that could happen but it seems like the problem could be fixed by better checks in kappa to see if the alias existed or not.

If anyone wants to attempt a PR, that would be awesome. If not I can try to find some time in the next week or so to create a PR.

@wobeng
Copy link
Author

wobeng commented Feb 23, 2017

@josegonzalez what I asked you via email was more of a question not support. I was trying to figure out if it was a bug or intended design

if you felt it supported then you should have asked for payment nicely not respond with that rude message

To just come off with that reply, it comes off very unfriendly...but maybe I was raised differently

@josegonzalez
Copy link
Contributor

@garnaat I don't actually use this project anymore. I'll make a pr later today to add documentation for the release process, but if you can remove me now, that'd be excellent. I believe there are some users in #82 who would be happy to help contribute/maintain kappa, and are better suited to do so.

@garnaat
Copy link
Owner

garnaat commented Feb 23, 2017

@josegonzalez I have removed you from the project. Thanks for all of your support over the past year or so. I really appreciate it.

@wvidana
Copy link
Contributor

wvidana commented Feb 26, 2017

Working on a fix... It may take a bit more time since I discovered also that kappa will not create/update an alias if the last version of the function is already uploaded (ie. you want to match prod with dev, but without changing code, just update the prod alias to last version)

@wvidana
Copy link
Contributor

wvidana commented Feb 27, 2017

This PR fixes the issue and also the above commented #115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants