cloudfoundry-community / stratos

Stratos: Web-based Management UI for Cloud Foundry and Kubernetes
MIT License
2 stars 7 forks source link

Remote deploy is failing due nil point reference #32

Closed nedimakar closed 3 months ago

nedimakar commented 3 months ago

Remote deploy is failing due nil point reference

Description

When I try to deploy application over Github the application throws me nil reference error. It stuck at this point. Screenshot 2024-04-17 at 13 06 04

Here is detailed error so you can see the problem

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x18 pc=0x1030e451c]

goroutine 297 [running]:
http://code.cloudfoundry.org/cli/actor/sharedaction.latestEnvelopeTimestamp.func1 ({0x105c8c788, 0x140009d71d0}, {0x14000c2f230, 0x24}, {0x0?, 0x0?, 0x0?}, {0x0, 0x0, 0x0?})
    /Users/nedimakar/go/pkg/mod/code.cloudfoundry.org/cli@v0.0.0-20230912192837-efd1d03e7292/actor/sharedaction/logging.go:189 +0x13c
code.cloudfoundry.org/go-log-cache.Walk({0x105c8c788, 0x140009d71d0}, {0x14000c2f230, 0x24}, 0x14000d2cdb0, 0x14000d2cdf0, {0x14000d2cda0, 0x2, 0x0?})
    /Users/nedimakar/go/pkg/mod/code.cloudfoundry.org/go-log-cache@v1.0.1-0.20211011162012-ede82a99d3cc/walk.go:60 +0x548
http://code.cloudfoundry.org/cli/actor/sharedaction.latestEnvelopeTimestamp ({0x0?, 0x0?}, 0x0?, {0x105c8c788, 0x140009d71d0}, {0x14000c2f230, 0x24})
    /Users/nedimakar/go/pkg/mod/code.cloudfoundry.org/cli@v0.0.0-20230912192837-efd1d03e7292/actor/sharedaction/logging.go:194 +0x12c
http://code.cloudfoundry.org/cli/actor/sharedaction.GetStreamingLogs.func1() 
    /Users/nedimakar/go/pkg/mod/code.cloudfoundry.org/cli@v0.0.0-20230912192837-efd1d03e7292/actor/sharedaction/logging.go:135 +0xb8
created by http://code.cloudfoundry.org/cli/actor/sharedaction.GetStreamingLogs  in goroutine 279
    /Users/nedimakar/go/pkg/mod/code.cloudfoundry.org/cli@v0.0.0-20230912192837-efd1d03e7292/actor/sharedaction/logging.go:131 +0x184
exit status 2

If you would like to reproduce it deploy this application https://github.com/govau/cf-example-staticfile over github you are going to see error what I saw.

Motivation and Context

I recognize some nil properties in cf library which is not initialized. I manually initialize them and it worked.

How Has This Been Tested?

I ran tests and test it manually. The only changes made in deploy.go

Types of changes

Checklist:

norman-abramovitz commented 3 months ago

Seems to be more changes than just nil pointer fixes. We will need to look a slightly deeper to understand all the changes. Even the file is actually pushapp.go and not deploy.go