Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing check-alerts command and add test case #629

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

rsevilla87
Copy link
Member

Type of change

  • Refactor
  • New feature
  • Bug fix
  • Optimization
  • Documentation Update

Description

check-alerts was broken due to a nil pointer in indexer

$ ~/labs/kube-burner/bin/amd64/kube-burner check-alerts -a up.yml -u http://localhost:9090                                                         16:18:54 [118/1437]
time="2024-04-22 16:16:04" level=info msg="馃懡 Initializing prometheus client with URL: http://localhost:9090" file="prometheus.go:47"
panic: runtime error: invalid memory address or nil pointer dereference                                                
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1b4d890]                                                                                                                                                                       
                                                                                                                                                                                                                                              
goroutine 1 [running]:                                                                                                                                                                                                                        
main.alertCmd.func1(0xc00050d000?, {0xc00051f5c0?, 0x4?, 0x208f102?})                                                                                                                                                                         
        /home/rsevilla/labs/kube-burner/cmd/kube-burner/kube-burner.go:481 +0x7f0                                                                                                                                                             
github.com/spf13/cobra.(*Command).execute(0xc0003d6c00, {0xc00051f580, 0x4, 0x4})                                                                                                                                                             
        /home/rsevilla/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:920 +0x863                                                                                                                                                         
github.com/spf13/cobra.(*Command).ExecuteC(0x3550fe0)                                                                  
        /home/rsevilla/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3a5                                                                                                                                                        
github.com/spf13/cobra.(*Command).Execute(...)                                                                                                                                                                                                
        /home/rsevilla/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968                                         
main.main()                                                                                                            
        /home/rsevilla/labs/kube-burner/cmd/kube-burner/kube-burner.go:523 +0xfa     

Related Tickets & Documents

  • Related Issue #
  • Closes #

@rsevilla87 rsevilla87 added the bug Something isn't working label Apr 22, 2024
@rsevilla87 rsevilla87 force-pushed the fix-check-alerts-indexing branch 2 times, most recently from efb190c to 5177982 Compare April 22, 2024 15:31
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
@rsevilla87 rsevilla87 merged commit 10c2301 into kube-burner:main Apr 24, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant