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

[BUG] "Ghost" incidents on line 0 #357

Closed
1 task done
jmle opened this issue Oct 5, 2023 · 2 comments
Closed
1 task done

[BUG] "Ghost" incidents on line 0 #357

jmle opened this issue Oct 5, 2023 · 2 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@jmle
Copy link
Contributor

jmle commented Oct 5, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Konveyor version

0.3.0-alpha.5

Priority

Major

Current Behavior

On certain issues, when viewing the Affected files section, there appear to be an empty incident:
image

The second incident is correct.
image

Expected Behavior

No empty incidents on line 0 should appear.

How Reproducible

Always (Default)

Steps To Reproduce

  1. In the given environment, look for the issue Replace the Java EE version with the Jakarta equivalent with rule javaee-to-jakarta-namespaces-00033:
    image
  2. Click on "View affected files".
  3. Click on the file /addon/source/sample/daytrader-ee7-ejb/src/main/resources/META-INF/persistence.xml to see an example.

Environment

* Fedora 38
* minikube version: v1.31.2
* Konveyor 0.3.0-alpha.5
* [sample.daytrader7 app (master branch)](https://github.com/WASdev/sample.daytrader7)
* Analysis configuration:
** Source code + dependencies
** eap8, quarkus, openjdk17, azure, cloud-readiness, camel3
** Application and internal dependencies only
** No custom rules
** No additional advanced options

Anything else?

No response

@jmle jmle added kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 5, 2023
@dymurray dymurray added this to Planning Oct 6, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in Planning Oct 6, 2023
@djzager djzager self-assigned this Oct 10, 2023
@djzager
Copy link
Member

djzager commented Oct 12, 2023

It turns out that neither the xmlquery or jsonquery dependencies we rely on to find these patterns keep track of the location in the document where the match was found. Doing this retroactively, that is after having found the respective "node", isn't practical as a simple grep for the inner text of the node may (or some similar algorithm) would not necessary give us the correct location. Additionally, it isn't safe for us to just return the entire file as a codeSnip because there are no guarantees on the maximum size of the document.

tl;dr the UI issue will cover the rendering portion of this --> We don't want to show empty snippets. From the analyzer perspective, this is a duplicate of #254 that would be nice for us to have but would need to be prioritized for a future release.

@djzager
Copy link
Member

djzager commented Oct 12, 2023

Closing this as a duplicate of #254 that we can prioritize in a future release.

@djzager djzager closed this as not planned Won't fix, can't repro, duplicate, stale Oct 12, 2023
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Planning Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
Status: ✅ Done
Development

No branches or pull requests

2 participants