Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`_project.set_local_config` sets incorrect local_config_uri for GCM-enabled projects

Open
#107 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
52/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
api

Research direction

Start at the set_local_config entry point and inspect how it consumes get_gc_contributions for GCM-enabled projects. Reproduce the case with multiple matching contributions, then verify that the selected local_config_uri follows the documented depth-first ordering and that existing client behavior remains unchanged.

Written by the indexing model from the issue text.

Description

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

  1. Have a project with a Global Configuration (GCM) and multiple contributions for the same project/component.
  2. Call:
set_local_config(name_or_uri, global_config_uri=...)
  1. Observe that the returned local_config_uri corresponds 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

Dominant language
HTML
Stars
52
Forks
32
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from IBM/ELM-Python-Client

All issues in IBM/ELM-Python-Client

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.