Skip to content

Commit

Permalink
cc_apt_pipelining: Update docs, deprecate options
Browse files Browse the repository at this point in the history
In f2f530e the default was changed. This was never reflected to the
docs and may mislead users.
  • Loading branch information
holmanb committed Nov 3, 2023
1 parent d78ff37 commit b8fdf58
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
4 changes: 2 additions & 2 deletions cloudinit/config/cc_apt_pipelining.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
Value configuration options for this module are:
* ``false`` (Default): disable pipelining altogether
* ``none``, ``unchanged``, or ``os``: use distro default
* ``os``: (Default) use distro default
* ``false`` disable pipelining altogether
* ``<number>``: Manually specify pipeline depth. This is not recommended.""" # noqa: E501
),
"distros": distros,
Expand Down
19 changes: 15 additions & 4 deletions cloudinit/config/schemas/schema-cloud-config-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -883,10 +883,21 @@
},
{
"type": "string",
"enum": [
"none",
"unchanged",
"os"
"oneOf": [
{
"enum": [
"os"
]
},
{
"deprecated": true,
"deprecated_version": "22.4",
"deprecated_description": "Use ``os`` instead.",
"enum": [
"none",
"unchanged"
]
}
]
}
]
Expand Down
7 changes: 2 additions & 5 deletions tests/unittests/config/test_cc_apt_pipelining.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,14 @@ def test_false_disables_pipelining(self, m_write_file):
({"apt_pipelining": 1}, None),
({"apt_pipelining": True}, None),
({"apt_pipelining": False}, None),
({"apt_pipelining": "none"}, None),
({"apt_pipelining": "unchanged"}, None),
({"apt_pipelining": "os"}, None),
# Invalid schemas
({"apt_pipelining": "none"}, "Deprecated in version"),
({"apt_pipelining": "unchanged"}, "Deprecated in version"),
(
{"apt_pipelining": "bogus"},
re.escape(
"Cloud config schema errors: apt_pipelining: 'bogus' is"
" not of type 'boolean', apt_pipelining: 'bogus' is not"
" of type 'integer', apt_pipelining: 'bogus' is not one"
" of ['none', 'unchanged', 'os']"
),
),
),
Expand Down

0 comments on commit b8fdf58

Please sign in to comment.