Skip to content

Conversation

@linouxis9
Copy link
Contributor

Hi free5gc team,

This PR updates the json-path and mongoapi dependency.
json-path's upgrade fixes the panic mentioned in free5gc/nrf#47.
New version of the util package will need to be released, and this new version will need to be used in the NRF.

After the PR, the panic is replaced with the following error in the NRF. There might be additional checks to be done on the NRF.

PCAP: NRF - Panic on Patch after Util upgrade.zip

2024-12-05T12:45:55.155472540Z [ERRO][NRF][NFM] UpdateNFInstanceProcedure err: RestfulAPIJSONPatch Apply err: missing value
github.com/evanphx/json-patch/v5.init
        /go/pkg/mod/github.com/evanphx/json-patch/[email protected]/merge.go:106
runtime.doInit1
        /usr/local/go/src/runtime/proc.go:6735
runtime.doInit
        /usr/local/go/src/runtime/proc.go:6702
runtime.main
        /usr/local/go/src/runtime/proc.go:249
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:1650
replace operation does not apply: doc is missing key: /nfStatus
github.com/evanphx/json-patch/v5.Patch.replace
        /go/pkg/mod/github.com/evanphx/json-patch/[email protected]/patch.go:1016
github.com/evanphx/json-patch/v5.Patch.ApplyIndentWithOptions
        /go/pkg/mod/github.com/evanphx/json-patch/[email protected]/patch.go:1262
github.com/evanphx/json-patch/v5.Patch.ApplyWithOptions
        /go/pkg/mod/github.com/evanphx/json-patch/[email protected]/patch.go:1210
github.com/evanphx/json-patch/v5.Patch.Apply
        /go/pkg/mod/github.com/evanphx/json-patch/[email protected]/patch.go:1204
github.com/free5gc/util/mongoapi.RestfulAPIJSONPatch
        /go/pkg/mod/github.com/linouxis9/[email protected]/mongoapi/mongoapi.go:357
github.com/free5gc/nrf/internal/sbi/processor.(*Processor).UpdateNFInstanceProcedure
        /go/src/free5gc/NFs/nrf/internal/sbi/processor/nf_management.go:333
github.com/free5gc/nrf/internal/sbi/processor.(*Processor).HandleUpdateNFInstanceRequest
        /go/src/free5gc/NFs/nrf/internal/sbi/processor/nf_management.go:51
github.com/free5gc/nrf/internal/sbi.(*Server).HTTPUpdateNFInstance
        /go/src/free5gc/NFs/nrf/internal/sbi/api_nfmanagement.go:196
github.com/gin-gonic/gin.(*Context).Next
        /go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174
github.com/free5gc/util/logger.NewGinWithLogrus.ginRecover.func2
        /go/pkg/mod/github.com/linouxis9/[email protected]/logger/logger.go:330
github.com/gin-gonic/gin.(*Context).Next
        /go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174
github.com/free5gc/util/logger.NewGinWithLogrus.ginToLogrus.func1
        /go/pkg/mod/github.com/linouxis9/[email protected]/logger/logger.go:256
github.com/gin-gonic/gin.(*Context).Next
        /go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
        /go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:620
github.com/gin-gonic/gin.(*Engine).ServeHTTP
        /go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:576
golang.org/x/net/http2.(*serverConn).runHandler
        /go/pkg/mod/golang.org/x/[email protected]/http2/server.go:2369
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:1650

Thanks!
Valentin

@tim-ywliu tim-ywliu merged commit 8768bc1 into free5gc:main Dec 17, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants