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

✨ Replace windup with analyzer-lsp #249

Merged
merged 4 commits into from
Jul 21, 2023
Merged

Conversation

djzager
Copy link
Member

@djzager djzager commented Jul 6, 2023

Fixes #244

@djzager djzager marked this pull request as ready for review July 6, 2023 21:37
@djzager
Copy link
Member Author

djzager commented Jul 10, 2023

Looks like the pod starts:

tackle2-hub on  main [!] via 🐹 v1.20.5
➜  kubectl describe -n konveyor-tackle pod/task-1-4jzz6
Name:             task-1-4jzz6
Namespace:        konveyor-tackle
Priority:         0
Service Account:  tackle-hub
Node:             minikube/192.168.49.2
Start Time:       Mon, 10 Jul 2023 13:50:21 -0400
Labels:           app=tackle
                  role=task
                  task=1
Annotations:      <none>
Status:           Pending
IP:
IPs:              <none>
Containers:
  main:
    Container ID:
    Image:          quay.io/konveyor/tackle2-addon-analyzer:latest
    Image ID:
    Port:           <none>
    Host Port:      <none>
    State:          Waiting
      Reason:       ContainerCreating
    Ready:          False
    Restart Count:  0
    Limits:
      cpu:     1
      memory:  6Gi
    Requests:
      cpu:     1
      memory:  4Gi
    Environment:
      HUB_BASE_URL:  http://tackle-hub.konveyor-tackle.svc:8080
      TASK:          1
      TOKEN:         <set to the key 'TOKEN' in secret 'task-1-ch87g'>  Optional: false
    Mounts:
      /cache from cache (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-7rfxt (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             False
  ContainersReady   False
  PodScheduled      True
Volumes:
  cache:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:
    SizeLimit:  <unset>
  kube-api-access-7rfxt:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
QoS Class:                   Burstable
Node-Selectors:              <none>
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type    Reason     Age   From               Message
  ----    ------     ----  ----               -------
  Normal  Scheduled  26s   default-scheduler  Successfully assigned konveyor-tackle/task-1-4jzz6 to minikube
  Normal  Pulling    25s   kubelet            Pulling image "quay.io/konveyor/tackle2-addon-analyzer:latest"

Not sure if there is anything more to do at this point to verify it's working from the operator's perspective.

Copy link

@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.

LGTM, I'd argue we dont need limits by default. Dont feel too strongly though.

hub_container_limits_memory: "800Mi"
hub_container_requests_cpu: "100m"
hub_container_requests_memory: "350Mi"
hub_container_limits_cpu: "1"

Choose a reason for hiding this comment

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

@djzager do we really need limits?

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like we should have a limit to be a good citizen on the cluster. That said, I don't know if 1 core is appropriate for out-of-the-box but felt sure that 100m was not enough.

@djzager
Copy link
Member Author

djzager commented Jul 10, 2023

tackle2-hub on  main [!] via 🐹 v1.20.5
➜  curl -X GET $(minikube ip)/hub/tasks/1 | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2466    0  2466    0     0  1026k      0 --:--:-- --:--:-- --:--:-- 1204k
{
  "id": 1,
  "createUser": "",
  "updateUser": "",
  "createTime": "2023-07-10T17:50:20.621875127Z",
  "name": "Dog.1.windup",
  "addon": "analyzer",
  "data": {
    "mode": {
      "artifact": "",
      "binary": false,
      "diva": false,
      "withDeps": false
    },
    "rules": {
      "labels": {
        "excluded": [],
        "included": [
          "konveyor.io/target=cloud-readiness"
        ]
      },
      "path": "",
      "rulesets": [
        {
          "id": 2,
          "name": "Containerization"
        }
      ],
      "tags": {
        "excluded": []
      }
    },
    "scope": {
      "packages": {
        "excluded": [],
        "included": []
      },
      "withKnown": false
    },
    "sources": [],
    "tagger": {
      "enabled": true
    },
    "targets": []
  },
  "application": {
    "id": 1,
    "name": "Dog"
  },
  "state": "Failed",
  "image": "quay.io/konveyor/tackle2-addon-analyzer:latest",
  "bucket": {
    "id": 2
  },
  "started": "2023-07-10T18:13:17.519987938Z",
  "terminated": "2023-07-10T18:13:25.585307201Z",
  "errors": [
    {
      "severity": "Error",
      "description": "Pod failed: "
    }
  ],
  "pod": "konveyor-tackle/task-1-464gr",
  "retries": 1,
  "report": {
    "id": 1,
    "createUser": "admin.noauth",
    "updateUser": "admin.noauth",
    "createTime": "2023-07-10T18:13:19.320463815Z",
    "status": "Failed",
    "errors": [
      {
        "severity": "Error",
        "description": "[CMD] /usr/bin/konveyor-analyzer failed: exit status 1."
      }
    ],
    "activity": [
      "Fetching application.",
      "[CMD] Running: /usr/bin/ssh-agent -a /tmp/agent.1",
      "[CMD] succeeded.",
      "[SSH] Agent started.",
      "[GIT] Cloning: https://github.com/WASdev/sample.daytrader7.git",
      "[FILE] Created /addon/.gitconfig.",
      "[CMD] Running: /usr/bin/git clone https://github.com/WASdev/sample.daytrader7.git /addon/source/sample",
      "[CMD] succeeded.",
      "Settings: /addon/opt/settings.json",
      "> - name: go",
      ">   binaryPath: /usr/bin/golang-external-provider",
      ">   initConfig:",
      ">     - location: /addon/source/sample",
      ">       lspServerPath: /root/go/bin/gopls",
      ">       analysisMode: full",
      "> - name: java",
      ">   binaryPath: /jdtls/bin/jdtls",
      ">   initConfig:",
      ">     - location: /addon/source/sample",
      ">       lspServerPath: /jdtls/bin/jdtls",
      ">       analysisMode: source-only",
      ">       providerSpecificConfig:",
      ">         bundles: /jdtls/java-analyzer-bundle/java-analyzer-bundle.core/target/java-analyzer-bundle.core-1.0.0-SNAPSHOT.jar",
      "> - name: builtin",
      ">   initConfig:",
      ">     - location: /addon/source/sample",
      ">       analysisMode: \"\"",
      "[CMD] Running: /usr/bin/konveyor-analyzer --provider-settings /addon/opt/settings.json --output-file /addon/report.yaml --label-selector konveyor.io/target=cloud-readiness",
      "[CMD] failed: exit status 1.",
      "> unable to find rule path or file",
      "> "
    ],
    "task": 1
  }
}

Signed-off-by: David Zager <[email protected]>
Signed-off-by: David Zager <[email protected]>
@jwmatthews
Copy link
Member

Fixes konveyor/enhancements#108

Copy link
Contributor

@jortel jortel left a comment

Choose a reason for hiding this comment

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

LGTM

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.

🌱 Replace the windup addon with the analyzer-lsp.
4 participants