Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Update Issue Description #773

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
10 changes: 7 additions & 3 deletions api/analysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,8 @@ func (h AnalysisHandler) AppIssueReports(ctx *gin.Context) {
resources := []*IssueReport{}
type M struct {
model.Issue
Files int
Files int
Message string
}
id := h.pk(ctx)
err := h.DB(ctx).First(&model.Application{}, id).Error
Expand Down Expand Up @@ -1164,6 +1165,7 @@ func (h AnalysisHandler) AppIssueReports(ctx *gin.Context) {
"i.Effort",
"i.Labels",
"i.Links",
"n.Message",
"COUNT(distinct n.File) Files")
q = q.Table("Issue i,")
q = q.Joins("Incident n")
Expand Down Expand Up @@ -1201,8 +1203,10 @@ func (h AnalysisHandler) AppIssueReports(ctx *gin.Context) {
for i := range list {
m := list[i]
r := &IssueReport{
Files: m.Files,
Description: m.Description,
Files: m.Files,
// Append Incident Message to Description to provide more information on Issue detail
// (workaround until Analyzer output Violation struct gets updated to provide better structured data)
Description: fmt.Sprintf("%s\n\n%s", m.Description, m.Message),
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this comment is accurate or necessary. What is the anticipated change in the analyzer data?
This report is a denormalization already.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the main change should be adding Message field to the Violation/Issue, proposal that was discussed mainly with Juanma, Ramon and Shawn is konveyor/analyzer-lsp#452 (reply in thread)

When implementing the proposal, the Violation struct in analyzer-lsp would be changed (added fields and its population) and components using it as dependency including builder in tackle2-addon-analyzer, likely also Hub and UI will need adapt to this struct change too. That update in Hub should remove change introduced in this PR.

Category: m.Category,
RuleSet: m.RuleSet,
Rule: m.Rule,
Expand Down
Loading