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
18 changes: 18 additions & 0 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,24 @@
"line_number": 83
}
],
"openshift/deployment-rebuild-agent-c10s.yml": [
{
"type": "Secret Keyword",
"filename": "openshift/deployment-rebuild-agent-c10s.yml",
"hashed_secret": "e00a4cd07445154f8d1b589ad5b7152fdf7d88d0",
"is_verified": false,
"line_number": 79
}
],
"openshift/deployment-rebuild-agent-c9s.yml": [
{
"type": "Secret Keyword",
"filename": "openshift/deployment-rebuild-agent-c9s.yml",
"hashed_secret": "e00a4cd07445154f8d1b589ad5b7152fdf7d88d0",
"is_verified": false,
"line_number": 79
}
],
"openshift/deployment-rebase-agent-c10s.yml": [
{
"type": "Secret Keyword",
Expand Down
46 changes: 41 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ IMAGE_NAME ?= beeai-agent
COMPOSE_FILE ?= compose.yaml
DRY_RUN ?= false
MOCK_JIRA ?= false
JIRA_DRY_RUN ?= false
AUTO_CHAIN ?= true
FORCE_CVE_TRIAGE ?= false
LOKI_URL ?= http://loki.tft.osci.redhat.com/
LOKI_SINCE ?= 24h
LOKI_LIMIT ?= 3000
Expand All @@ -26,6 +28,7 @@ run-triage-agent-standalone:
-e JIRA_ISSUE=$(JIRA_ISSUE) \
-e DRY_RUN=$(DRY_RUN) \
-e MOCK_JIRA=$(MOCK_JIRA) \
-e FORCE_CVE_TRIAGE=$(FORCE_CVE_TRIAGE) \
triage-agent

.PHONY: run-triage-agent-e2e-tests
Expand Down Expand Up @@ -92,6 +95,33 @@ run-backport-agent-c10s-standalone:
run-backport-agent-standalone: run-backport-agent-c10s-standalone


.PHONY: run-rebuild-agent-c9s-standalone
run-rebuild-agent-c9s-standalone:
$(COMPOSE_AGENTS) run --rm \
-e PACKAGE=$(PACKAGE) \
-e JIRA_ISSUE=$(JIRA_ISSUE) \
-e BRANCH=$(BRANCH) \
-e DRY_RUN=$(DRY_RUN) \
-e MOCK_JIRA=$(MOCK_JIRA) \
-e DEPENDENCY_ISSUE=$(DEPENDENCY_ISSUE) \
-e DEPENDENCY_COMPONENT=$(DEPENDENCY_COMPONENT) \
rebuild-agent-c9s

.PHONY: run-rebuild-agent-c10s-standalone
run-rebuild-agent-c10s-standalone:
$(COMPOSE_AGENTS) run --rm \
-e PACKAGE=$(PACKAGE) \
-e JIRA_ISSUE=$(JIRA_ISSUE) \
-e BRANCH=$(BRANCH) \
-e DRY_RUN=$(DRY_RUN) \
-e MOCK_JIRA=$(MOCK_JIRA) \
-e DEPENDENCY_ISSUE=$(DEPENDENCY_ISSUE) \
-e DEPENDENCY_COMPONENT=$(DEPENDENCY_COMPONENT) \
rebuild-agent-c10s

.PHONY: run-rebuild-agent-standalone
run-rebuild-agent-standalone: run-rebuild-agent-c10s-standalone

.PHONY: run-mr-agent-c9s-standalone
run-mr-agent-c9s-standalone:
$(COMPOSE_AGENTS) run --rm \
Expand Down Expand Up @@ -133,11 +163,11 @@ build-jira-issue-fetcher:

.PHONY: start
start:
DRY_RUN=$(DRY_RUN) MOCK_JIRA=$(MOCK_JIRA) AUTO_CHAIN=$(AUTO_CHAIN) $(COMPOSE_AGENTS) up
DRY_RUN=$(DRY_RUN) MOCK_JIRA=$(MOCK_JIRA) JIRA_DRY_RUN=$(JIRA_DRY_RUN) AUTO_CHAIN=$(AUTO_CHAIN) $(COMPOSE_AGENTS) up

.PHONY: start-detached
start-detached:
DRY_RUN=$(DRY_RUN) MOCK_JIRA=$(MOCK_JIRA) AUTO_CHAIN=$(AUTO_CHAIN) $(COMPOSE_AGENTS) up -d
DRY_RUN=$(DRY_RUN) MOCK_JIRA=$(MOCK_JIRA) JIRA_DRY_RUN=$(JIRA_DRY_RUN) AUTO_CHAIN=$(AUTO_CHAIN) $(COMPOSE_AGENTS) up -d

.PHONY: stop
stop:
Expand All @@ -160,6 +190,10 @@ logs-backport:
logs-rebase:
$(COMPOSE_AGENTS) logs -f rebase-agent

.PHONY: logs-rebuild
logs-rebuild:
$(COMPOSE_AGENTS) logs -f rebuild-agent

.PHONY: logs-jira-issue-fetcher
logs-jira-issue-fetcher:
$(COMPOSE) -f $(COMPOSE_FILE) --profile manual logs -f jira-issue-fetcher
Expand All @@ -179,6 +213,8 @@ logs-loki-help:
@echo " - backport-agent-c10s"
@echo " - rebase-agent-c9s"
@echo " - rebase-agent-c10s"
@echo " - rebuild-agent-c9s"
@echo " - rebuild-agent-c10s"
@echo " - supervisor-collector"
@echo " - supervisor-processor"
@echo " - mcp-gateway"
Expand All @@ -192,11 +228,11 @@ logs-loki:
.PHONY: trigger-pipeline
trigger-pipeline:
@if [ -z "$(JIRA_ISSUE)" ]; then \
echo "Usage: make trigger-pipeline JIRA_ISSUE=RHEL-12345"; \
echo "Usage: make trigger-pipeline JIRA_ISSUE=RHEL-12345 [FORCE_CVE_TRIAGE=true]"; \
exit 1; \
fi
@echo "Triggering pipeline for issue: $(JIRA_ISSUE)"
$(COMPOSE_AGENTS) exec valkey redis-cli LPUSH triage_queue '{"metadata": {"issue": "$(JIRA_ISSUE)"}}'
@echo "Triggering pipeline for issue: $(JIRA_ISSUE) (force_cve_triage=$(FORCE_CVE_TRIAGE))"
$(COMPOSE_AGENTS) exec valkey redis-cli LPUSH triage_queue '{"metadata": {"issue": "$(JIRA_ISSUE)", "force_cve_triage": $(FORCE_CVE_TRIAGE)}}'


# Testing and Release Supervisor
Expand Down
9 changes: 9 additions & 0 deletions README-agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ make start DRY_RUN=true AUTO_CHAIN=false # Combine both

# Process a JIRA issue
make trigger-pipeline JIRA_ISSUE=RHEL-12345

# Force triage of Y-stream CVEs (normally skipped)
make trigger-pipeline JIRA_ISSUE=RHEL-12345 FORCE_CVE_TRIAGE=true
```

**Environment variables:**
Expand All @@ -99,16 +102,22 @@ make trigger-pipeline JIRA_ISSUE=RHEL-12345
| `DRY_RUN` | `false` | Skip Jira writes, git pushes, and MR creation |
| `AUTO_CHAIN` | `true` | Route triaged issues to downstream backport/rebase queues. Set to `false` to disable routing. |
| `MOCK_JIRA` | `false` | Use mock Jira API instead of real Jira |
| `JIRA_DRY_RUN` | `false` | Skip all Jira write operations (status, comments, labels, fields) while keeping reads working |
| `FORCE_CVE_TRIAGE` | `false` | Force triage of CVE issues that would normally be skipped (e.g. Y-stream CVEs) |

### Individual Agents Runs
```bash
# Test specific agents standalone
make JIRA_ISSUE=RHEL-12345 run-triage-agent-standalone
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

# Or with dry-run
DRY_RUN=true make JIRA_ISSUE=RHEL-12345 run-triage-agent-standalone

# Force triage of a Y-stream CVE
make JIRA_ISSUE=RHEL-12345 FORCE_CVE_TRIAGE=true run-triage-agent-standalone
```

Use commas to delimit multiple patch/commit URLs in `UPSTREAM_PATCHES`.
Expand Down
Loading
Loading