Skip to content

feat!(WIP): migrate to just#666

Draft
mfocko wants to merge 1 commit into
packit:mainfrom
mfocko:chore/migrate-to-just
Draft

feat!(WIP): migrate to just#666
mfocko wants to merge 1 commit into
packit:mainfrom
mfocko:chore/migrate-to-just

Conversation

@mfocko

@mfocko mfocko commented Jul 8, 2026

Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: Matej Focko <mfocko@packit.dev>
@mfocko mfocko self-assigned this Jul 8, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread justfile

# [Internal] Helper to run pytest
_run-tests test_path:
PYTHONPATH=. PYTHONDONTWRITEBYTECODE=1 python3 -m pytest --verbose --showlocals {{test_path}}tests/unit

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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')}}

Comment thread justfile

# [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}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Comment thread justfile
# --- Testing (from Makefile.tests) ---

# Build the test images
build-test-images: build-test-image-fedora build-test-image-c9s

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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

Comment thread AGENTS.md
Comment on lines +33 to +34
just start DRY_RUN=true
just trigger-pipeline RHEL-12345

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The commands inside the code block are missing indentation, which breaks the markdown list formatting.

Suggested change
just start DRY_RUN=true
just trigger-pipeline RHEL-12345
just start DRY_RUN=true\n just trigger-pipeline RHEL-12345

Comment thread README-agents.md
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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The triage agent standalone command on line 133 (make JIRA_ISSUE=RHEL-12345 run-triage-agent-standalone) was missed during the migration to just. It should be updated to use just run-triage-agent RHEL-12345.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant