[freeipa PR#3192][opened] Make `pycodestyle` results identical
by stanislavlevin
URL: https://github.com/freeipa/freeipa/pull/3192
Author: stanislavlevin
Title: #3192: Make `pycodestyle` results identical
Action: opened
PR body:
"""
Currently, pycodestyle is running on:
- make fastlint:
`$(PYTHON) -m pycodestyle --diff`
According to docs:
```
The project options are read from the [pycodestyle] section of the
tox.ini file or the setup.cfg file located in any parent folder of the
path(s) being processed.
```
So, pycodestyle respects tox.ini:
```
[pycodestyle]
# E402 module level import not at top of file
# W504 line break after binary operator
ignore = E402, W504
```
- PR Travis `lint`:
`pycodestyle --ignore=W504 --diff &> $PEP8_ERROR_LOG ||:`
According to docs:
```
Please note that if the option –ignore=errors is used, the
default configuration will be overridden and ignore only the
check(s) you skip.
```
So, pycodestyle doesn't respect tox.ini.
For now, fastlint ignores E402, W504, while Travis lint ignores only W504.
This issue is exposed by Azure Pipelines, which employs fastlint.
Fixes: https://pagure.io/freeipa/issue/7962
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/3192/head:pr3192
git checkout pr3192
3 years, 10 months
[freeipa PR#3163][opened] Getkeytab fixes
by abbra
URL: https://github.com/freeipa/freeipa/pull/3163
Author: abbra
Title: #3163: Getkeytab fixes
Action: opened
PR body:
"""
This is a set of initial patches needed to support a Samba server running on IPA domain member.
These patches by themselves do not enable Samba server yet. They fix assorted bugs I found when adding the support for SMB service and tests for them. Some patches were omitted due to the complexity to untangle.
Most of `test_xmlrpc` tests that rely on a comparison of the user/group results cannot tolerate running in an environment where trust to Active Directory support is enabled. Originally, I started adding fixes for these problems but it quickly escalated to several hundred failed tests. The main issue is a dictionary comparison feature that doesn't allow to specify an attribute to be optional. When trust to AD is enabled, all POSIX users and groups in IPA will get `ipaNTSecurityIdentifier` attribute and `ipantuserattrs`/`ipantgroupattrs` object class added at a creation time.
Dictionary comparison in tests will fail:
- a tracker-maintained dictionary would not have `ipantuserattrs`/`ipantgroupattrs` objectclasses
- a result returned from `user-add` / `group-add` commands might contain the objectclasses and `ipaNTSecurityIdentifier` or might not, depending on how powerful is the test machine so that `sidgen` plugin is able to add the attributes before `user-add` / `group-add` command would retrieve the entry
- if we would add `ipaNTSecurityIdentifier` into the tracker-maintained dictionary, the result comparison code will have no logic to understand that if `ipaNTSecurityIdentifier` is missing in the result, it is not a failure: `fuzzy_sid` class allows for `None` value.
- for group-finding tests, it is impossible to get just a subset of required groups. This prevents from any additional configuration on the test machines. An attempt to search by a wildcard with `ipa group-find --description="Test desc*"` fails because we escape "*" and that filter doesn't match. We need to refactor search code to allow a wildcard search to reduce the number of expected groups in such tests.
I started fixing these issues but they will evidently require a major refactoring of the test code. Meanwhile, these problems are tracked with https://pagure.io/freeipa/issue/7955
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/3163/head:pr3163
git checkout pr3163
3 years, 10 months