padok-team / burrito

🌯 Burrito is a TACoS Kubernetes Operator - "ArgoCD for Terraform"
https://padok-team.github.io/burrito
Apache License 2.0
297 stars 11 forks source link

merge request event not handled #314

Closed seboudry closed 3 months ago

seboudry commented 3 months ago

Hello!

I configured the webhook and Gitlab configuration parts to benefit from the MR workflow.

So I create a new merge request on my Gitlab instance.

On the Gitlab webhook page, the logs of the MergeRequest event shows a 200 response from burrito:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" href="/favicon.ico" sizes="48x48" />
    <link rel="icon" href="/favicon.svg" sizes="any" type="image/svg+xml" />
    <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
    <link rel="manifest" href="/site.webmanifest" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Burrito</title>
    <script type="module" crossorigin src="/assets/index-DllkJihy.js"></script>
    <link rel="stylesheet" crossorigin href="/assets/index-BePA3DSH.css">
  </head>
  <body>
    <div id="root"></div>
  </body>
</html>

But no TerraformPullRequest or new TerraformLayer is created. And I don't notice anything relevant on the server or controller logs...

Here's how I configure my burrito, let me know if you see something incorect :wink:

On Gitlab (self hosted), project webhook configuration:

Just to be quick, secret directly in release values:

server:
  deployment:
    env:
      - name: BURRITO_SERVER_WEBHOOK_GITLAB_SECRET
        value: som3thingSecret

The project access token have "api" and "read_repository" scopes. It is used on TerraformRepository credentials secret and BURRITO_CONTROLLER_GITLABCONFIG_APITOKEN.

Alan-pad commented 3 months ago

Hello @seboudry Thanks for testing Burrito and submitting this issue !

I will need to have access to the controller and server's logs to determine the root cause of this issue. Can you also share a copy of your TerraformRepository resource ?

Here are some things that might be the cause :

seboudry commented 3 months ago

Hi @Alan-pad,

Thanks for looking at my problem!

Here's my burrito CRs:

---
apiVersion: config.terraform.padok.cloud/v1alpha1
kind: TerraformRepository
metadata:
  name: run-terraform
  namespace: burrito-run-terraform
spec:
  repository:
    url: https://gitlab.mycompany.com/run-terraform.git
    secretName: run-terraform-gitlab-credentials
  terraform:
    version: 1.4.6
    terragrunt:
      enabled: true
      version: 0.45.10
---
apiVersion: config.terraform.padok.cloud/v1alpha1
kind: TerraformLayer
metadata:
  name: run-terraform-minio-apps
  namespace: burrito-run-terraform
spec:
  branch: master
  path: minio/minio-apps
  repository:
    name: run-terraform
    namespace: burrito-run-terraform
---
apiVersion: v1
kind: Secret
metadata:
  name: run-terraform-gitlab-credentials
  namespace: burrito-run-terraform
type: Opaque
stringData:
  # GitLab project access token
  # scope: api, read_repository
  # role: reporter
  username: burrito
  password: glpat-wwwwwwwwwwwwwwwwwwwwwwwwwww

And here's the full Helm values used (deployed with a Flux HelmRelease in namespace burrito-system):

config:
  burrito:
    datastore:
      storage:
        mock: true
controllers:
  deployment:
    env:
    envFrom:
      - secretRef:
          name: burrito-gitlab-config
server:
  deployment:
    envFrom:
      - secretRef:
          name: burrito-webhook
  ingress:
    enabled: true
    ingressClassName: nginx
    host: burrito.mycompany.com
    annotations:
      cert-manager.io/cluster-issuer: letsencrypt-prod
      kubernetes.io/tls-acme: "true"
      ingress.kubernetes.io/ssl-redirect: "true"
    tls:
      - hosts:
          - burrito.mycompany.com
        secretName: burrito-certs
tenants:
  - namespace:
      create: false
      name: burrito-qpc-config-terraform
    serviceAccounts:
      - name: burrito-runner

Secret burrito-gitlab-config contains the keys BURRITO_CONTROLLER_GITLABCONFIG_APITOKEN and BURRITO_CONTROLLER_GITLABCONFIG_URL. Secret burrito-webhook contains the key: BURRITO_SERVER_WEBHOOK_GITLAB_SECRET.

Namespace burrito-run-terraform where CRs lives is created earlier with Flux.

And here's the logs at component creation and then TerraformRepository and TerraformLayer creation:

