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 indirect Dependency location #557

Merged
merged 11 commits into from
Apr 2, 2024

Conversation

aufi
Copy link
Member

@aufi aufi commented Mar 27, 2024

Updating dependency incident location lookup for indirect dependencies to point to "parent" dependency location. E.g. for maven-javax-to-jakarta-00002 rule.

Replaces #532

Related to https://issues.redhat.com/browse/MTA-2006

aufi added 6 commits March 27, 2024 13:43
Updating dependency incident location lookup for indirect dependencies
to point to "parent" dependency location. E.g. for `maven-javax-to-jakarta-00002` rule.

Related to https://issues.redhat.com/browse/MTA-2006

Signed-off-by: Marek Aufart <maufart@redhat.com>
Signed-off-by: Marek Aufart <maufart@redhat.com>
Signed-off-by: Marek Aufart <maufart@redhat.com>
Signed-off-by: Marek Aufart <maufart@redhat.com>
Signed-off-by: Marek Aufart <maufart@redhat.com>
Signed-off-by: Marek Aufart <maufart@redhat.com>
@aufi aufi changed the title Update indirect Dependency location 🐛 Update indirect Dependency location Mar 27, 2024
aufi added 2 commits March 27, 2024 14:42
Signed-off-by: Marek Aufart <maufart@redhat.com>
Signed-off-by: Marek Aufart <maufart@redhat.com>
Copy link
Contributor

@pranavgaikwad pranavgaikwad left a comment

Choose a reason for hiding this comment

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

Thank you for the fix, overall looks good. Requesting minor changes

xpath: /b:beans
- category: potential
customVariables: []
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can we shrink this rule, just keep the required fields for brevity i.e. remove labels, links, customVariables?

@@ -361,6 +374,19 @@
resolvedIdentifier: 7873092d39ef741575ca91378a6a21c388363ac8
extras:
artifactId: logback-core
baseDep:
name: ch.qos.logback.logback-classic
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can we produce only the required fields of the baseDep

@@ -745,6 +745,15 @@ func (dc DependencyCondition) Evaluate(ctx context.Context, log logr.Logger, con
if err == nil {
incident.LineNumber = &location.StartPosition.Line
incident.CodeLocation = &location
} else if baseDep, ok := matchedDep.dep.Extras["baseDep"]; ok {
Copy link
Contributor

Choose a reason for hiding this comment

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

since I looked into too many perf issues recently :)... maybe we can make only one call to GetLocation based on either direct or base dep?

@aufi
Copy link
Member Author

aufi commented Mar 28, 2024

Thanks for review @pranavgaikwad, will update!

aufi added 3 commits March 28, 2024 13:29
Signed-off-by: Marek Aufart <maufart@redhat.com>
Signed-off-by: Marek Aufart <maufart@redhat.com>
Signed-off-by: Marek Aufart <maufart@redhat.com>
@aufi aufi requested a review from pranavgaikwad March 28, 2024 14:21
Copy link
Contributor

@pranavgaikwad pranavgaikwad left a comment

Choose a reason for hiding this comment

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

@aufi Thank you! LGTM

@pranavgaikwad pranavgaikwad merged commit b4d2369 into konveyor:main Apr 2, 2024
6 checks passed
pranavgaikwad added a commit that referenced this pull request Apr 2, 2024
aufi pushed a commit that referenced this pull request Apr 3, 2024
This slipped through somehow after merging #351 I should have re-run CI
before merging #557

Signed-off-by: Pranav Gaikwad <pgaikwad@redhat.com>
pranavgaikwad pushed a commit to pranavgaikwad/analyzer-lsp that referenced this pull request Apr 8, 2024
pranavgaikwad added a commit to pranavgaikwad/analyzer-lsp that referenced this pull request Apr 8, 2024
This slipped through somehow after merging konveyor#351 I should have re-run CI
before merging konveyor#557

Signed-off-by: Pranav Gaikwad <pgaikwad@redhat.com>
pranavgaikwad pushed a commit to pranavgaikwad/analyzer-lsp that referenced this pull request Apr 8, 2024
Signed-off-by: Marek Aufart <maufart@redhat.com>
pranavgaikwad added a commit to pranavgaikwad/analyzer-lsp that referenced this pull request Apr 8, 2024
This slipped through somehow after merging konveyor#351 I should have re-run CI
before merging konveyor#557

Signed-off-by: Pranav Gaikwad <pgaikwad@redhat.com>
pranavgaikwad pushed a commit to pranavgaikwad/analyzer-lsp that referenced this pull request Apr 8, 2024
Signed-off-by: Marek Aufart <aufi.cz@gmail.com>
pranavgaikwad added a commit to pranavgaikwad/analyzer-lsp that referenced this pull request Apr 8, 2024
This slipped through somehow after merging konveyor#351 I should have re-run CI
before merging konveyor#557

Signed-off-by: Pranav Gaikwad <pgaikwad@redhat.com>
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