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

Closed
wants to merge 2 commits into 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.

Copy link

github-actions bot commented Oct 5, 2024

Hi there! Unfortunately, this PR has not seen any activity for at least 90 days. If the PR is still relevant to the latest version of Zappa, please comment within the next 10 days if you wish to keep it open. Otherwise, it will be automatically closed.

@github-actions github-actions bot added the no-activity [Bot] Closing soon if no new activity label Oct 5, 2024
Copy link

Hi there! Unfortunately, this PR was automatically closed as it had not seen any activity in at least 100 days. If the PR is still relevant to the latest version of Zappa, please open a new PR.

@github-actions github-actions bot added the auto-closed [Bot] Closed, details in comments label Oct 15, 2024
@github-actions github-actions bot closed this Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-closed [Bot] Closed, details in comments no-activity [Bot] Closing soon if no new activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQS event creating when it should be updating
2 participants