Uploaded image for project: 'Migration Toolkit for Applications'
  1. Migration Toolkit for Applications
  2. MTA-5173

Custom rules are ignored on Gradle apps

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Undefined Undefined
    • MTA 7.3.1
    • None
    • None
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • False
    • None

      Description of problem:

      Custom rules are ignored in Gradle apps in the hub and cli

       

      Version-Release number of selected component (if applicable): 7.3.0 

      How reproducible: Always

       

      Steps to Reproduce:

      1. Create an app with the following repository https://github.com/melix/jmh-gradle-example
      2. Analyze it using the custom rules attached to this bug

      The command used for testing this in mta-cli was:

      ./mta-cli analyze --overwrite --input ~/apps/jmh-gradle-example/ --output ~/Desktop/gradle-prob-bug --rules ~/Desktop/jmh-gradle-custom-rules.yaml

       

      Actual results:

      In the hub the rules are ignored and the following message is displayed in the analysis details:

      severity: Error description: '[Analyzer] files.jmh-gradle-annotation-state-test-rule: connection to the language server is closed, language server is not running'

       
      In kantra the following message id displayed in the analysis.log:

      time="2025-05-09T16:54:54+02:00" level=info msg="rule returned" ruleID=jmh-gradle-annotation-state-test-rule
      time="2025-05-09T16:54:54+02:00" level=error msg="failed to evaluate rule" error="exit status 1" ruleID=jmh-gradle-annotation-state-test-rule
      time="2025-05-09T16:54:54+02:00" level=info msg="Adding Carrier span info to context" worker=1
      time="2025-05-09T16:54:54+02:00" level=info msg="rule returned" ruleID=jmh-gradle2
      time="2025-05-09T16:54:54+02:00" level=error msg="failed to evaluate rule" error="exit status 1" ruleID=jmh-gradle2

      Expected results:

      The custom rules provided should trigger incidents.

      Additional info:

      I added the jmh-gradle2 rule to ensure there wasn't a problem with the rule itself, the jmh-gradle-annotation-state-test-rule rule worked before.

      I also tried with different combination of the rule by adding and removing lables.

        1. log-merged-15.yaml
          3.67 MB
        2. konveyor-analyzer.output.txt
          3.39 MB
        3. jmh-gradle-custom-rules.yaml
          1 kB
        4. image-2025-05-26-17-59-43-421.png
          image-2025-05-26-17-59-43-421.png
          44 kB
        5. gradle-prob-bug.zip
          3.91 MB

              jleflete@redhat.com Juanma Leflet Estrada
              rh-ee-abrugaro Alejandro Brugarolas
              Alejandro Brugarolas Alejandro Brugarolas
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: