New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 706342 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 702830
Owner: ----
Closed: Dec 5
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Duplicate keys in a service manifest appear to result in second entry silently overwriting first

Project Member Reported by blundell@chromium.org, Mar 29 2017

Issue description

I encountered this by mistakenly doing the following:

....
  "requires": {
    "foo" : [ "bar" ],
    "foo" : [ "baz" ],
  }
....

This manifest was accepted and resulted in runtime behavior of the request connection to foo:bar being denied. Either this manifest should be rejected or the entries should be merged.
 

Comment 1 by roc...@chromium.org, Apr 10 2017

Cc: -roc...@chromium.org
Owner: roc...@chromium.org
Status: Assigned (was: Available)
Taking this to get it in my backlog. We can just make the collator complain about duplicate keys.

Comment 2 by roc...@chromium.org, May 29 2017

Cc: roc...@chromium.org
Components: Internals>ServiceManager
Owner: ----
Status: Available (was: Assigned)

Comment 3 by laforge@google.com, Nov 1 2017

Components: -Internals>ServiceManager Internals>Services>ServiceManager
Labels: ServiceManagerImprovification
General SM bug triage.

Just took a very quick look at this. We do collision detection when merging dicts, but Python's JSON parser itself *does not* do collision detection.

We can fix this by supplying a custom object_pairs_hook when calling json.load.
Cc: -roc...@chromium.org rockot@google.com
Mergedinto: 702830
Status: Duplicate (was: Available)
Duping into an older bug I had forgotten about despite having triaged both of them recently... :|

Sign in to add a comment