mend / renovate-ce-ee

Mend Renovate Documentation & Examples
https://www.mend.io/renovate/
Other
179 stars 61 forks source link

Renovate CE never opening PRs #610

Closed KarstenSiemer closed 5 days ago

KarstenSiemer commented 6 days ago

Hi! First of all, thanks for supplying a CE version of this amazing tool. I am currently trying it out on a little dummy project I have where do some GitOps stuff just for the sake of it. This helps me to evaluate projects in a sandboxed way, as I a looking into buying a premium project for my employer currently. Since that is all on-prem in private cloud, it will require a self-hosted version. Anyways, I can't get the self-deployed version to open PRs on my dummy project. It once opened the onboarding PR this one and thats it. I tried to debug all day but didn't get any further than installing the cloud github app, which worked perfectly from the get go, so it is nothing wrong with my repo. As it opened the onboarding PR, there should be nothing wrong with my app either. So it must be actual ce installation. I restarted it quite often (no persistence), but it never got better. It just prints the following:

DEBUG: Performing app sync at bulk mode (repository=KarstenSiemer/BMMI)
DEBUG: Performing app sync (repository=KarstenSiemer/BMMI)
 INFO: Post app sync statistics (repository=KarstenSiemer/BMMI)
       "organizationCount": 1,
       "repositoryCount": 2
DEBUG: App sync completed (repository=KarstenSiemer/BMMI)
DEBUG: Done processing task (repository=KarstenSiemer/BMMI)
DEBUG: Processing new task (repository=KarstenSiemer/BMMI)
       "task": {
         "id": "96ddbb5b-ae7f-5ba2-a3e1-8b6f82c7c01d",
         "reason": "scheduledAll",
         "priority": 10,
         "action": "enqueue-jobs",
         "addedAt": "2024-11-23 20:05:00",
         "repositories": [],
         "attempts": 1,
         "type": "internal"
       }

I'll attach the full debug log. renovate.log

I can see that it has that one parsing error, which it logs, but as the cloud version still manages to succeed, i figure that thats probably not the problem.

I have used the CE license which was mentioned here I installed it using terraform and the helm chart from this repo on a local KinD cluster (k8s v1.31.0), like so:

resource "random_password" "renovate_admin_api" {
  count   = local.install_tools_cluster ? 1 : 0
  length  = 8
  special = true
}

resource "helm_release" "renovate" {
  count = local.install_tools_cluster ? 1 : 0

  cleanup_on_fail   = false
  force_update      = false
  dependency_update = true
  lint              = true
  name              = "renovate"
  namespace         = "renovate"
  repository        = "https://mend.github.io/renovate-ce-ee"
  chart             = "mend-renovate-ce"
  version           = "8.7.0"
  timeout           = 900
  wait_for_jobs     = true
  create_namespace  = true

  lifecycle {
    ignore_changes = [metadata]
  }

  values = [
    yamlencode({
      renovate = {
        mendRnvAcceptTos           = "y"
        mendRnvPlatform            = "github"
        mendRnvEndpoint            = "https://api.github.com/"
        mendRnvCronJobSchedulerAll = "*/5 * * * *" # every 5 minutes
        mendRnvCronAppSync         = "*/5 * * * *" # every 5 minutes
        mendRnvAdminApiEnabled     = true
        mendRnvLogHistoryTTLDays   = "1"
        logLevel                   = "debug"
      }
    }),
    yamlencode({
      renovate = {
        config = <<-EOF
          module.exports = {
          }
        EOF
      }
    }),
    sensitive(yamlencode({
      renovate = {
        mendRnvLicenseKey      = var.renovatebot_license
        mendRnvGithubAppId     = tostring(var.github_app_id)
        mendRnvGithubAppKey    = var.github_app_private_key
        githubComToken         = var.github_password
        mendRnvServerApiSecret = random_password.renovate_admin_api[0].result
      }
    })),
    yamlencode({
      cachePersistence = {
        enabled      = false
        storageClass = "standard"
        size         = "10Gi"
      }
    }),
    yamlencode({
      ingress = {
        enabled          = true
        hosts            = ["renovate.${var.env}.${var.domain}"]
        ingressClassName = "nginx"
      }
    }),
    yamlencode({
      serviceAccount = {
        create = true
      }
    }),
    yamlencode({
      resources = {
        requests = {
          cpu    = "400m"
          memory = "1Gi"
        }
      }
    }),
    yamlencode({
      livenessProbe = {
        initialDelaySeconds = 90
        periodSeconds       = 20
        timeoutSeconds      = 3
      }
    })
  ]
}

