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

Fix SqsEventSource.status error handling in utilities.py #1318

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lmuther8
Copy link
Contributor

@lmuther8 lmuther8 commented Mar 29, 2024

Description

Expected Behavior
The zappa update {{stage}} command should fail and alert the user their permissions are not enough.

Actual Behavior
The program thinks the event source does not exist, tries to create one with the same UUID and then this error is caused:

botocore.errorfactory.ResourceConflictException: An error occurred (ResourceConflictException) when calling the
 CreateEventSourceMapping operation: An event source mapping with SQS arn (" arn:aws:sqs:us-west-2:<account>:
<sqs_name> ") and function (" <function_name> ") already exists. Please update or delete the existing mapping 
with UUID <uuid>

GitHub Issues

Closes #1317

Copy link
Collaborator

@monkut monkut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a testcase to reproduce the issue?

LOG.debug("event source %s does not exist", self.arn)
response = None
else:
raise e
Copy link
Collaborator

@monkut monkut Apr 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This raise changes the current operation of the status() function. I'm not sure if it's desired to raise an exception here.

Also, there is no e defined, this is expected raise a NameError exception as-is.

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

Successfully merging this pull request may close these issues.

SQS event creating when it should be updating
2 participants