Raghav-Mah3shwari opened a new pull request, #1260: URL: https://github.com/apache/knox/pull/1260
What changes were proposed in this pull request? This PR adds pylint to the Python integration test pipeline so lint checks run before pytest in the Docker Compose tests container. If pylint fails, integration tests do not run. Changes include: Added pylint==4.0.5 to .github/workflows/tests/requirements.txt Updated .github/workflows/compose/docker-compose.yml to: Run pylint *.py after installing dependencies and before waiting for Knox / running pytest Upgrade the tests container from python:3.9-slim to python:3.10-slim (required by pylint 4.x) Fixed existing pylint violations across the integration test suite so the default pylint rules pass (10.00/10), including: Module, class, and function docstrings Line length, trailing whitespace, and trailing newline issues Replaced broad except Exception with requests.exceptions.RequestException in test_health.py Removed unnecessary f-strings and wrapped long lines in common_utils.py and test files How was this patch tested? Automated linting (local venv): cd .github/workflows/tests python3 -m venv .venv && source .venv/bin/activate pip install -r requirements.txt pylint *.py Result: 10.00/10 Docker Compose integration test workflow (local): # Build Knox runtime image (requires Maven artifacts in target/) docker compose -f ./.github/workflows/compose/docker-compose.yml build knox-dev # Start Knox stack and run tests (pylint runs first inside the tests container) docker compose -f ./.github/workflows/compose/docker-compose.yml up -d ldap knox docker compose -f ./.github/workflows/compose/docker-compose.yml up --exit-code-from tests tests Verified in the tests container output: Dependencies install successfully pylint *.py completes with score 10.00/10 Knox wait completes pytest runs afterward CI: The existing Apache Knox Docker Compose Tests GitHub Actions workflow (.github/workflows/tests.yml) will pick up the docker-compose change automatically on PRs. Integration Tests No new integration test cases were added. This change improves quality gates for the existing suite under .github/workflows/tests/. Existing integration tests were updated only to satisfy pylint (docstrings, formatting, minor exception handling). Test behavior and assertions are unchanged. UI changes N/A — no UI changes in this patch. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