timestamp   labels."k8s-pod/app_kubernetes_io/name" severity    jsonPayload.method  jsonPayload.status  jsonPayload.host    jsonPayload.uri jsonPayload.message textPayload
2024-07-30T14:16:16.329003846Z  burrito-server  ERROR                       Using config file: /etc/burrito/config.yaml
2024-07-30T14:16:16.340331421Z  burrito-controllers ERROR                       Using config file: /etc/burrito/config.yaml
2024-07-30T14:16:16.362313109Z  burrito-datastore   ERROR                       Using config file: /etc/burrito/config.yaml
2024-07-30T14:16:16.362378089Z  burrito-datastore   ERROR                       time="2024-07-30T14:16:16Z" level=warning msg="Using mock storage backend - for testing only - no data will only be stored in memory and will be lost when the process exits"
2024-07-30T14:16:16.376697528Z  burrito-server  ERROR                       time="2024-07-30T14:16:16Z" level=info msg="starting burrito server..."
2024-07-30T14:16:16.378372357Z  burrito-server  INFO                        
2024-07-30T14:16:16.387620309Z  burrito-server  INFO                        ____ __
2024-07-30T14:16:16.387633646Z  burrito-server  INFO                        / __/___/ / ___
2024-07-30T14:16:16.387641232Z  burrito-server  INFO                        / _// __/ _ \/ _ \
2024-07-30T14:16:16.387648854Z  burrito-server  INFO                        /___/\__/_//_/\___/ v4.11.4
2024-07-30T14:16:16.387658637Z  burrito-server  INFO                        High performance, minimalist Go web framework
2024-07-30T14:16:16.387665455Z  burrito-server  INFO                        https://echo.labstack.com
2024-07-30T14:16:16.387672425Z  burrito-server  INFO                        ____________________________________O/_______
2024-07-30T14:16:16.387679501Z  burrito-server  INFO                        O\
2024-07-30T14:16:16.387687248Z  burrito-server  INFO                        ⇨ http server started on [::]:8080
2024-07-30T14:16:16.473962579Z  burrito-controllers ERROR                       time="2024-07-30T14:16:16Z" level=info msg="layer controller started successfully"
2024-07-30T14:16:16.474454437Z  burrito-controllers ERROR                       time="2024-07-30T14:16:16Z" level=info msg="repository controller started successfully"
2024-07-30T14:16:16.474640458Z  burrito-controllers ERROR                       time="2024-07-30T14:16:16Z" level=info msg="run controller started successfully"
2024-07-30T14:16:16.475230059Z  burrito-datastore   ERROR                       time="2024-07-30T14:16:16Z" level=info msg="starting burrito datastore..."
2024-07-30T14:16:16.475556279Z  burrito-datastore   INFO                        
2024-07-30T14:16:16.475574792Z  burrito-datastore   INFO                        ____ __
2024-07-30T14:16:16.475602573Z  burrito-datastore   INFO                        / __/___/ / ___
2024-07-30T14:16:16.475609993Z  burrito-datastore   INFO                        / _// __/ _ \/ _ \
2024-07-30T14:16:16.475615964Z  burrito-datastore   INFO                        /___/\__/_//_/\___/ v4.11.4
2024-07-30T14:16:16.475622877Z  burrito-datastore   INFO                        High performance, minimalist Go web framework
2024-07-30T14:16:16.475628579Z  burrito-datastore   INFO                        https://echo.labstack.com
2024-07-30T14:16:16.475639294Z  burrito-datastore   INFO                        ____________________________________O/_______
2024-07-30T14:16:16.475649949Z  burrito-datastore   INFO                        O\
2024-07-30T14:16:16.475834392Z  burrito-controllers ERROR                       time="2024-07-30T14:16:16Z" level=warning msg="could not initialize provider [*github Github]: github config is not present"
2024-07-30T14:16:16.476345110Z  burrito-datastore   INFO                        ⇨ http server started on [::]:8080
2024-07-30T14:16:16.477821550Z  burrito-controllers ERROR                       time="2024-07-30T14:16:16Z" level=info msg="provider [*gitlab Gitlab] successfully initialized"
2024-07-30T14:16:16.477945192Z  burrito-controllers ERROR                       time="2024-07-30T14:16:16Z" level=info msg="pullrequest controller started successfully"
2024-07-30T14:16:16.477955857Z  burrito-controllers ERROR                       time="2024-07-30T14:16:16Z" level=info msg="starting manager"
2024-07-30T14:16:16.481587276Z  burrito-controllers ERROR                       time="2024-07-30T14:16:16Z" level=info msg="Starting metrics server" logger=controller-runtime.metrics
2024-07-30T14:16:16.482471929Z  burrito-controllers INFO                    attempting to acquire leader lease burrito-system/6d185457.terraform.padok.cloud... 
2024-07-30T14:16:16.485529004Z  burrito-controllers ERROR                       time="2024-07-30T14:16:16Z" level=info msg="starting server" addr="[::]:8081" name="health probe"
2024-07-30T14:16:16.485790496Z  burrito-controllers ERROR                       time="2024-07-30T14:16:16Z" level=info msg="Serving metrics server" bindAddress=":8080" logger=controller-runtime.metrics secure=false
2024-07-30T14:16:32.600653909Z  burrito-controllers INFO                    successfully acquired lease burrito-system/6d185457.terraform.padok.cloud   
2024-07-30T14:16:32.601672530Z  burrito-controllers ERROR                       time="2024-07-30T14:16:32Z" level=debug msg="burrito-controllers-858974c778-4qzbr_2f7e237e-b6e3-4ee9-9468-b791b68e5bce became leader" logger=events object="{\"kind\":\"Lease\",\"namespace\":\"burrito-system\",\"name\":\"6d185457.terraform.padok.cloud\",\"uid\":\"d4a2ff5f-59a7-46ee-b2fe-3fa4ce694e70\",\"apiVersion\":\"coordination.k8s.io/v1\",\"resourceVersion\":\"1016833303\"}" reason=LeaderElection type=Normal
2024-07-30T14:16:32.602332068Z  burrito-controllers ERROR                       time="2024-07-30T14:16:32Z" level=info msg="Starting EventSource" controller=terraformlayer controllerGroup=config.terraform.padok.cloud controllerKind=TerraformLayer source="kind source: *v1alpha1.TerraformLayer"
2024-07-30T14:16:32.602380355Z  burrito-controllers ERROR                       time="2024-07-30T14:16:32Z" level=info msg="Starting Controller" controller=terraformlayer controllerGroup=config.terraform.padok.cloud controllerKind=TerraformLayer
2024-07-30T14:16:32.604144912Z  burrito-controllers ERROR                       time="2024-07-30T14:16:32Z" level=info msg="Starting EventSource" controller=terraformrun controllerGroup=config.terraform.padok.cloud controllerKind=TerraformRun source="kind source: *v1alpha1.TerraformRun"
2024-07-30T14:16:32.604190807Z  burrito-controllers ERROR                       time="2024-07-30T14:16:32Z" level=info msg="Starting Controller" controller=terraformrun controllerGroup=config.terraform.padok.cloud controllerKind=TerraformRun
2024-07-30T14:16:32.604962336Z  burrito-controllers ERROR                       time="2024-07-30T14:16:32Z" level=info msg="Starting EventSource" controller=terraformrepository controllerGroup=config.terraform.padok.cloud controllerKind=TerraformRepository source="kind source: *v1alpha1.TerraformRepository"
2024-07-30T14:16:32.605009947Z  burrito-controllers ERROR                       time="2024-07-30T14:16:32Z" level=info msg="Starting Controller" controller=terraformrepository controllerGroup=config.terraform.padok.cloud controllerKind=TerraformRepository
2024-07-30T14:16:32.606395302Z  burrito-controllers ERROR                       time="2024-07-30T14:16:32Z" level=info msg="Starting EventSource" controller=terraformpullrequest controllerGroup=config.terraform.padok.cloud controllerKind=TerraformPullRequest source="kind source: *v1alpha1.TerraformPullRequest"
2024-07-30T14:16:32.606469637Z  burrito-controllers ERROR                       time="2024-07-30T14:16:32Z" level=info msg="Starting Controller" controller=terraformpullrequest controllerGroup=config.terraform.padok.cloud controllerKind=TerraformPullRequest
2024-07-30T14:16:32.969518658Z  burrito-controllers ERROR                       time="2024-07-30T14:16:32Z" level=info msg="Starting workers" controller=terraformrepository controllerGroup=config.terraform.padok.cloud controllerKind=TerraformRepository worker count=1
2024-07-30T14:16:32.969570709Z  burrito-controllers ERROR                       time="2024-07-30T14:16:32Z" level=info msg="Starting workers" controller=terraformpullrequest controllerGroup=config.terraform.padok.cloud controllerKind=TerraformPullRequest worker count=1
2024-07-30T14:16:32.970542900Z  burrito-controllers ERROR                       time="2024-07-30T14:16:32Z" level=info msg="Starting workers" controller=terraformrun controllerGroup=config.terraform.padok.cloud controllerKind=TerraformRun worker count=1
2024-07-30T14:16:33.012912288Z  burrito-controllers ERROR                       time="2024-07-30T14:16:33Z" level=info msg="Starting workers" controller=terraformlayer controllerGroup=config.terraform.padok.cloud controllerKind=TerraformLayer worker count=1
2024-07-30T14:17:11.984566874Z  burrito-controllers ERROR                       time="2024-07-30T14:17:11Z" level=info msg="starting reconciliation for layer burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps ..."
2024-07-30T14:17:12.098722894Z  burrito-controllers ERROR                       time="2024-07-30T14:17:12Z" level=info msg="getting Linked TerraformRepository to layer qpc-config-terraform-qpc-dev-minio-apps"
2024-07-30T14:17:12.099640950Z  burrito-controllers ERROR                       time="2024-07-30T14:17:12Z" level=info msg="layer qpc-config-terraform-qpc-dev-minio-apps has an outdated plan, creating a new run"
2024-07-30T14:17:12.114463916Z  burrito-datastore   INFO                        system:serviceaccount:burrito-system:burrito-controllers{"time":"2024-07-30T14:17:12.113979667Z","id":"","remote_ip":"10.60.0.63","host":"burrito-datastore.burrito-system","method":"GET","uri":"/api/plans?attempt=&format=short&layer=qpc-config-terraform-qpc-dev-minio-apps&namespace=burrito-qpc-config-terraform&run=","user_agent":"Go-http-client/1.1","status":400,"error":"","latency":9106769,"latency_human":"9.106769ms","bytes_in":0,"bytes_out":24}
2024-07-30T14:17:12.115500046Z  burrito-controllers ERROR                       time="2024-07-30T14:17:12Z" level=debug msg="Failed to get last Result" logger=events object="{\"kind\":\"TerraformLayer\",\"namespace\":\"burrito-qpc-config-terraform\",\"name\":\"qpc-config-terraform-qpc-dev-minio-apps\",\"uid\":\"6801bc41-a51c-4eb5-8382-32e82f8e5d83\",\"apiVersion\":\"config.terraform.padok.cloud/v1alpha1\",\"resourceVersion\":\"1016833871\"}" reason=Reconciliation type=Normal
2024-07-30T14:17:12.132344282Z  burrito-controllers ERROR                       time="2024-07-30T14:17:12Z" level=debug msg="Created TerraformRun for Plan action" logger=events object="{\"kind\":\"TerraformLayer\",\"namespace\":\"burrito-qpc-config-terraform\",\"name\":\"qpc-config-terraform-qpc-dev-minio-apps\",\"uid\":\"6801bc41-a51c-4eb5-8382-32e82f8e5d83\",\"apiVersion\":\"config.terraform.padok.cloud/v1alpha1\",\"resourceVersion\":\"1016833871\"}" reason=Reconciliation type=Normal
2024-07-30T14:17:12.149664104Z  burrito-controllers ERROR                       time="2024-07-30T14:17:12Z" level=info msg="starting reconciliation for run burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r ..."
2024-07-30T14:17:12.149744731Z  burrito-controllers ERROR                       time="2024-07-30T14:17:12Z" level=info msg="getting linked TerraformLayer to run qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r"
2024-07-30T14:17:12.149779400Z  burrito-controllers ERROR                       time="2024-07-30T14:17:12Z" level=info msg="getting linked TerraformRepository to run qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r"
2024-07-30T14:17:12.149787345Z  burrito-controllers ERROR                       time="2024-07-30T14:17:12Z" level=info msg="run qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r is in initial state"
2024-07-30T14:17:12.150025897Z  burrito-controllers ERROR                       time="2024-07-30T14:17:12Z" level=info msg="no runs to delete for layer qpc-config-terraform-qpc-dev-minio-apps"
2024-07-30T14:17:12.150041991Z  burrito-controllers ERROR                       time="2024-07-30T14:17:12Z" level=info msg="finished reconciliation cycle for layer burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps"
2024-07-30T14:17:12.544412334Z  burrito-controllers ERROR                       time="2024-07-30T14:17:12Z" level=debug msg="Successfully created pod qpc-config-terraform-qpc-dev-minio-apps-plan-cvqcz for initial run" logger=events object="{\"kind\":\"TerraformRun\",\"namespace\":\"burrito-qpc-config-terraform\",\"name\":\"qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r\",\"uid\":\"9ec8c5fd-9900-4e1c-8fef-3eff1f334e62\",\"apiVersion\":\"config.terraform.padok.cloud/v1alpha1\",\"resourceVersion\":\"1016833873\"}" reason=Run type=Normal
2024-07-30T14:17:12.645613822Z  burrito-controllers ERROR                       time="2024-07-30T14:17:12Z" level=info msg="pod qpc-config-terraform-qpc-dev-minio-apps-plan-cvqcz is not in a terminal state, ignoring..."
2024-07-30T14:17:12.661754055Z  burrito-controllers ERROR                       time="2024-07-30T14:17:12Z" level=info msg="finished reconciliation cycle for run burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r"
2024-07-30T14:17:13.659475341Z  burrito-controllers ERROR                       time="2024-07-30T14:17:13Z" level=info msg="starting reconciliation for run burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r ..."
2024-07-30T14:17:13.659823729Z  burrito-controllers ERROR                       time="2024-07-30T14:17:13Z" level=info msg="getting linked TerraformLayer to run qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r"
2024-07-30T14:17:13.660044621Z  burrito-controllers ERROR                       time="2024-07-30T14:17:13Z" level=info msg="getting linked TerraformRepository to run qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r"
2024-07-30T14:17:13.660401321Z  burrito-controllers ERROR                       time="2024-07-30T14:17:13Z" level=info msg="run qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r is running"
2024-07-30T14:17:13.660650975Z  burrito-controllers ERROR                       time="2024-07-30T14:17:13Z" level=info msg="pod qpc-config-terraform-qpc-dev-minio-apps-plan-cvqcz is not in a terminal state, ignoring..."
2024-07-30T14:17:13.674059745Z  burrito-controllers ERROR                       time="2024-07-30T14:17:13Z" level=info msg="finished reconciliation cycle for run burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r"
2024-07-30T14:17:17.152518296Z  burrito-controllers ERROR                       time="2024-07-30T14:17:17Z" level=info msg="starting reconciliation for layer burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps ..."
2024-07-30T14:17:17.153825109Z  burrito-controllers ERROR                       time="2024-07-30T14:17:17Z" level=info msg="terraform layer qpc-config-terraform-qpc-dev-minio-apps is locked, skipping reconciliation."
2024-07-30T14:17:18.675111403Z  burrito-controllers ERROR                       time="2024-07-30T14:17:18Z" level=info msg="starting reconciliation for run burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r ..."
2024-07-30T14:17:18.675209971Z  burrito-controllers ERROR                       time="2024-07-30T14:17:18Z" level=info msg="getting linked TerraformLayer to run qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r"
2024-07-30T14:17:18.675488790Z  burrito-controllers ERROR                       time="2024-07-30T14:17:18Z" level=info msg="getting linked TerraformRepository to run qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r"
2024-07-30T14:17:18.675805531Z  burrito-controllers ERROR                       time="2024-07-30T14:17:18Z" level=info msg="run qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r is running"
2024-07-30T14:17:18.675843199Z  burrito-controllers ERROR                       time="2024-07-30T14:17:18Z" level=info msg="pod qpc-config-terraform-qpc-dev-minio-apps-plan-cvqcz is not in a terminal state, ignoring..."
2024-07-30T14:17:18.688648864Z  burrito-controllers ERROR                       time="2024-07-30T14:17:18Z" level=info msg="finished reconciliation cycle for run burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r"
2024-07-30T14:17:22.152445050Z  burrito-controllers ERROR                       time="2024-07-30T14:17:22Z" level=info msg="starting reconciliation for layer burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps ..."
2024-07-30T14:17:22.152571612Z  burrito-controllers ERROR                       time="2024-07-30T14:17:22Z" level=info msg="terraform layer qpc-config-terraform-qpc-dev-minio-apps is locked, skipping reconciliation."
2024-07-30T14:17:23.689489209Z  burrito-controllers ERROR                       time="2024-07-30T14:17:23Z" level=info msg="starting reconciliation for run burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r ..."
2024-07-30T14:17:23.689593587Z  burrito-controllers ERROR                       time="2024-07-30T14:17:23Z" level=info msg="getting linked TerraformLayer to run qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r"
2024-07-30T14:17:23.689750221Z  burrito-controllers ERROR                       time="2024-07-30T14:17:23Z" level=info msg="getting linked TerraformRepository to run qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r"
2024-07-30T14:17:23.690030493Z  burrito-controllers ERROR                       time="2024-07-30T14:17:23Z" level=info msg="run qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r is running"
2024-07-30T14:17:23.690194971Z  burrito-controllers ERROR                       time="2024-07-30T14:17:23Z" level=info msg="pod qpc-config-terraform-qpc-dev-minio-apps-plan-cvqcz is not in a terminal state, ignoring..."
2024-07-30T14:17:23.704207131Z  burrito-controllers ERROR                       time="2024-07-30T14:17:23Z" level=info msg="finished reconciliation cycle for run burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r"
2024-07-30T14:17:27.159319254Z  burrito-controllers ERROR                       time="2024-07-30T14:17:27Z" level=info msg="starting reconciliation for layer burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps ..."
2024-07-30T14:17:27.159383722Z  burrito-controllers ERROR                       time="2024-07-30T14:17:27Z" level=info msg="terraform layer qpc-config-terraform-qpc-dev-minio-apps is locked, skipping reconciliation."
2024-07-30T14:17:28.706073325Z  burrito-controllers ERROR                       time="2024-07-30T14:17:28Z" level=info msg="starting reconciliation for run burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r ..."
2024-07-30T14:17:28.706700709Z  burrito-controllers ERROR                       time="2024-07-30T14:17:28Z" level=info msg="getting linked TerraformLayer to run qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r"
2024-07-30T14:17:28.707197205Z  burrito-controllers ERROR                       time="2024-07-30T14:17:28Z" level=info msg="getting linked TerraformRepository to run qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r"
2024-07-30T14:17:28.707835111Z  burrito-controllers ERROR                       time="2024-07-30T14:17:28Z" level=info msg="run qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r is running"
2024-07-30T14:17:28.708350500Z  burrito-controllers ERROR                       time="2024-07-30T14:17:28Z" level=info msg="pod qpc-config-terraform-qpc-dev-minio-apps-plan-cvqcz is not in a terminal state, ignoring..."
2024-07-30T14:17:28.726308467Z  burrito-controllers ERROR                       time="2024-07-30T14:17:28Z" level=info msg="finished reconciliation cycle for run burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r"
2024-07-30T14:17:32.154592590Z  burrito-controllers ERROR                       time="2024-07-30T14:17:32Z" level=info msg="starting reconciliation for layer burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps ..."
2024-07-30T14:17:32.155380292Z  burrito-controllers ERROR                       time="2024-07-30T14:17:32Z" level=info msg="terraform layer qpc-config-terraform-qpc-dev-minio-apps is locked, skipping reconciliation."
2024-07-30T14:17:33.728663200Z  burrito-controllers ERROR                       time="2024-07-30T14:17:33Z" level=info msg="starting reconciliation for run burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r ..."
2024-07-30T14:17:33.728995297Z  burrito-controllers ERROR                       time="2024-07-30T14:17:33Z" level=info msg="getting linked TerraformLayer to run qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r"
2024-07-30T14:17:33.729312272Z  burrito-controllers ERROR                       time="2024-07-30T14:17:33Z" level=info msg="getting linked TerraformRepository to run qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r"
2024-07-30T14:17:33.729989949Z  burrito-controllers ERROR                       time="2024-07-30T14:17:33Z" level=info msg="run qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r is running"
2024-07-30T14:17:33.730558814Z  burrito-controllers ERROR                       time="2024-07-30T14:17:33Z" level=info msg="pod qpc-config-terraform-qpc-dev-minio-apps-plan-cvqcz is not in a terminal state, ignoring..."
2024-07-30T14:17:33.743653298Z  burrito-controllers ERROR                       time="2024-07-30T14:17:33Z" level=info msg="finished reconciliation cycle for run burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r"
2024-07-30T14:17:34.159532976Z  burrito-controllers ERROR                       time="2024-07-30T14:17:34Z" level=info msg="starting reconciliation for layer burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps ..."
2024-07-30T14:17:34.159587087Z  burrito-controllers ERROR                       time="2024-07-30T14:17:34Z" level=info msg="terraform layer qpc-config-terraform-qpc-dev-minio-apps is locked, skipping reconciliation."
2024-07-30T14:17:38.799991873Z  burrito-datastore   INFO    PUT 200 burrito-datastore.burrito-system    /api/logs?attempt=0&layer=qpc-config-terraform-qpc-dev-minio-apps&namespace=burrito-qpc-config-terraform&run=qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r     
2024-07-30T14:17:42.158019835Z  burrito-controllers ERROR                       time="2024-07-30T14:17:42Z" level=info msg="starting reconciliation for layer burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps ..."
2024-07-30T14:17:42.158127471Z  burrito-controllers ERROR                       time="2024-07-30T14:17:42Z" level=info msg="getting Linked TerraformRepository to layer qpc-config-terraform-qpc-dev-minio-apps"
2024-07-30T14:17:42.158226468Z  burrito-controllers ERROR                       time="2024-07-30T14:17:42Z" level=info msg="layer qpc-config-terraform-qpc-dev-minio-apps needs to be applied, creating a new run"
2024-07-30T14:17:42.159381027Z  burrito-controllers ERROR                       time="2024-07-30T14:17:42Z" level=info msg="layer qpc-config-terraform-qpc-dev-minio-apps is in dry mode, no action taken"
2024-07-30T14:17:42.175357492Z  burrito-controllers ERROR                       time="2024-07-30T14:17:42Z" level=info msg="no runs to delete for layer qpc-config-terraform-qpc-dev-minio-apps"
2024-07-30T14:17:42.175415312Z  burrito-controllers ERROR                       time="2024-07-30T14:17:42Z" level=info msg="finished reconciliation cycle for layer burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps"
2024-07-30T14:17:43.829920678Z  burrito-controllers ERROR                       time="2024-07-30T14:17:43Z" level=info msg="starting reconciliation for run burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r ..."
2024-07-30T14:17:43.829977529Z  burrito-controllers ERROR                       time="2024-07-30T14:17:43Z" level=info msg="run qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r is in a terminal state, ignoring..."
2024-07-30T14:19:59.209836893Z  burrito-server  INFO    GET 200 burrito.tools.quicksign.io  /api/repositories       
2024-07-30T14:19:59.218540017Z  burrito-server  INFO    GET 200 burrito.tools.quicksign.io  /api/layers     
2024-07-30T14:20:02.171482067Z  burrito-server  INFO    GET 200 burrito.tools.quicksign.io  /api/repositories       
2024-07-30T14:20:02.178748906Z  burrito-server  INFO    GET 200 burrito.tools.quicksign.io  /api/layers     
2024-07-30T14:20:04.410091607Z  burrito-server  INFO    GET 200 burrito.tools.quicksign.io  /api/run/burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps/qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r/attempts       
2024-07-30T14:20:04.442565927Z  burrito-datastore   INFO                        system:serviceaccount:burrito-system:burrito-server{"time":"2024-07-30T14:20:04.442436679Z","id":"","remote_ip":"10.60.0.65","host":"burrito-datastore.burrito-system","method":"GET","uri":"/api/logs?attempt=0&layer=qpc-config-terraform-qpc-dev-minio-apps&namespace=burrito-qpc-config-terraform&run=qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":8423463,"latency_human":"8.423463ms","bytes_in":0,"bytes_out":67272}
2024-07-30T14:20:04.444470524Z  burrito-server  INFO    GET 200 burrito.tools.quicksign.io  /api/logs/burrito-qpc-config-terraform/qpc-config-terraform-qpc-dev-minio-apps/qpc-config-terraform-qpc-dev-minio-apps-plan-z5s6r/0     

But I don't get any logs when merge request event is sent from GitLab... But I do see thee Nginx log for this query:

[30/Jul/2024:14:37:42 +0000] "POST / HTTP/1.1" 200 645 "" "GitLab/16.0.8-ee" 5117 0.010 [burrito-system-burrito-server-http] 10.60.0.65:8080 645 0.000 200 13caaaee004143a9d7d519c2507d4a2d

Maybe a problem with webhook URL that need something in path?

seboudry commented 3 months ago

I noticed the documentation have been enhanced on MR https://github.com/padok-team/burrito/pull/309 :wink:

So I changed Webhook URL on GitLab with /api/webhook according to new doc and it's woking!

Alan-pad commented 3 months ago

Sorry about that, glad it helped !