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

Fix Tackle testapp analysis results #32

Merged
merged 20 commits into from
Sep 22, 2023
Merged

Conversation

aufi
Copy link
Member

@aufi aufi commented Sep 15, 2023

Current analysis report sets all Incidents lines to 0 and doesn't add Tags to the application.

Opening this PR to track progress on fixing it.

Expected analysis parameters and result preview: https://github.com/konveyor/go-konveyor-tests/blob/ac53206e49b97aaef0f866a0814c8c8530f4c8d2/analysis/tc_tackle_testapp_public.go

Related to #22 and #31

Current analysis report sets all Incidents lines to 0 and doesn't add
Tags to the application.

Opening this PR to track progress on fixing it.

Related to konveyor#22

Signed-off-by: Marek Aufart <maufart@redhat.com>
Signed-off-by: Marek Aufart <maufart@redhat.com>
Name: "Tackle Testapp public with deps",
Application: TackleTestApp,
Task: Analyze,
WithDeps: true,
Copy link
Member Author

Choose a reason for hiding this comment

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

Results in Mode.WithDeps = true, task example:

{
  "id": 15,
  "createUser": "admin.noauth",
  "updateUser": "",
  "createTime": "2023-09-15T14:33:40.123526733Z",
  "name": "",
  "addon": "analyzer",
  "data": {
    "mode": {
      "Repository": null,
      "artifact": "",
      "binary": false,
      "withDeps": true
    },
    "output": "/windup/report",
    "rules": {
      "identity": null,
      "labels": {
        "included": [
          "konveyor.io/target=linux",
          "konveyor.io/target=cloud-readiness"
        ]
      },
      "path": "",
      "repository": null
    },
    "scope": {
      "packages": {},
      "withKnown": false
    },
    "sources": [],
    "tagger": {
      "enabled": true
    },
    "targets": []
  },
  "application": {
    "id": 14,
    "name": "Tackle Testapp public FlEBi"
  },
  "state": "Succeeded",
  "image": "quay.io/konveyor/tackle2-addon-analyzer:latest",
  "pod": "konveyor-tackle/task-15-cjjv2",
  "started": "2023-09-15T14:33:40.151025412Z",
  "terminated": "2023-09-15T14:36:05.63047233Z",
  "bucket": {
    "id": 28
  },
  "activity": [
    "Fetching application.",
    "[CMD] Running: /usr/bin/ssh-agent -a /tmp/agent.1",
    "[CMD] succeeded.",
    "[SSH] Agent started.",
    "[GIT] Cloning: https://github.com/konveyor/tackle-testapp-public",
    "[FILE] Created /addon/.gitconfig.",
    "[CMD] Running: /usr/bin/git clone https://github.com/konveyor/tackle-testapp-public /addon/source/tackle-testapp-public",
    "[CMD] succeeded.",
    "[RULESET] fetching: id=19 (os/windows)",
    "[RULESET] fetching (dep): id=1 (.discovery)",
    "[RULESET] fetching (dep): id=22 (.technology-usage)",
    "[RULESET] fetching: id=18 (openshift)",
    "[CMD] Running: /usr/bin/windup-shim convert --outputdir /addon/rules/converted /addon/rules",
    "[CMD] succeeded.",
    "Settings: /addon/opt/settings.json",
    "> - name: go",
    ">   binaryPath: /usr/bin/generic-external-provider",
    ">   initConfig:",
    ">   - location: /addon/source/tackle-testapp-public",
    ">     analysisMode: full",
    ">     providerSpecificConfig:",
    ">       dependencyProviderPath: /usr/bin/golang-dependency-provider",
    ">       lspServerPath: /root/go/bin/gopls",
    ">       name: go",
    "> - name: java",
    ">   binaryPath: /jdtls/bin/jdtls",
    ">   initConfig:",
    ">   - location: /addon/source/tackle-testapp-public",
    ">     analysisMode: full",
    ">     providerSpecificConfig:",
    ">       bundles: /jdtls/java-analyzer-bundle/java-analyzer-bundle.core/target/java-analyzer-bundle.core-1.0.0-SNAPSHOT.jar",
    ">       depOpenSourceLabelsFile: /usr/local/etc/maven.default.index",
    ">       lspServerPath: /jdtls/bin/jdtls",
    "> - name: builtin",
    ">   initConfig:",
    ">   - location: /addon/source/tackle-testapp-public",
    ">     analysisMode: \"\"",
    "> ",
    "[CMD] Running: /usr/bin/konveyor-analyzer --provider-settings /addon/opt/settings.json --output-file /addon/report.yaml --rules /addon/rules/rulesets/19/rules --rules /addon/rules/rulesets/1/rules --rules /addon/rules/rulesets/22/rules --rules /addon/rules/rulesets/18/rules --rules /addon/rules/converted --label-selector (konveyor.io/target=linux||konveyor.io/target=cloud-readiness) --dep-label-selector !konveyor.io/dep-source=open-source",
    "[CMD] succeeded.",
    "[CMD] Running: /usr/bin/konveyor-analyzer-dep --provider-settings /addon/opt/settings.json --output-file /addon/deps.yaml",
    "[CMD] succeeded.",
    "Analysis reported. duration: 8.103962ms",
    "[TAG] Tagging Application 14.",
    "Facts updated.",
    "Done."
  ]
}

aufi and others added 18 commits September 15, 2023 16:53
Signed-off-by: Marek Aufart <maufart@redhat.com>
Signed-off-by: Marek Aufart <maufart@redhat.com>
Signed-off-by: Maayan Hadasi <mguetta@redhat.com>
Signed-off-by: Maayan Hadasi <mguetta@redhat.com>
Updating HUB_BASE_URL variables to be configured before calling a
Makefile targets.

Fixing error handling for failed analysis (missing analysis results in
Hub API) to fail gracefully.

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>
Adding DEBUG=1 to print full analysis results to output for easier
debugging.

Signed-off-by: Marek Aufart <maufart@redhat.com>
Signed-off-by: Marek Aufart <maufart@redhat.com>
Signed-off-by: Maayan Hadasi <mguetta@redhat.com>
Signed-off-by: Maayan Hadasi <mguetta@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
Copy link
Member Author

aufi commented Sep 22, 2023

Merging to get expected test results into CI.

@aufi aufi merged commit 8333871 into konveyor:main Sep 22, 2023
3 of 4 checks passed
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