localstack / localstack/localstack-dagger-module
Accommodate comma-separated config values
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
There's no way to provide comma-separated config values through the configuration argument.
For example, I want to specify a list of services via the SERVICES config variable (e.g., SERVICES=s3,ec2,secretsmanager,ecs,iam,sts,fis). However, the configuration parsing code naively splits the provided string on commas:
https://github.com/localstack/localstack-dagger-module/blob/6e2683e20e54e7ceab130ebe2abed050b6670ed2/src/localstack/main.py#L47-L52
As such, when specifying configuration as follows, ec2 is recognized as a separate config variable rather than another service in the list of services that comprise the value for the SERVICES config variable:
dag.Localstack().Start(dag.LocalstackStartOpts{
Configuration: "SERVICES=s3,ec2,secretsmanager,ecs,iam,sts,fis"
})
There are a few solutions to this:
- use a non-comma delimiter to distinguish configuration key-value pairs (e.g., use
;as the delimiter:"SERVICES=s3,ec2,secretsmanager;AWS_DEFAULT_REGION=east-us-1") - accommodate escaped quotes (e.g.,
"SERVICES=\"s3,ec2,secretsmanager\",AWS_DEFAULT_REGION=east-us-1")
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the configuration parsing code in src/localstack/main.py at lines 47-52 and trace how the configuration argument is split. Compare the proposed delimiter and escaping approaches, then check the repository's existing tests or test commands. Done means comma-separated values remain part of one configuration value while separate configuration entries still parse correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100