Allow set-siteconfig to set nonexisting keys.

Review Request #12596 — Created Sept. 13, 2022 and submitted

Information

Djblets
release-3.x

Reviewers

One annoying thing about the set-siteconfig management command is that
it would error out if you tried to set a key that wasn't already
explicitly set, even if a default was defined.

This change fixes that to allow setting those. We still do validation on
the "parent" keys when a setting path is drilling down into dicts, but
any leaf key can now be set.

Saw that I could now set items in siteconfig that I couldn't before.

Summary ID
Allow set-siteconfig to set nonexisting keys.
One annoying thing about the `set-siteconfig` management command is that it would error out if you tried to set a key that wasn't already explicitly set, even if a default was defined. This change fixes that to allow setting those. We still do validation on the "parent" keys when a setting path is drilling down into dicts, but any leaf key can now be set. Testing Done: Saw that I could now set items in siteconfig that I couldn't before.
98d715bdadc68dee717a94d72e5ac615d684239b
Description From Last Updated

I'm not sure how this works. If it's a new key, we get a NoneType. That will later crash when …

chipx86chipx86
chipx86
  1. 
      
  2. Show all issues

    I'm not sure how this works.

    If it's a new key, we get a NoneType. That will later crash when we do value_type(value).

    Even if fixed, we don't have a way of setting integers, bools, etc.

    I think we need to introduce a new type parameter and require that if setting a brand-new key.

  3. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-4.x (d9b5ab6)
Loading...