Assigned
Status Update
Comments
lu...@gmail.com <lu...@gmail.com>
ap...@google.com <ap...@google.com> #3
Project: gerrit
Branch: stable-3.6
commit de2ebbdc37b20cd78792c0ce25e0f2053c211842
Author: Luca Milanesio <luca.milanesio@gmail.com>
Date: Tue May 28 14:36:18 2024
Do not ignore SubmitRecord status from Prolog rules
When translating a SubmitRecord into a SubmitRequirement in Ie0fbf0e70,
the status field was forgotten in the translation and ignored.
A custom Prolog rule returning a status "OK" with extra labels was
therefore considered as not satisifed requirement whilst it should have
been passed them.
When the overall SubmitRecord.status is OK, skip all
the other labels that are not compatible with the
SubmitRecord.status field.
Restore the behaviour observed in Gerrit with custom
Prolog rules in v3.5 or earlier versions.
Bug: Issue 343218480
Release-Notes: Fix translation of custom Prolog rules SubmitRecord to SubmitRequirement(s)
Change-Id: Ib0ac6c7638dece3d14261a3ac45c43825e7ecec8
M java/com/google/gerrit/server/project/SubmitRequirementsAdapter.java
M javatests/com/google/gerrit/server/project/SubmitRequirementsAdapterTest.java
https://gerrit-review.googlesource.com/426977
Branch: stable-3.6
commit de2ebbdc37b20cd78792c0ce25e0f2053c211842
Author: Luca Milanesio <luca.milanesio@gmail.com>
Date: Tue May 28 14:36:18 2024
Do not ignore SubmitRecord status from Prolog rules
When translating a SubmitRecord into a SubmitRequirement in Ie0fbf0e70,
the status field was forgotten in the translation and ignored.
A custom Prolog rule returning a status "OK" with extra labels was
therefore considered as not satisifed requirement whilst it should have
been passed them.
When the overall SubmitRecord.status is OK, skip all
the other labels that are not compatible with the
SubmitRecord.status field.
Restore the behaviour observed in Gerrit with custom
Prolog rules in v3.5 or earlier versions.
Bug:
Release-Notes: Fix translation of custom Prolog rules SubmitRecord to SubmitRequirement(s)
Change-Id: Ib0ac6c7638dece3d14261a3ac45c43825e7ecec8
M java/com/google/gerrit/server/project/SubmitRequirementsAdapter.java
M javatests/com/google/gerrit/server/project/SubmitRequirementsAdapterTest.java
Description
*** !!!! THIS BUG TRACKER IS FOR GERRIT CODE REVIEW !!!! *** Do not submit bugs for chrome/android and issues with your company's *** Gerrit setup here. Those issues belong in different issue trackers.
Context
The issue is applicable to Gerrit projects with a custom Prolog rule that would use the
ok()
predicate for forcing a submit record passing state.What steps will reproduce the problem?
rules.pl
using aok()
predicate to force a submit record statusExample submit record generated:
What is the expected output?
The change is submittable as it was in v3.5.
What do you see instead?
The change is not submittable and the requirement
Still-Needed_label
is blocking the submission.Please provide any additional information below.
The problem was introduced with the SubmitRecord to SubmitRequirement adapter code inhttps://gerrit-review.googlesource.com/c/gerrit/+/316540 which did not take the forcing use-case using the
ok()
predicate.