kinesis-mock icon indicating copy to clipboard operation
kinesis-mock copied to clipboard

[BUG] KINESIS_INITIALIZE_STREAMS evaluation mishandles quotes

Open mpatnode opened this issue 2 years ago • 5 comments

Describe the bug Quotes used in KINESIS_INITIALIZE_STREAMS will cause a parsing error. This is new behavior which perhaps was triggered by one of the underlying component upgrades.

To Reproduce Steps to reproduce the behavior:

  1. Set your variable using a quoted string like: KINESIS_INITIALIZE_STREAMS="audit-stream:1:us-east-1"
  2. Start localstack
  3. See error:
    INFO:localstack.services.kinesis.kinesis_mock_server: kinesis.mock.InvalidArgumentException: Stream Name '"audit_stream' contains invalid characters

Expected behavior The surrounding quote characters in environment variables should be ignored.

Additional context This worked with a 3 month old localstack image, and only broke recently, potentially in conjunction with the requirement for the region to be included in the stream name (that was not required in the previous image either)

mpatnode avatar Jul 05 '22 18:07 mpatnode

Could you simply remove the quotes from the value here?

etspaceman avatar Jul 05 '22 18:07 etspaceman

Of course. It's just unexpected behavior for environment variables. Perhaps an oddity of docker-compose, since the shell would typically remove those quotes when parsing the set command.

mpatnode avatar Jul 05 '22 18:07 mpatnode

I'm not entirely sure to be honest. Might also be something that changed in Localstack rather than here. I haven't pushed a release of kinesis-mock since April of this year.

etspaceman avatar Jul 05 '22 19:07 etspaceman

Resolved

etspaceman avatar Jul 29 '22 03:07 etspaceman

Wrong issue

etspaceman avatar Jul 29 '22 03:07 etspaceman