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] Error using custom rules which are in a subdirectory: Error: creating named volume \"kai-examples/rules\": running volume create option: names must match [a-zA-Z0-9][a-zA-Z0-9_.-]*: invalid argument\n" #357

Open
1 task done
jwmatthews opened this issue Oct 12, 2024 · 1 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.

Comments

@jwmatthews
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

Konveyor version

Latest as of Oct 3rd build, SHA: 9928bb0

Priority

Critical

Current Behavior

I attempted to use Kantra with a custom rule directory which had some other subdirectories in it's path.
Example:

I am running in a directory that has:

 kai_examples /
      rules

When I specify --rules ./kai_examples/rules kantra shows the below error

$ kantra analyze -i ./coolstore --enable-default-rulesets=false -o ./out --overwrite --rules ./kai-examples/rules
INFO[0000] running windup shim                           args="convert --outputdir=/opt/shimoutput /opt/xmlrules" output=/Users/jmatthews/tmp/r/out volumes="{\"./kai-examples/rules\":\"/opt/xmlrules/rules\",\"/var/folders/l1/1b7gzz8n02b5nrtdq51bnj4r0000gn/T/transform-output-996010118\":\"/opt/shimoutput\"}"
INFO[0000] generating shim log in file                   file=/Users/jmatthews/tmp/r/out/shim.log
/opt/podman/bin/podman run --rm --name SOUOLlpVvvDmXHps --entrypoint /usr/local/bin/windup-shim -v /var/folders/l1/1b7gzz8n02b5nrtdq51bnj4r0000gn/T/transform-output-996010118:/opt/shimoutput -v kai-examples/rules:/opt/xmlrules/rules quay.io/konveyor/kantra:latest convert --outputdir=/opt/shimoutput /opt/xmlrulesERRO[0000] container run error                           error="exit status 125"
ERRO[0000] failed to convert xml rules                   error="Error: creating named volume \"kai-examples/rules\": running volume create option: names must match [a-zA-Z0-9][a-zA-Z0-9_.-]*: invalid argument\n"
Error: Error: creating named volume "kai-examples/rules": running volume create option: names must match [a-zA-Z0-9][a-zA-Z0-9_.-]*: invalid argument

Grabbed latest Kantra available as of Oct 12, it looks to be a build from October 3 2024.

$ kantra version
version: latest
SHA: 9928bb083351904c0582bc1f4af2710985f56d2c
image: quay.io/konveyor/kantra

Also confirmed I see this with v0.5.3

version: v0.5.3
SHA: 215adcbbdfc337b5dee439404dc280d78e3e62f6
image: quay.io/konveyor/kantra

Expected Behavior

Assume kantra will be able to handle the extra directories in the path and use contents of the custom_rules directory

How Reproducible

Always (Default)

Steps To Reproduce

  1. git clone https://github.com/konveyor-ecosystem/coolstore.git
  2. git clone https://github.com/jmle/kai-examples.git
  3. kantra analyze -i ./coolstore --enable-default-rulesets=false -o ./out --overwrite --rules ./kai-examples/rules

Environment

  • OS: MacOS arm64

Anything else?

No response

@jwmatthews jwmatthews 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 12, 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 12, 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