#Errors in CLI, not visible in cloud

1 messages · Page 1 of 1 (latest)

grand plaza
#

I am running a pipeline from the terminal, with Dagger Cloud enabled. My pipeline fails with an error; the error is confusing so I follow the Dagger Cloud link to get more information. But in Dagger Cloud, there is no error - the entire failed operation is invisible, like it never happened.

Example:

In the terminal

[...]
█ │ │ [0.00s] [ci sdk go lint]
┣─┼─┼─╮ [ci sdk go lint]
│ │ │ │ ╮ 
│ │ │ │ ▼ 
│ │ │ │ ┣─╮ 
│ │ │ │ │ ▼ sdk
│ │ │ │ │ ┣─╮ 
│ │ │ │ │ │ ▼ go
│ │ │ │ │ │ ┣─╮ 
│ │ │ │ │ │ │ ▼ lint
│ │ │ │ │ │ │ ┣─╮ 
│ │ │ │ │ │ │ │ ▼ from golangci/golangci-lint:v1.51
│ │ │ │ │ │ │ │ █ [1.36s] resolve image config for docker.io/golangci/golangci-lint:v1.51
│ │ │ │ │ │ │ │ █ [0.13s] pull docker.io/golangci/golangci-lint:v1.51
│ │ │ │ │ │ │ │ ┣ [0.02s] resolve docker.io/golangci/golangci-lint:v1.51@sha256:be42f5df32011553183947c2b2502718bde485f566e15bbd2541f38a077e4d29
│ │ │ │ │ │ │ │ ┣ [2.03s] ░░░░░░░░░░░░ sha256:0e04cd4cd2ee5f2d53ea296fb22e3875a699f2ee5426c8908bfc38728acfb10a
│ │ │ │ │ │ │ │ ┣ [2.04s] ░░░░░░░░░░░░ sha256:c1775dbdcf1fe927cc8f7b49bcc4c8c8599857390280ca7aef3914b6874bc20f
│ │ │ │ │ │ │ │ ┣ [2.04s] ░░░░░░░░░░░░ sha256:3beb4019d4e806e609f7cadbe18fc275248e7c123e495142eb50c60b05fc38e6
│ │ │ │ │ │ │ │ ┣ [1.92s] ░░░░░░░░░░░░ sha256:09a74e69230a5d5ee55fb6baca6fb52404417efd177a2cb03c418d2d0cf599b5
│ │ │ │ │ │ │ │ ┣ [2.03s] ░░░░░░░░░░░░ sha256:80db6e7b9af12aaf0fea7c03d403661406cec13da58d53c7aa32b1ec6e9d6e33
│ │ │ │ │ │ │ │ ┣─╮ pull docker.io/golangci/golangci-lint:v1.51
│ │ │ │ │ │ │ │ ┻ │ 
│ │ │ │ │ │ │ █◀──╯ CANCELED exec golangci-lint run -v --timeout 5m
█ │ │ │ │ │ │ │ ERROR dagger do --config ./ci ci:sdk:go:lint
┃ │ │ │ │ │ │ │ Loading+installing project...                                                       
┃ │ │ │ │ │ │ │ Running command "ci:sdk:go:lint"...                                                 
┃ │ │ │ │ │ │ │ Error: process "/entrypoint" did not complete successfully: exit code: 1            
█◀┴─┴─╯ █ │ │ │ ERROR [ci sdk go lint]
┃       ┃ │ │ │ input:1: pipeline.pipeline.pipeline.container.from.withMountedDirectory.withWorkdi  
┃       ┃ │ │ │ r.withExec.stderr failed to load cache key: error fetching default branch for repo  
┃       ┃ │ │ │ sitory https:: exit status 128                                                      
┃       ┃ │ │ │                                                                                     
┃       ┃ │ │ │ Please visit https://dagger.io/help#go for troubleshooting guidance.                
┻       │ │ │ │ 
        │ │ │ █ ERROR git://
        │ │ │ ┃ Initialized empty Git repository in /var/lib/dagger/runc-overlayfs/snapshots/snaps  
        │ │ │ ┃ hots/45/fs/                                                                         
        │ │ │ ┃ fatal: unable to access 'https://': Could not resolve host: info                    
        ┻ ┻ ┻ ┻ 

In Cloud:

For reference: https://dagger.cloud/runs/33917a9e-ea7e-4da6-bbbc-5a353cc41aba

spark crystal
#

@grand plaza I tried reproducing this error in my local setup but seems like I'm doing something different.

I have this code:

package main

import (
    "context"
    "fmt"
    "os"

    "dagger.io/dagger"
)

func main() {
    ctx := context.Background()

    // create Dagger client
    client, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr))
    if err != nil {
        panic(err)
    }
    defer client.Close()

    appRepo := client.Git("https://marcosfoo.com").
        Branch("").
        Tree(dagger.GitRefTreeOpts{})

    e, err := client.Container().From("alpine").WithDirectory("/app", appRepo).FS().Entries(ctx)

    fmt.Println(e)
}

but I can see the error in Dagger Cloud: https://alpha.dagger.cloud/runs/607f379e-e246-48a2-9b14-2850910f68dc

#

can you share your pipeline to repro please? 🙏

grand plaza
#

dagger run hack/make sdk:go:lint

spark crystal
#

@grand plaza are you using the latest engine? https://alpha.dagger.cloud/runs/16fa5928-406a-4b09-92ea-467f2ef87f0e
^ that's my run and it looks ok.

For what I see in the cloud data, looks as if you're running an outdated engine.

Take into account that if you're using devel CLI, that will be probably using a :main tagged engine which is probably outdated and you need to re-pull it

#

@chrome falcon which makes me think that we should upload the CLI (if present) and engine versions to cloud

chrome falcon
grand plaza
#

But it's possible that I was running dagger do (I tried both, so I forget which one this is)

chrome falcon
#

looks like dagger do to me, since it has those [ci] [ci sdk] etc vertices

grand plaza
#

would that explain the glitch in cloud?

spark crystal
spark crystal
#

seems like dagger do generates incorrect cloud events and that's why we don't see it in cloud. I'll open an issue to track this