-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
quay-v3.7.0
Description:
This is an issue found when trying to config Azure Blob Storage, if not input Azure Account Key and Azure SAS Token, Quay config editor will response with 500 internal error, the expected behavior should be Quay config editor respond with Validation Failed with clear error message.
Quay Image: quay-operator-bundle-container-v3.7.0-100
Config Editor Validate Azure Blob Storage:
config-editor stdout | time="2022-04-27T08:52:17Z" level=debug msg="Pinging database at postgresql://quay370-quay-database:WVa2X-ie4KwD0RYtqTCi1YPcLbz2Rj0GKW0mhSk3UmexV6jMD4y4VhNU8WIZilQbe7F2LrI3NAy8XaiU@quay370-quay-database:5432/quay370-quay-database" config-editor stdout | plpgsql config-editor stdout | pg_trgm config-editor stdout | time="2022-04-27T08:52:17Z" level=debug msg="Validating DistributedStorage" config-editor stderr | panic: runtime error: index out of range [1] with length 0 config-editor stderr | config-editor stderr | -> github.com/quay/config-tool/pkg/lib/shared.validateAzureGateway config-editor stderr | -> /remote-source/config-tool/app/pkg/lib/shared/storage_validators.go:403 config-editor stderr | github.com/quay/config-tool/pkg/lib/shared.ValidateStorage config-editor stderr | /remote-source/config-tool/app/pkg/lib/shared/storage_validators.go:201 config-editor stderr | github.com/quay/config-tool/pkg/lib/fieldgroups/distributedstorage.(*DistributedStorageFieldGroup).Validate config-editor stderr | /remote-source/config-tool/app/pkg/lib/fieldgroups/distributedstorage/distributedstorage_validator.go:42 config-editor stderr | github.com/quay/config-tool/pkg/lib/config.Config.Validate config-editor stderr | /remote-source/config-tool/app/pkg/lib/config/config_validator.go:20 config-editor stderr | github.com/quay/config-tool/pkg/lib/editor.validateConfigBundle.func1 config-editor stderr | /remote-source/config-tool/app/pkg/lib/editor/controllers.go:213 config-editor stderr | github.com/abbot/go-http-auth.JustCheck.func1 config-editor stderr | /remote-source/config-tool/app/vendor/github.com/abbot/go-http-auth/auth.go:107 config-editor stderr | github.com/abbot/go-http-auth.(*BasicAuth).Wrap.func1 config-editor stderr | /remote-source/config-tool/app/vendor/github.com/abbot/go-http-auth/basic.go:146 config-editor stderr | net/http.HandlerFunc.ServeHTTP config-editor stderr | /opt/rh/go-toolset-1.16/root/usr/lib/go-toolset-1.16-golang/src/net/http/server.go:2050 config-editor stderr | github.com/go-chi/chi.(*Mux).routeHTTP config-editor stderr | /remote-source/config-tool/app/vendor/github.com/go-chi/chi/mux.go:431 config-editor stderr | net/http.HandlerFunc.ServeHTTP config-editor stderr | /opt/rh/go-toolset-1.16/root/usr/lib/go-toolset-1.16-golang/src/net/http/server.go:2050 config-editor stderr | github.com/go-chi/chi/middleware.Recoverer.func1 config-editor stderr | /remote-source/config-tool/app/vendor/github.com/go-chi/chi/middleware/recoverer.go:37 config-editor stderr | net/http.HandlerFunc.ServeHTTP config-editor stderr | /opt/rh/go-toolset-1.16/root/usr/lib/go-toolset-1.16-golang/src/net/http/server.go:2050 config-editor stderr | github.com/go-chi/chi/middleware.RequestLogger.func1.1 config-editor stderr | /remote-source/config-tool/app/vendor/github.com/go-chi/chi/middleware/logger.go:46 config-editor stderr | net/http.HandlerFunc.ServeHTTP config-editor stderr | /opt/rh/go-toolset-1.16/root/usr/lib/go-toolset-1.16-golang/src/net/http/server.go:2050 config-editor stderr | github.com/go-chi/chi/middleware.RealIP.func1 config-editor stderr | /remote-source/config-tool/app/vendor/github.com/go-chi/chi/middleware/realip.go:34 config-editor stderr | net/http.HandlerFunc.ServeHTTP config-editor stderr | /opt/rh/go-toolset-1.16/root/usr/lib/go-toolset-1.16-golang/src/net/http/server.go:2050 config-editor stderr | github.com/go-chi/chi/middleware.RequestID.func1 config-editor stderr | /remote-source/config-tool/app/vendor/github.com/go-chi/chi/middleware/request_id.go:76 config-editor stderr | net/http.HandlerFunc.ServeHTTP config-editor stderr | /opt/rh/go-toolset-1.16/root/usr/lib/go-toolset-1.16-golang/src/net/http/server.go:2050 config-editor stderr | github.com/go-chi/chi.(*Mux).ServeHTTP config-editor stderr | /remote-source/config-tool/app/vendor/github.com/go-chi/chi/mux.go:86 config-editor stderr | net/http.serverHandler.ServeHTTP config-editor stderr | /opt/rh/go-toolset-1.16/root/usr/lib/go-toolset-1.16-golang/src/net/http/server.go:2868 config-editor stderr | net/http.(*conn).serve config-editor stderr | /opt/rh/go-toolset-1.16/root/usr/lib/go-toolset-1.16-golang/src/net/http/server.go:1933 config-editor stderr | created by net/http.(*Server).Serve config-editor stderr | /opt/rh/go-toolset-1.16/root/usr/lib/go-toolset-1.16-golang/src/net/http/server.go:2994 config-editor stderr | config-editor stdout | 2022/04/27 08:52:22 [quay370-quay-config-editor-779cfdf667-jczq6/yWOZOPr4Lb-000022] "POST http://quay370-quay-config-editor-quay370.apps.quayperf370.perfscale.devcluster.openshift.com/api/v1/config/validate?mode=online HTTP/1.1" from 114.245.162.171 - 500 0B in 5.775636523s config-editor stdout | time="2022-04-27T08:52:50Z" level=debug msg="Received config bundle. Decoding into ConfigBundle struct" config-editor stdout | time="2022-04-27T08:52:50Z" level=debug msg="Validating ActionLogArchiving" config-editor stdout | time="2022-04-27T08:52:50Z" level=debug msg="Validating UserVisibleSettings" config-editor stdout | time="2022-04-27T08:52:50Z" level=debug msg="Validating GoogleLogin" config-editor stdout | time="2022-04-27T08:52:50Z" level=debug msg="Validating RepoMirror" config-editor stdout | time="2022-04-27T08:52:50Z" level=debug msg="Validating AppTokenAuthentication" config-editor stdout | time="2022-04-27T08:52:50Z" level=debug msg="Validating DistributedStorage" config-editor stderr | panic: runtime error: index out of range [1] with length 0 config-editor stderr | config-editor stderr | -> github.com/quay/config-tool/pkg/lib/shared.validateAzureGateway config-editor stderr | -> /remote-source/config-tool/app/pkg/lib/shared/storage_validators.go:403 config-editor stderr | github.com/quay/config-tool/pkg/lib/shared.ValidateStorage config-editor stderr | /remote-source/config-tool/app/pkg/lib/shared/storage_validators.go:201 config-editor stderr | github.com/quay/config-tool/pkg/lib/fieldgroups/distributedstorage.(*DistributedStorageFieldGroup).Validate config-editor stderr | /remote-source/config-tool/app/pkg/lib/fieldgroups/distributedstorage/distributedstorage_validator.go:42 config-editor stderr | github.com/quay/config-tool/pkg/lib/config.Config.Validate config-editor stderr | /remote-source/config-tool/app/pkg/lib/config/config_validator.go:20 config-editor stderr | github.com/quay/config-tool/pkg/lib/editor.validateConfigBundle.func1 config-editor stderr | /remote-source/config-tool/app/pkg/lib/editor/controllers.go:213 config-editor stderr | github.com/abbot/go-http-auth.JustCheck.func1 config-editor stderr | /remote-source/config-tool/app/vendor/github.com/abbot/go-http-auth/auth.go:107 config-editor stderr | github.com/abbot/go-http-auth.(*BasicAuth).Wrap.func1 config-editor stderr | /remote-source/config-tool/app/vendor/github.com/abbot/go-http-auth/basic.go:146 config-editor stderr | net/http.HandlerFunc.ServeHTTP config-editor stderr | /opt/rh/go-toolset-1.16/root/usr/lib/go-toolset-1.16-golang/src/net/http/server.go:2050 config-editor stderr | github.com/go-chi/chi.(*Mux).routeHTTP config-editor stderr | /remote-source/config-tool/app/vendor/github.com/go-chi/chi/mux.go:431 config-editor stderr | net/http.HandlerFunc.ServeHTTP config-editor stderr | /opt/rh/go-toolset-1.16/root/usr/lib/go-toolset-1.16-golang/src/net/http/server.go:2050 config-editor stderr | github.com/go-chi/chi/middleware.Recoverer.func1 config-editor stderr | /remote-source/config-tool/app/vendor/github.com/go-chi/chi/middleware/recoverer.go:37 config-editor stderr | net/http.HandlerFunc.ServeHTTP config-editor stderr | /opt/rh/go-toolset-1.16/root/usr/lib/go-toolset-1.16-golang/src/net/http/server.go:2050 config-editor stderr | github.com/go-chi/chi/middleware.RequestLogger.func1.1 config-editor stderr | /remote-source/config-tool/app/vendor/github.com/go-chi/chi/middleware/logger.go:46 config-editor stderr | net/http.HandlerFunc.ServeHTTP config-editor stderr | /opt/rh/go-toolset-1.16/root/usr/lib/go-toolset-1.16-golang/src/net/http/server.go:2050 config-editor stderr | github.com/go-chi/chi/middleware.RealIP.func1 config-editor stderr | /remote-source/config-tool/app/vendor/github.com/go-chi/chi/middleware/realip.go:34 config-editor stderr | net/http.HandlerFunc.ServeHTTP config-editor stderr | /opt/rh/go-toolset-1.16/root/usr/lib/go-toolset-1.16-golang/src/net/http/server.go:2050 config-editor stderr | github.com/go-chi/chi/middleware.RequestID.func1 config-editor stderr | /remote-source/config-tool/app/vendor/github.com/go-chi/chi/middleware/request_id.go:76 config-editor stderr | net/http.HandlerFunc.ServeHTTP config-editor stderr | /opt/rh/go-toolset-1.16/root/usr/lib/go-toolset-1.16-golang/src/net/http/server.go:2050 config-editor stderr | github.com/go-chi/chi.(*Mux).ServeHTTP config-editor stderr | /remote-source/config-tool/app/vendor/github.com/go-chi/chi/mux.go:86 config-editor stderr | net/http.serverHandler.ServeHTTP config-editor stderr | /opt/rh/go-toolset-1.16/root/usr/lib/go-toolset-1.16-golang/src/net/http/server.go:2868 config-editor stderr | net/http.(*conn).serve config-editor stderr | /opt/rh/go-toolset-1.16/root/usr/lib/go-toolset-1.16-golang/src/net/http/server.go:1933 config-editor stderr | created by net/http.(*Server).Serve config-editor stderr | /opt/rh/go-toolset-1.16/root/usr/lib/go-toolset-1.16-golang/src/net/http/server.go:2994 config-editor stderr | config-editor stdout | 2022/04/27 08:52:54 [quay370-quay-config-editor-779cfdf667-jczq6/yWOZOPr4Lb-000023] "POST http://quay370-quay-config-editor-quay370.apps.quayperf370.perfscale.devcluster.openshift.com/api/v1/config/validate?mode=online HTTP/1.1" from 114.245.162.171 - 500 0B in 4.37190772s