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] Custom rule is not properly picked up when there is an app in the folder #350

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

Comments

@jmle
Copy link
Contributor

jmle commented Oct 2, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Konveyor version

0.5.3

Priority

Critical

Current Behavior

When specifying a custom rules directory in the command line with --rule, if the directory has also a folder with application data, ie the Coolstore app, the rule is not properly picked up:

.
├── ruleset.yaml
├── rule.yaml
└── test-data
    └── coolstore

If I remove the test-data directory, the rule works again.

Also, many tmp folders are created for some reason:

[...]
INFO[0001] creating temp ruleset                         name=img path=/tmp/analyze-rules-3378947653/test-data/coolstore/src/main/webapp/bower_components/patternfly/dist/img
[...]

Expected Behavior

Kantra (and/or the analyzer) should be able to search in a folder recursively for rules, ignoring everything that is not a rule, and the rule should be properly processed.

How Reproducible

Always (Default)

Steps To Reproduce

  1. Create a folder structure similar to the one specified in the "Current behavior" section. The additional rule should be correct.
  2. Analyze an application with --rules <folder> and the proper targets.
  3. See that the rule is not being picked up.

Environment

  • OS: Fedora 40
  • Kantra 0.5.3
  • podman 5.2

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 2, 2024
@konveyor-ci-bot
Copy link

This issue is currently awaiting triage.
If contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.
The triage/accepted label can be added by org members.

@konveyor-ci-bot konveyor-ci-bot bot added the needs-priority Indicates an issue or PR lacks a `priority/foo` label and requires one. label Oct 2, 2024
@jmle
Copy link
Contributor Author

jmle commented Oct 22, 2024

Potentially we could ignore folders with certain names like data when recursively walking through the directories, at least once we have settled on a convention for dir names?

@jmle jmle self-assigned this Oct 23, 2024
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-priority Indicates an issue or PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant