Repository navigation
Expose latest project status in notification subjects - #7704
Conversation
Allow notification filters to select the latest project version using subject.project.is_latest. Populate the status consistently for model-backed and database-backed subjects. Signed-off-by: jdotc1 <[email protected]>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 4 |
🟢 Coverage 100.00% diff coverage · +0.02% coverage variation
Metric Results Coverage variation ✅ +0.02% coverage variation (-1.00%) Diff coverage ✅ 100.00% diff coverage (70.00%) Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (3896b29) 45919 40325 87.82% Head commit (16c882f) 45921 (+2) 40334 (+9) 87.83% (+0.02%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#7704) 3 3 100.00% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Signed-off-by: Jeff <[email protected]>
|
Addressed the three review comments in The full CI failure exposed a timing assumption in a separate Dex test: its competing child could finish before the parent attempted the duplicate instance ID. Could a maintainer approve the workflows for |
Hold the existing child run on an external event until the parent rejection has been asserted. A three-second timer could finish under CI load before the parent attempted to create its child, allowing the parent to complete successfully instead of exercising duplicate instance rejection. Signed-off-by: Jeff <[email protected]>
|
Thank you for your time reviewing this PR. When you have a chance, could you please approve the pending workflows for |
Description
Expose the existing project latest-version status in notification subjects so filters can use
subject.project.is_latest == true. Populate it for both model-backed notifications and database-backed subjects, including affected-project lists and summary lookups.Addressed Issue
Closes #6590.
Additional Details
Adds optional protobuf field
is_latest = 8and projects the existingPROJECT.IS_LATESTcolumn consistently through the notification mapper. No database migration or new dependency is needed.Validation:
NotificationModelConverterTestpassed after the change: 2 tests, 0 failures/errors/skips. It checks explicit field presence, both values, and evaluation of the actual CEL filter expression.NotificationSubjectDaoTestpassed: 12 tests, 0 failures/errors/skips, including the new true/false assertions and updated subject JSON expectations. Executed only this pending class throughjacoco:prepare-agent surefire:test -Dtest=NotificationSubjectDaoTestagainst the already compiled classes. Earlier successful checks were reused without rerunning.No full test suite or end-to-end notification delivery run.
Checklist
docs/adr/