localstack / localstack/localstack-dagger-module

Accommodate comma-separated config values

未关闭
#4 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Python
星标
3
派生
0
PR 合并指标
30 天内没有已合并 PR

描述

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:

  1. 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")
  2. accommodate escaped quotes (e.g., "SERVICES=\"s3,ec2,secretsmanager\",AWS_DEFAULT_REGION=east-us-1")

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先阅读 src/localstack/main.py 第 47-52 行中的配置解析代码,并跟踪配置参数是如何拆分的。比较提议的分隔符和转义处理方案,然后检查仓库中现有的测试或测试命令。当逗号分隔的值仍作为一个配置值的一部分,并且独立的配置条目仍能正确解析时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
devops
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。