The api return me this kind of data:

❯ renovate status                                                                                                                                                                                                        
{
  "bootTime": "2024-11-23 19:59:13",
  "endpoint": "https://api.github.com/",
  "platform": "github",
  "app": {
    "organizationCount": 1,
    "repositoryCount": 2
  },
  "jobs": {
    "history": {
      "lastDispatchDate": "2024-11-23 19:59:30",
      "lastEnqueueDate": "2024-11-23 19:59:16",
      "processed": 0
    },
    "queue": {
      "inProgress": [
        {
          "jobId": "14b643dc-8651-4f6c-b7e9-61ecfdbbe494",
          "reason": "repositories-added",
          "priority": 60,
          "addedAt": "2024-11-23 19:59:16",
          "startedAt": "2024-11-23 19:59:30",
          "lastAlive": "2024-11-23 20:10:01",
          "attempts": 1,
          "repository": "KarstenSiemer/BMMI",
          "organizationName": "KarstenSiemer",
          "repositorySelection": "selected",
          "installationId": 56719688
        }
      ],
      "size": 2
    }
  },
  "scheduler": {
    "allJobs": {
      "cron": "*/5 * * * *",
      "lastScheduling": "2024-11-23 20:10:00"
    },
    "sync": {
      "cron": "*/5 * * * *",
      "lastScheduling": "2024-11-23 20:10:00"
    }
  },
  "webhooks": {
    "lastValidWebhookReceived": ""
  },
  "renovateVersion": "38.142.4"
}
❯ renovate job
{
  "running": [
    {
      "jobId": "14b643dc-8651-4f6c-b7e9-61ecfdbbe494",
      "reason": "repositories-added",
      "priority": 60,
      "addedAt": "2024-11-23 19:59:16",
      "startedAt": "2024-11-23 19:59:30",
      "lastAlive": "2024-11-23 20:10:31",
      "attempts": 1,
      "repository": "KarstenSiemer/BMMI",
      "organizationName": "KarstenSiemer",
      "repositorySelection": "selected",
      "installationId": 56719688
    }
  ],
  "pending": [
    {
      "jobId": "a734307d-0c3f-44d5-a067-28a8b08931d5",
      "reason": "repositories-added",
      "priority": 60,
      "addedAt": "2024-11-23 19:59:16",
      "attempts": 0,
      "repository": "KarstenSiemer/kubernetes-alm-example",
      "organizationName": "KarstenSiemer",
      "repositorySelection": "selected",
      "installationId": 56719688
    }
  ]
}
❯ renovate sync 
{
  "message": "sync task successfully enqueued"
}

I think I most likely have made a stupid mistake and am somehow too blind.

Any help would be greatly appreciated. Thanks in advance :-)

Edit: I have deactivated the cloud renovate and closed its latest PR, so if the self-hosted one starts working, it should open that one up again.

PhilipAbed commented 5 days ago

you have 2 bots installed

1) renovate bot MEND hosted https://developer.mend.io/ (renovate [bot]) 2) CE self hosted renovate. (ba-tool [bot])

see PRs: image

fact is, there is nothing more to update on the repo, since renovate bot already updated everything. i forked and tried to run renovate CLI on it, found 1 update which u already "closed PR" ignored update (https://github.com/KarstenSiemer/BMMI/pull/33)

it is not recommended to run with 2 different bots on the same repository as they are doing the same kind of work.

KarstenSiemer commented 5 days ago

Hi @PhilipAbed. Thanks for your quick response. Yes, I am aware. I activated the cloud renovate to check if this will create PRs to see if I can narrow down where the problem is. I have now deactivated the cloud version again and want to only use the self-hosted one.

I actually think I have found the problem by now with my self-hosted installation. It runs on a KinD Cluster on my Mac M3, which appears to be the problem as apple cannot natively run docker, but spins up a VM for that. Each container then, by default, can only have 10GB and the VM only had like 70GB. Given the size of the full image of renovate and me actually hosting 4 KinD clusters on that VM, I just ran out of space. The self-hosted renovate probably ran but was never able to finish the first run and something broke somehow due to disk pressure. I have reconfigured the VM to 200GB and have not yet seen problems. I will try to do some stuff in the repo today and check if the self-hosted installation will now create PRs.

KarstenSiemer commented 5 days ago

I can confirm that it was the storage issue. The self-deployed is working now. Thanks a lot!

justo-mend commented 4 days ago

That's great to hear. Thanks for letting us know the resolution.