#Reproducible panic in `0.8.4`

1 messages · Page 1 of 1 (latest)

simple fable
#

It does look like that last test which is deleting dirs/files is DONE

│ │ │ │ │ │ │ │ ▼ │ │ │ │ test/render/remove-empty-dirs.txt
│ │ │ │ │ │ │ │ ┣─┼─┼─┼─┼─╮ 
│ │ │ │ │ │ │ │ │ │ │ │ │ ▽ service rq62d30fqjjj2.0iukkv8dh6s50.dagger.local
│ │ │ │ │ │ │ │ │ │ │ │ │ ┻ 
│ ╰─┼─┴─┼─┼─┼─┼▶█ │ │ │ │ [3.63s] exec hof run remove-empty-dirs.txt
│   │   │ │ │ │ ┃ │ │ │ │                                                                                                               
│   │   │ │ │ │ ┃ │ │ │ │ DONE                                                                                                          
│   │   ┻ ┻ │ │ ┻ │ │ │ │ 
█   │       │ │   │ │ │ │ [57.0s] ERROR go run ./test/dagger/main/hof.go
┃   │       │ │   │ │ │ │ panic: runtime error: invalid memory address or nil pointer dereference                                       
┃   │       │ │   │ │ │ │ [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x6e9602]                                       
┃   │       │ │   │ │ │ │                               
#

I cannot see any output from my task, so it must have run successfully, otherwise there'd be logs!

simple fable
#

some confirmations:

  • this also fails in 0.8.2
  • the test works outside of dagger, does not delete any files it shouldn't, notable the mounted file
#

ok, RCA'd this to PEBCAK

    for _, f := range files {
        ext := filepath.Ext(f)
        var F *dagger.File
        if pattern != "" {
            match, err := zglob.Match(pattern, f)        
            if err != nil {
                return err
            }
            if !match {
                continue
            }
            F = d.File(f)
        } else if ext == ".txt" || ext == ".txtar" {
            F = d.File(f)
        } else {
            continue   <== THIS WAS MISSING
        }

However, I did not get any lines to my code in the error, unless it's a PEBCAK again

#

maybe the panic is in the engine, and printed from the client?