`_project.set_local_config` sets incorrect local_config_uri for GCM-enabled projects
まだ誰も着手していません。
評価
調査の方向性
set_local_config のエントリポイントから始め、GCM 対応プロジェクトで get_gc_contributions をどのように使用しているかを調べます。複数の一致する contribution があるケースを再現し、選択された local_config_uri が文書化された深さ優先の順序に従うこと、また既存のクライアントの動作が変わらないことを確認します。
索引モデルが issue の本文から書いたものです。
説明
In ELM Python Client, the method set_local_config incorrectly selects the last matching contribution
from get_gc_contributions instead of the first one.
For GCM-enabled projects, this can result in returning the wrong local_config_uri.
Steps to Reproduce
- Have a project with a Global Configuration (GCM) and multiple contributions for the same project/component.
- Call:
set_local_config(name_or_uri, global_config_uri=...)
- Observe that the returned
local_config_uricorresponds to the last contribution in the flatList, not the first.
Expected Behavior
According to the official GC SDK documentation, the flatList returned by
flatListOfContributionsForGcHierarchy is depth-first ordered.
The first matching contribution should be used as it respects the "child overwrites parent" rule.
Actual Behavior
The last matching contribution is selected, which may be incorrect.
Proposed Fix
In set_local_config, break immediately after the first match:
for config in gc_contribs['configurations']:
if config['componentUri'] == self.project_uri:
config_uri = config['configurationUri']
break # first match is correct according to GC SDK
This ensures the local_config_uri is correctly selected according to the official ordering.
References
- 主要言語
- HTML
- スター
- 52
- フォーク
- 32
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
IBM/ELM-Python-Client のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
IBM/ELM-Python-Client#138 · コメント 11 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
IBM/ELM-Python-Client#131 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
IBM/ELM-Python-Client#112 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
IBM/ELM-Python-Client#65 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
IBM/ELM-Python-Client#59 · コメント 4 件 ·
IBM/ELM-Python-Client の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
speaches-ai/speaches#678 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's オープンbug ecr
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
conda-forge/spacy-feedstock#177 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100