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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenRegistry binary panics if config.yaml is missing few fields #118

Closed
jay-dee7 opened this issue Mar 11, 2022 · 1 comment · Fixed by #141
Closed

OpenRegistry binary panics if config.yaml is missing few fields #118

jay-dee7 opened this issue Mar 11, 2022 · 1 comment · Fixed by #141
Assignees
Labels
bug Something isn't working good first issue Good for newcomers P3 P3 labels are used for issues which are not very pressing and we'd love community to work on

Comments

@jay-dee7
Copy link
Member

jay-dee7 commented Mar 11, 2022

Describe the bug
When I try to run OpenRegistry, without editing the default config.yaml, it panics. A better alternative could be to handle this error properly.

To Reproduce

cp config.yaml.example config.yaml

Expected behavior
When some configuration variables are missing in config.yaml file, we should throw an error and let the runner know what's going wrong.

Screenshots
nil

Log Files

…/OpenRegistry on 🌱 master [🤷] via ‍🏎💨 v1.17.8 on ☁️  (eu-west-1)
✗  cp config.yaml.example config.yaml

…/OpenRegistry on 🌱 master [🤷] via ‍🏎💨 v1.17.8 on ☁️  (eu-west-1)
➜  ./OpenRegistry
badger 2022/03/11 06:03:24 INFO: All 0 tables opened in 0s
badger 2022/03/11 06:03:24 INFO: Discard stats nextEmptySlot: 0
badger 2022/03/11 06:03:24 INFO: Set nextTxnTs to 0
badger 2022/03/11 06:03:24 INFO: Deleting empty file: .kvstore/000050.vlog
connection to database successful
badger 2022/03/11 06:03:24 INFO: Lifetime L0 stalled for: 0s
badger 2022/03/11 06:03:24 INFO:
Level 0 [ ]: NumTables: 00. Size: 0 B of 0 B. Score: 0.00->0.00 StaleData: 0 B Target FileSize: 64 MiB
Level 1 [ ]: NumTables: 00. Size: 0 B of 10 MiB. Score: 0.00->0.00 StaleData: 0 B Target FileSize: 2.0 MiB
Level 2 [ ]: NumTables: 00. Size: 0 B of 10 MiB. Score: 0.00->0.00 StaleData: 0 B Target FileSize: 2.0 MiB
Level 3 [ ]: NumTables: 00. Size: 0 B of 10 MiB. Score: 0.00->0.00 StaleData: 0 B Target FileSize: 2.0 MiB
Level 4 [ ]: NumTables: 00. Size: 0 B of 10 MiB. Score: 0.00->0.00 StaleData: 0 B Target FileSize: 2.0 MiB
Level 5 [ ]: NumTables: 00. Size: 0 B of 10 MiB. Score: 0.00->0.00 StaleData: 0 B Target FileSize: 2.0 MiB
Level 6 [B]: NumTables: 00. Size: 0 B of 10 MiB. Score: 0.00->0.00 StaleData: 0 B Target FileSize: 2.0 MiB
Level Done
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x10 pc=0x10145990c]

goroutine 1 [running]:
github.com/containerish/OpenRegistry/auth.New({0x10181d4d8, 0x14000092058}, 0x140002655e0, {0x101821e30, 0x14000092208}, {0x10181f9f8, 0x14000150480})
        /Users/jasdeep/oss/OpenRegistry/auth/auth.go:50 +0xac
main.main()
        /Users/jasdeep/oss/OpenRegistry/main.go:47 +0x308

…/OpenRegistry on 🌱 master [🤷] via ‍🏎💨 v1.17.8 on ☁️  (eu-west-1)
✗

Desktop (please complete the following information):

  • OS: MacOS
  • Version: 12.3

Additional context
Add any other context about the problem here.

@jay-dee7 jay-dee7 added bug Something isn't working good first issue Good for newcomers P3 P3 labels are used for issues which are not very pressing and we'd love community to work on labels Mar 11, 2022
@jay-dee7 jay-dee7 moved this from Backlog to Todo in Containerish Road Map 2023-24 Mar 11, 2022
@jay-dee7 jay-dee7 moved this from Todo to Backlog in Containerish Road Map 2023-24 Mar 16, 2022
@guacamole
Copy link
Member

resolved with PR #141

Repository owner moved this from Backlog to Done in Containerish Road Map 2023-24 May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers P3 P3 labels are used for issues which are not very pressing and we'd love community to work on
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants