• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lfit / releng-gerrit_to_platform / 25859917105 / 1
93%
main: 93%

Build:
DEFAULT BRANCH: main
Ran 14 May 2026 12:28PM UTC
Files 8
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 May 2026 01:38PM UTC coverage: 92.806%. Remained the same
25859917105.1

push

github

ModeSevenIndustrialSolutions
Fix(config): Allow duplicate keys in replication.config

Pass strict=False to configparser.ConfigParser() in get_config()
so that Gerrit's git-style multi-valued options parse cleanly.

Gerrit's pull-replication plugin writes one fetch refspec per
line under the [remote "..."] section, e.g.

    [remote "onap"]
      url = https://gerrit.onap.org/r/a/${name}.git
      fetch = +refs/heads/*:refs/heads/*
      fetch = +refs/tags/*:refs/tags/*
      fetch = +refs/changes/*:refs/changes/*

This is valid git config syntax for representing a list of
values for the same key.  Python's configparser defaults to
strict=True and refuses repeated keys, raising
DuplicateOptionError on the second 'fetch =' line.

A diagnostic capture from a CI deployment showed every hook
firing crash with that exception the moment find_and_dispatch()
called get_replication_remotes() -> get_config(REPLICATION),
dropping every patchset-created, comment-added and
change-merged event before any workflow dispatch could run.

g2p only reads the single-valued url, authgroup and
remotenamestyle keys from each remote, never the multi-valued
fetch key, so the 'last value wins' semantics that strict=False
introduces for duplicate keys have no functional impact on g2p.

Adds:

* tests/fixtures/replication_multi_fetch.config covering the
  pull-replication shape that triggered the field crash;
* test_get_config_tolerates_duplicate_keys asserting the parser
  loads the fixture without raising;
* test_get_replication_remotes_tolerates_duplicate_keys
  asserting the higher-level helper still produces the expected
  remotes mapping for that fixture.

Co-authored-by: Claude <claude@anthropic.com>
Change-Id: I692e6e15c
Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>

516 of 556 relevant lines covered (92.81%)

0.93 hits per line

Source Files on job ubuntu-latest - py3.11 - 25859917105.1
  • Tree
  • List 8
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 25859917105
  • 5d036d4c on github
  • Prev Job for on main (#25802805456.1)
  • Next Job for on main (#25859983988.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc