Skip to content

Conversation

@nforro
Copy link
Member

@nforro nforro commented Dec 1, 2025

Copy link
Contributor

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

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 introduces a new Merge Request Agent designed to process feedback on existing merge requests. The changes include the agent's main logic, workflow definition, supporting tasks, data models, and configuration files.

My review has identified several critical issues in the new agent's workflow logic that would cause runtime errors, such as typos in variable names, incorrect state access, and invalid workflow transitions. There are also some medium-severity issues related to unused imports and incorrect type hints that should be addressed to improve code quality and maintainability. Overall, the structure of the new agent is sound, but these critical bugs need to be fixed before it can function correctly.

@nforro
Copy link
Member Author

nforro commented Dec 1, 2025

@nforro
Copy link
Member Author

nforro commented Dec 2, 2025

/gemini review

Copy link
Contributor

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

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 introduces a new Merge Request Agent capable of processing feedback on existing merge requests. The agent is integrated into the system with new Makefile targets and Docker Compose services. The changes include a new workflow for the agent, new data models for merge request details, and new/refactored tasks for interacting with Git and GitLab. The implementation is solid, but I've found a critical issue in the workflow logic that could lead to failures when committing changes, and a minor issue with a docstring. My review includes suggestions to fix these issues.

Signed-off-by: Nikola Forró <[email protected]>
@nforro
Copy link
Member Author

nforro commented Dec 2, 2025

/gemini review

Copy link
Contributor

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

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 introduces a new merge request agent designed to process and apply feedback from MR comments. The changes are comprehensive, including the agent's logic, workflow steps, supporting tasks, data models, and necessary configuration updates in the Makefile and compose.yaml. The implementation also refactors some existing task functions for better modularity and adds new GitLab tools with corresponding unit tests. The overall approach is sound, but I have identified a couple of areas where robustness and maintainability can be improved.

Copy link
Member

@lbarcziova lbarcziova left a comment

Choose a reason for hiding this comment

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

very nice work, thanks Nikola! I'm ok with merging as is

Comment on lines +567 to +576
return MergeRequestDetails(
source_repo=mr.source_project.get_git_urls()["git"],
source_branch=mr.source_branch,
target_repo_name=mr.target_project.gitlab_repo.name,
target_branch=mr.target_branch,
title=mr.title,
description=mr.description,
last_updated_at=mr._raw_pr.updated_at,
comments=[c for c in comments if f"@{username}" in c.message],
)
Copy link
Member

Choose a reason for hiding this comment

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

nice and easy start, we can advance this later as needed

Comment on lines +63 to +72
2. If you updated the spec file, use `rpmlint <PACKAGE>.spec` to validate your changes and fix any new issues.
3. Verify any changes to patches by running `centpkg --name=<PACKAGE> --namespace=rpms --release=<DIST_GIT_BRANCH> prep`.
Repeat as necessary. Do not remove any patches unless all their hunks have been already applied
to the upstream sources.
4. If you removed any patch file references from the spec file (e.g. because they were already applied upstream),
you must remove all the corresponding patch files from the repository as well.
5. Generate a SRPM using `centpkg --name=<PACKAGE> --namespace=rpms --release=<DIST_GIT_BRANCH> srpm`.
Copy link
Member

Choose a reason for hiding this comment

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

in future, it would be good to have these shareable (between backport/rebase/mr iteration, we could think of general packaging instructions, wdyt?

Copy link
Member Author

Choose a reason for hiding this comment

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

Definitely.

{{comments}}
You are working on Jira issue {{jira_issue}}.
Copy link
Member

Choose a reason for hiding this comment

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

I am wondering if it would be useful giving more context into "what is being fixed", but probablly the merge_request_description is usually descriptive enough?

Copy link
Member Author

Choose a reason for hiding this comment

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

In the future we might need to add Jira details. I suppose it depends on how substantial are the requested changes, but if very, then maybe rerunning backport/rebase with feedback from the MR would be a better way.

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.

2 participants