Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ x-beeai-env: &beeai-env
JIRA_ALLOW_STATUS_CHANGES: ${JIRA_ALLOW_STATUS_CHANGES:-false}
ERRATA_ALLOW_STATUS_CHANGES: ${ERRATA_ALLOW_STATUS_CHANGES:-false}
AUTO_CHAIN: ${AUTO_CHAIN:-true}
TRIAGE_ENQUEUE_REPRODUCER: ${TRIAGE_ENQUEUE_REPRODUCER:-false}
REQUESTS_CA_BUNDLE: /etc/pki/tls/certs/ca-bundle.crt
SENTRY_ENVIRONMENT: ${SENTRY_ENVIRONMENT:-development}

Expand Down
3 changes: 3 additions & 0 deletions openshift/configmap-agents-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ data:
# When "true", agents assign reviewers to newly created MRs based on
# the package's bugzilla component contacts (Default Assignee + QA Contact).
ASSIGN_MR_REVIEWERS: "true"
# When "true", triage enqueues reproducer jobs for eligible resolutions.
# Unset or "false" disables auto-enqueue (manual: make trigger-reproducer).
TRIAGE_ENQUEUE_REPRODUCER: "false"
immutable: false
kind: ConfigMap
metadata:
Expand Down
25 changes: 20 additions & 5 deletions ymir/agents/prompts/reproducer/prompt.j2
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,22 @@ Execute the following steps in order.
same MR. Search open MRs primarily by **`{{ cve_id }}`** in title/description,
not only by `{{ jira_issue }}`.

{% if tests_clone_ready %}
**Pre-provisioned tests clone (orchestration):** The tests repository is already
cloned at `{{ tests_clone_path }}`{% if mr_source_branch %} on branch
`{{ mr_source_branch }}`{% endif %}{% if existing_mr_url %} for open MR
{{ existing_mr_url }}{% endif %}{% if existing_test_directory %}. The existing
reproducer test is at `{{ existing_test_directory }}/` — **adapt it in place**;
do NOT create a parallel directory or call `clone_repository` for this path{% else %}.
Do NOT call `clone_repository` for this path — it would destroy the checked-out
branch{% endif %}.
{% else %}
* Clone the RHEL tests repository using `clone_repository`:
- URL: `https://gitlab.com/redhat/rhel/tests/<package_name>`
- Do NOT specify a `branch` parameter — omit it so the tool clones the default branch.
- Use clone path `{{ reproducer_working_dir }}/tests-<package_name>`.
- If the clone path already exists, `clone_repository` removes and re-clones it — do NOT delete it yourself with `rm -rf`.
{% endif %}
* Determine the expected test directory by inspecting the tests repo layout
for this package (names are package-specific; do not assume a fixed scheme):
- For CVEs: typically under `Security/` (often `Security/<cve_id>/`, but
Expand Down Expand Up @@ -126,11 +137,11 @@ Execute the following steps in order.
(CVE, stable across streams) or ``<package>: [RHEL-…] ymir reproducer test``
(regression). When a regression test is adapted for another stream, the MR
title gains an additional ``[RHEL-…]`` key (e.g. ``[RHEL-100, RHEL-200]``).
If an open MR matches, note its URL as `existing_mr_url`. **Check out the MR
source branch** in the clone (via `get_merge_request_details` + `fetch_branch` +
`git checkout`) **before** copying/running the test — the test usually lives
only on that branch, not on the default branch yet. The MR does not need to be
merged first.
If an open MR matches, note its URL as `existing_mr_url`.{% if not tests_clone_ready %}
**Check out the MR source branch** in the clone (via `get_merge_request_details` +
`fetch_branch` + `git checkout`) **before** copying/running the test — the test
usually lives only on that branch, not on the default branch yet.{% endif %}
The MR does not need to be merged first.

* **If an existing test directory / matching test / open MR is found:**
1. Continue to steps 3–6 to reserve a Testing Farm machine for **this**
Expand Down Expand Up @@ -239,7 +250,11 @@ Execute the following steps in order.

4.1. Use the Already-Cloned Tests Repository

{% if tests_clone_ready %}
The tests repository was prepared by orchestration at `{{ tests_clone_path }}`{% if mr_source_branch %} on branch `{{ mr_source_branch }}`{% endif %}{% if existing_test_directory %} with the canonical test at `{{ existing_test_directory }}/`{% endif %}. Do NOT call `clone_repository` for this path.
{% else %}
The tests repository was already cloned in step 1.7 at `{{ reproducer_working_dir }}/tests-<package_name>`. If for any reason the clone is missing, re-clone it using `clone_repository` with URL `https://gitlab.com/redhat/rhel/tests/<package_name>` (no `branch` parameter) to `{{ reproducer_working_dir }}/tests-<package_name>`.
{% endif %}

* Create the test directory under the tests clone. Prefer package convention:
- CVEs: often `<tests_clone>/Security/<cve_id>/`
Expand Down
Loading
Loading