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 摘要。