feat!(WIP): migrate to just#666
Conversation
Signed-off-by: Matej Focko <mfocko@packit.dev>
There was a problem hiding this comment.
Code Review
This pull request migrates the project's build, run, and test orchestration from a Makefile-based setup to a unified justfile using the just task runner, updating all documentation references accordingly. The review feedback highlights several issues with this migration: the _run-tests helper breaks custom test targets by hardcoding the test path, running tests inside containers will fail because just is not installed in the container images, and the SKIP_IMG_BUILD optimization was lost. Additionally, there is a broken markdown list format in AGENTS.md and a missed command migration in README-agents.md.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
|
||
| # [Internal] Helper to run pytest | ||
| _run-tests test_path: | ||
| PYTHONPATH=. PYTHONDONTWRITEBYTECODE=1 python3 -m pytest --verbose --showlocals {{test_path}}tests/unit |
There was a problem hiding this comment.
The _run-tests helper hardcodes tests/unit instead of using the TEST_TARGET environment variable. This breaks the ability to run specific test files or targets (e.g., TEST_TARGET=tests/unit/test_triage.py), which was supported in the original Makefile.tests and is still passed via --env TEST_TARGET in _run-tests-in-container.
PYTHONPATH=. PYTHONDONTWRITEBYTECODE=1 python3 -m pytest --verbose --showlocals {{test_path}}{{env('TEST_TARGET', 'tests/unit')}}
|
|
||
| # [Internal] Helper to run tests in a container | ||
| _run-tests-in-container image recipe: | ||
| {{container_tool}} run --rm -it -v $(pwd):/src:z -w /src --env TEST_TARGET {{image}} just {{recipe}} |
There was a problem hiding this comment.
The _run-tests-in-container helper executes just {{recipe}} inside the container. However, just is not installed in the current Containerfile.tests or Containerfile.c9s-tests (which are not modified in this PR). This will cause containerized tests to fail with a command not found error. Please ensure just is installed in the test container images, or invoke the test commands directly (e.g., via pytest) without requiring just inside the container.
| # --- Testing (from Makefile.tests) --- | ||
|
|
||
| # Build the test images | ||
| build-test-images: build-test-image-fedora build-test-image-c9s |
There was a problem hiding this comment.
In Makefile.tests, the SKIP_IMG_BUILD environment variable was used to skip building test images if they were already built or in CI environments. In the new justfile, build-test-images unconditionally runs both image builds as static dependencies. To restore this optimization, we can conditionally invoke the build recipes inside the recipe body.
build-test-images:\n @if [ -z "${SKIP_IMG_BUILD:-}" ]; then \\\n just build-test-image-fedora; \\\n just build-test-image-c9s; \\\n else \\\n echo "Skipping test image build (SKIP_IMG_BUILD is set)"; \\\n fi
| just start DRY_RUN=true | ||
| just trigger-pipeline RHEL-12345 |
| make PACKAGE=httpd VERSION=2.4.62 JIRA_ISSUE=RHEL-12345 BRANCH=c10s run-rebase-agent-standalone | ||
| make PACKAGE=httpd UPSTREAM_PATCHES=https://github.com/... JIRA_ISSUE=RHEL-12345 BRANCH=c10s run-backport-agent-standalone | ||
| make PACKAGE=httpd JIRA_ISSUE=RHEL-12345 BRANCH=c10s run-rebuild-agent-standalone | ||
| just run-rebase-agent c10s httpd 2.4.62 RHEL-12345 c10s "Initial rebase" |
No description provided.