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

Check that FIFO Queues end with .fifo #757

Merged
merged 1 commit into from
Jul 9, 2017

Conversation

Lowercases
Copy link
Member

Add a validate() method in sqs.py that checks that FIFO queues
() have a QueueName parameter and () QueueName ends with '.fifo'
as required by AWS:

http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html

Add a validate() method in sqs.py that checks that FIFO queues
(*) have a QueueName parameter and (*) QueueName ends with '.fifo'
as required by AWS:

http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html
@@ -34,6 +34,12 @@ class Queue(AWSObject):
'VisibilityTimeout': (integer, False),
}

def validate(self):
if self.properties.get('FifoQueue'):
if not self.properties.get('QueueName', '').endswith('.fifo'):
Copy link
Member

Choose a reason for hiding this comment

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

The docs indicate QueueName is not required. But this code would raise an error if FifoQueue was specified without QueueName.

Copy link
Member

Choose a reason for hiding this comment

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

Strangely, that's the first thing I thought too when we started using this internally. But after testing, it turns out that if you specify FifoQueue, you have to specify a QueueName, and it has to end with .fifo. It's annoying, but CF isn't smart enough to understand it has to add .fifo, which isn't all that surprising after all this time of messing w/ CF :)

@markpeek markpeek added this to the 1.9.5 milestone Jul 3, 2017
@markpeek markpeek merged commit 3a3004a into cloudtools:master Jul 9, 2017
@markpeek
Copy link
Member

markpeek commented Jul 9, 2017

Thanks!

markpeek pushed a commit that referenced this pull request Dec 2, 2017
Fix validation failure for fifo queues in the case that no QueueName is specified.  Note that Cloudformation *does* now automatically give a QueueName ending with .fifo in this case, contrary to the comment on PR #757.
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.

3 participants