URL:
https://github.com/freeipa/freeipa/pull/5979
Author: stanislavlevin
Title: #5979: schema plugin: Generate stable fingerprint
Action: opened
PR body:
"""
If some Param defines several values for `exclude` or `include` attributes then API schema
hash will be unstable.
First, these Param's attributes are converted to frozenset (`ipalib.parameters`), then
`ipaserver.plugins.schema` plugin converts `exclude` and `include` attrs to list.
Set/frozenset in turn, is unordered collection \[0\]. So, the end order of values is
undefined.
But due to the nature of sets:
two sets are equal if and only if every element of each set is
contained in the other (each is a subset of the other)
the order of values can be ignored.
Note: other Param's attrs with type frozenset are not affected because they are not
processed by the schema plugin.
\[0\]:
https://docs.python.org/3/library/stdtypes.html#set-types-set-frozenset
Fixes:
https://pagure.io/freeipa/issue/8955
"""
To pull the PR as Git branch:
git remote add ghfreeipa
https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/5979/head:pr5979
git checkout pr5979