Page MenuHomePhabricator

scap code style check is silently ignored
Closed, ResolvedPublic

Description

Scap has an unconventional test runner setup, where a script (scripts/check) runs several test and check tools based on what's installed on the system. Tools that are not available are silently skipped. In CI, those are run in a Docker container with dependencies to install declared in test-requirements.txt and in the Blubber image definition.

One of those checks is formatting with the black autoformatter. However, black is not installed in the Docker environment and so has been silently ignored by the test suite for ages. The result is that running scap's check script in an environment with black installed results it complaining about several thousand lines (about 2k added and 1k removed as of time of writing). This is not ideal, so the check should either be fixed (preferred by the task author) or removed.

Details

ReferenceSource BranchDest BranchAuthorTitle
repos/releng/scap!197master-I0d41d2d71080c491cb9622819e0063d01d5da9ecmasterdancyTests: Always run shellcheck, pytest, flake8, black, and sphinx-build
repos/releng/scap!196master-I43285c3674b1144f260ddc2b3207360b2ffc95d1masterdancyReformat sources using black
repos/releng/scap!195master-I3cf0e8264fc24ec460e7c998ed45c2bb09ca4e93masterdancyAdd 'black' to test-requirements.txt
Customize query in GitLab

Event Timeline

taavi renamed this task from scap tries to format itself with black, but does not to scap code style check is silently ignored.Sun, Nov 19, 10:41 AM

dancy closed https://gitlab.wikimedia.org/repos/releng/scap/-/merge_requests/197

Tests: Always run shellcheck, pytest, flake8, black, and sphinx-build

dancy reopened https://gitlab.wikimedia.org/repos/releng/scap/-/merge_requests/197

Tests: Always run shellcheck, pytest, flake8, black, and sphinx-build

dancy changed the task status from Open to In Progress.Mon, Nov 27, 6:22 PM
dancy claimed this task.
dancy triaged this task as Low priority.

dancy merged https://gitlab.wikimedia.org/repos/releng/scap/-/merge_requests/197

Tests: Always run shellcheck, pytest, flake8, black, and sphinx-build