You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/06/06 14:03:11 UTC
[GitHub] [skywalking-banyandb] hanahmily opened a new pull request, #130: [WIP]Add bydctl and ui projects
hanahmily opened a new pull request, #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130
Fixes https://github.com/apache/skywalking/issues/9162
Signed-off-by: Gao Hongtao <ha...@gmail.com>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] hanahmily merged pull request #130: Add bydbctl and ui projects
Posted by GitBox <gi...@apache.org>.
hanahmily merged PR #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] kezhenxu94 commented on a diff in pull request #130: Add bydbctl and ui projects
Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on code in PR #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130#discussion_r895133461
##########
dist/LICENSE:
##########
@@ -174,6 +174,20 @@
of your accepting any such warranty or additional liability.
+========================================================================
Review Comment:
Should be fixed in https://github.com/apache/skywalking-eyes/pull/115
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] hanahmily commented on a diff in pull request #130: Add bydbctl and ui projects
Posted by GitBox <gi...@apache.org>.
hanahmily commented on code in PR #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130#discussion_r890837619
##########
dist/LICENSE:
##########
@@ -174,6 +174,20 @@
of your accepting any such warranty or additional liability.
+========================================================================
Review Comment:
We should not rerun `make license-dep` except for releasing for now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] wu-sheng commented on a diff in pull request #130: Add bydbctl and ui projects
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on code in PR #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130#discussion_r890792788
##########
dist/LICENSE:
##########
@@ -201,58 +216,6 @@ BSD-3-Clause and Apache-2.0 and MIT and BSD-3-Clause and MIT licenses
github.com/klauspost/compress v1.15.6 BSD-3-Clause and Apache-2.0 and MIT and BSD-3-Clause and MIT
-========================================================================
Review Comment:
Are these removed recently?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] hanahmily commented on a diff in pull request #130: [WIP]Add bydbctl and ui projects
Posted by GitBox <gi...@apache.org>.
hanahmily commented on code in PR #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130#discussion_r890734174
##########
banyand/webapp/webapp.go:
##########
@@ -0,0 +1,153 @@
+// Licensed to Apache Software Foundation (ASF) under one or more contributor
+// license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright
+// ownership. Apache Software Foundation (ASF) licenses this file to you under
+// the Apache License, Version 2.0 (the "License"); you may
+// not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package webapp
+
+import (
+ "fmt"
+ "io/fs"
+ "net/http"
+ "strings"
+
+ "github.com/apache/skywalking-banyandb/pkg/logger"
+ "github.com/apache/skywalking-banyandb/pkg/run"
+ "github.com/apache/skywalking-banyandb/ui"
+)
+
+type ServiceRepo interface {
+ run.Config
+ run.Service
+}
+
+var (
+ _ ServiceRepo = (*service)(nil)
+)
+
+func NewService() ServiceRepo {
+ return &service{
+ stopCh: make(chan struct{}),
+ }
+}
+
+type service struct {
+ listenAddr string
+ mux *http.ServeMux
+ stopCh chan struct{}
+ l *logger.Logger
+}
+
+func (p *service) FlagSet() *run.FlagSet {
+ flagSet := run.NewFlagSet("")
+ flagSet.StringVar(&p.listenAddr, "webapp-listener-addr", ":17913", "listen addr for webapp")
+ return flagSet
+}
+
+func (p *service) Validate() error {
+ return nil
+}
+
+func (p *service) Name() string {
+ return "webapp"
+}
+
+func (p *service) PreRun() error {
+ p.l = logger.GetLogger(p.Name())
+ fSys, err := fs.Sub(ui.DistContent, "dist")
+ if err != nil {
+ return err
+ }
+ p.mux = http.NewServeMux()
+ httpFS := http.FS(fSys)
+ fileServer := http.FileServer(http.FS(fSys))
+ serveIndex := serveFileContents("index.html", httpFS)
+ p.mux.Handle("/", intercept404(fileServer, serveIndex))
Review Comment:
stdlib aligned our requirement which is to serve the SPA frontend and RESTFul APIs. The main repo selected a similar webapp integration path. The difference between them is that java stdlib doesn't provide a handy HTTP server and we have to adapt to the spring ecosystem.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] hanahmily commented on a diff in pull request #130: [WIP]Add bydbctl and ui projects
Posted by GitBox <gi...@apache.org>.
hanahmily commented on code in PR #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130#discussion_r890631062
##########
banyand/webapp/webapp.go:
##########
@@ -0,0 +1,153 @@
+// Licensed to Apache Software Foundation (ASF) under one or more contributor
+// license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright
+// ownership. Apache Software Foundation (ASF) licenses this file to you under
+// the Apache License, Version 2.0 (the "License"); you may
+// not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package webapp
+
+import (
+ "fmt"
+ "io/fs"
+ "net/http"
+ "strings"
+
+ "github.com/apache/skywalking-banyandb/pkg/logger"
+ "github.com/apache/skywalking-banyandb/pkg/run"
+ "github.com/apache/skywalking-banyandb/ui"
+)
+
+type ServiceRepo interface {
+ run.Config
+ run.Service
+}
+
+var (
+ _ ServiceRepo = (*service)(nil)
+)
+
+func NewService() ServiceRepo {
+ return &service{
+ stopCh: make(chan struct{}),
+ }
+}
+
+type service struct {
+ listenAddr string
+ mux *http.ServeMux
+ stopCh chan struct{}
+ l *logger.Logger
+}
+
+func (p *service) FlagSet() *run.FlagSet {
+ flagSet := run.NewFlagSet("")
+ flagSet.StringVar(&p.listenAddr, "webapp-listener-addr", ":17913", "listen addr for webapp")
Review Comment:
I prefer this port. The frontend could access API through `/api/*` instead of `<another domain>/api/*`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] lujiajing1126 commented on a diff in pull request #130: [WIP]Add bydbctl and ui projects
Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on code in PR #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130#discussion_r890241913
##########
banyand/webapp/webapp.go:
##########
@@ -0,0 +1,153 @@
+// Licensed to Apache Software Foundation (ASF) under one or more contributor
+// license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright
+// ownership. Apache Software Foundation (ASF) licenses this file to you under
+// the Apache License, Version 2.0 (the "License"); you may
+// not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package webapp
+
+import (
+ "fmt"
+ "io/fs"
+ "net/http"
+ "strings"
+
+ "github.com/apache/skywalking-banyandb/pkg/logger"
+ "github.com/apache/skywalking-banyandb/pkg/run"
+ "github.com/apache/skywalking-banyandb/ui"
+)
+
+type ServiceRepo interface {
+ run.Config
+ run.Service
+}
+
+var (
+ _ ServiceRepo = (*service)(nil)
+)
+
+func NewService() ServiceRepo {
+ return &service{
+ stopCh: make(chan struct{}),
+ }
+}
+
+type service struct {
+ listenAddr string
+ mux *http.ServeMux
+ stopCh chan struct{}
+ l *logger.Logger
+}
+
+func (p *service) FlagSet() *run.FlagSet {
+ flagSet := run.NewFlagSet("")
+ flagSet.StringVar(&p.listenAddr, "webapp-listener-addr", ":17913", "listen addr for webapp")
Review Comment:
We will serve gRPC-web protocol on this port or `17912`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] lujiajing1126 commented on a diff in pull request #130: [WIP]Add bydbctl and ui projects
Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on code in PR #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130#discussion_r890711533
##########
banyand/webapp/webapp.go:
##########
@@ -0,0 +1,153 @@
+// Licensed to Apache Software Foundation (ASF) under one or more contributor
+// license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright
+// ownership. Apache Software Foundation (ASF) licenses this file to you under
+// the Apache License, Version 2.0 (the "License"); you may
+// not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package webapp
+
+import (
+ "fmt"
+ "io/fs"
+ "net/http"
+ "strings"
+
+ "github.com/apache/skywalking-banyandb/pkg/logger"
+ "github.com/apache/skywalking-banyandb/pkg/run"
+ "github.com/apache/skywalking-banyandb/ui"
+)
+
+type ServiceRepo interface {
+ run.Config
+ run.Service
+}
+
+var (
+ _ ServiceRepo = (*service)(nil)
+)
+
+func NewService() ServiceRepo {
+ return &service{
+ stopCh: make(chan struct{}),
+ }
+}
+
+type service struct {
+ listenAddr string
+ mux *http.ServeMux
+ stopCh chan struct{}
+ l *logger.Logger
+}
+
+func (p *service) FlagSet() *run.FlagSet {
+ flagSet := run.NewFlagSet("")
+ flagSet.StringVar(&p.listenAddr, "webapp-listener-addr", ":17913", "listen addr for webapp")
+ return flagSet
+}
+
+func (p *service) Validate() error {
+ return nil
+}
+
+func (p *service) Name() string {
+ return "webapp"
+}
+
+func (p *service) PreRun() error {
+ p.l = logger.GetLogger(p.Name())
+ fSys, err := fs.Sub(ui.DistContent, "dist")
+ if err != nil {
+ return err
+ }
+ p.mux = http.NewServeMux()
+ httpFS := http.FS(fSys)
+ fileServer := http.FileServer(http.FS(fSys))
+ serveIndex := serveFileContents("index.html", httpFS)
+ p.mux.Handle("/", intercept404(fileServer, serveIndex))
Review Comment:
> I didn't find any reason to import `gin` or other frameworks.
I see, currently the `http` stdlib is enough here. I'm not familiar with web-related ecosystem in Go.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] wu-sheng commented on a diff in pull request #130: [WIP]Add bydbctl and ui projects
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on code in PR #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130#discussion_r890655621
##########
.github/workflows/publish-docker.yml:
##########
@@ -58,12 +63,12 @@ jobs:
docker image ls
- name: Log in to the Container registry
uses: docker/login-action@v1.10.0
- if: github.ref == 'refs/heads/main'
+ # if: github.ref == 'refs/heads/main'
with:
registry: ${{ env.HUB }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push docker image
- if: github.ref == 'refs/heads/main'
+ # if: github.ref == 'refs/heads/main'
Review Comment:
TODO, are these temp changing?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] lujiajing1126 commented on a diff in pull request #130: Add bydbctl and ui projects
Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on code in PR #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130#discussion_r890797064
##########
dist/LICENSE:
##########
@@ -174,6 +174,20 @@
of your accepting any such warranty or additional liability.
+========================================================================
Review Comment:
I also want to mention this issue since in the last PR #129 there's huge amount of changes due to the unstable order.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] hanahmily commented on a diff in pull request #130: [WIP]Add bydbctl and ui projects
Posted by GitBox <gi...@apache.org>.
hanahmily commented on code in PR #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130#discussion_r890748705
##########
dist/LICENSE:
##########
@@ -174,6 +174,20 @@
of your accepting any such warranty or additional liability.
+========================================================================
Review Comment:
@kezhenxu94 . I failed to include the license dep checking into CI due to the order of groups cannot stay the same. Skywalking-eye changed the content on rerunning `dep resolve`. Any thoughts?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] hanahmily commented on a diff in pull request #130: [WIP]Add bydbctl and ui projects
Posted by GitBox <gi...@apache.org>.
hanahmily commented on code in PR #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130#discussion_r890656454
##########
.github/workflows/publish-docker.yml:
##########
@@ -58,12 +63,12 @@ jobs:
docker image ls
- name: Log in to the Container registry
uses: docker/login-action@v1.10.0
- if: github.ref == 'refs/heads/main'
+ # if: github.ref == 'refs/heads/main'
with:
registry: ${{ env.HUB }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push docker image
- if: github.ref == 'refs/heads/main'
+ # if: github.ref == 'refs/heads/main'
Review Comment:
It's only for testing and this PR is not ready for review
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] wu-sheng commented on pull request #130: [WIP]Add bydbctl and ui projects
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on PR #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130#issuecomment-1148048200
Because you are adding vue into this repo as well as further release, you have to keep binary license updated as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] lujiajing1126 commented on a diff in pull request #130: [WIP]Add bydbctl and ui projects
Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on code in PR #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130#discussion_r890686507
##########
banyand/webapp/webapp.go:
##########
@@ -0,0 +1,153 @@
+// Licensed to Apache Software Foundation (ASF) under one or more contributor
+// license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright
+// ownership. Apache Software Foundation (ASF) licenses this file to you under
+// the Apache License, Version 2.0 (the "License"); you may
+// not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package webapp
+
+import (
+ "fmt"
+ "io/fs"
+ "net/http"
+ "strings"
+
+ "github.com/apache/skywalking-banyandb/pkg/logger"
+ "github.com/apache/skywalking-banyandb/pkg/run"
+ "github.com/apache/skywalking-banyandb/ui"
+)
+
+type ServiceRepo interface {
+ run.Config
+ run.Service
+}
+
+var (
+ _ ServiceRepo = (*service)(nil)
+)
+
+func NewService() ServiceRepo {
+ return &service{
+ stopCh: make(chan struct{}),
+ }
+}
+
+type service struct {
+ listenAddr string
+ mux *http.ServeMux
+ stopCh chan struct{}
+ l *logger.Logger
+}
+
+func (p *service) FlagSet() *run.FlagSet {
+ flagSet := run.NewFlagSet("")
+ flagSet.StringVar(&p.listenAddr, "webapp-listener-addr", ":17913", "listen addr for webapp")
Review Comment:
I agree. Use one protocol for a single port may be the best practice.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] wu-sheng commented on a diff in pull request #130: Add bydbctl and ui projects
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on code in PR #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130#discussion_r890837780
##########
dist/LICENSE:
##########
@@ -201,58 +216,6 @@ BSD-3-Clause and Apache-2.0 and MIT and BSD-3-Clause and MIT licenses
github.com/klauspost/compress v1.15.6 BSD-3-Clause and Apache-2.0 and MIT and BSD-3-Clause and MIT
-========================================================================
Review Comment:
@kezhenxu94 @fgksgf @mrproliu Any suggestion?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] lujiajing1126 commented on a diff in pull request #130: [WIP]Add bydbctl and ui projects
Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on code in PR #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130#discussion_r890241913
##########
banyand/webapp/webapp.go:
##########
@@ -0,0 +1,153 @@
+// Licensed to Apache Software Foundation (ASF) under one or more contributor
+// license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright
+// ownership. Apache Software Foundation (ASF) licenses this file to you under
+// the Apache License, Version 2.0 (the "License"); you may
+// not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package webapp
+
+import (
+ "fmt"
+ "io/fs"
+ "net/http"
+ "strings"
+
+ "github.com/apache/skywalking-banyandb/pkg/logger"
+ "github.com/apache/skywalking-banyandb/pkg/run"
+ "github.com/apache/skywalking-banyandb/ui"
+)
+
+type ServiceRepo interface {
+ run.Config
+ run.Service
+}
+
+var (
+ _ ServiceRepo = (*service)(nil)
+)
+
+func NewService() ServiceRepo {
+ return &service{
+ stopCh: make(chan struct{}),
+ }
+}
+
+type service struct {
+ listenAddr string
+ mux *http.ServeMux
+ stopCh chan struct{}
+ l *logger.Logger
+}
+
+func (p *service) FlagSet() *run.FlagSet {
+ flagSet := run.NewFlagSet("")
+ flagSet.StringVar(&p.listenAddr, "webapp-listener-addr", ":17913", "listen addr for webapp")
Review Comment:
We will server gRPC-web protocol on this port or `17912`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] hanahmily commented on a diff in pull request #130: Add bydbctl and ui projects
Posted by GitBox <gi...@apache.org>.
hanahmily commented on code in PR #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130#discussion_r890836257
##########
dist/LICENSE:
##########
@@ -201,58 +216,6 @@ BSD-3-Clause and Apache-2.0 and MIT and BSD-3-Clause and MIT licenses
github.com/klauspost/compress v1.15.6 BSD-3-Clause and Apache-2.0 and MIT and BSD-3-Clause and MIT
-========================================================================
Review Comment:
As I mentioned at https://github.com/apache/skywalking-banyandb/pull/130#discussion_r890748705, if skywalking eye could output coherent results, we can add the license generator to the CI to find these changes ASAP
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] hanahmily commented on a diff in pull request #130: Add bydbctl and ui projects
Posted by GitBox <gi...@apache.org>.
hanahmily commented on code in PR #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130#discussion_r890833115
##########
dist/LICENSE:
##########
@@ -201,58 +216,6 @@ BSD-3-Clause and Apache-2.0 and MIT and BSD-3-Clause and MIT licenses
github.com/klauspost/compress v1.15.6 BSD-3-Clause and Apache-2.0 and MIT and BSD-3-Clause and MIT
-========================================================================
Review Comment:
They might relate to https://github.com/apache/skywalking-banyandb/pull/129
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] hanahmily commented on a diff in pull request #130: [WIP]Add bydbctl and ui projects
Posted by GitBox <gi...@apache.org>.
hanahmily commented on code in PR #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130#discussion_r890709044
##########
banyand/webapp/webapp.go:
##########
@@ -0,0 +1,153 @@
+// Licensed to Apache Software Foundation (ASF) under one or more contributor
+// license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright
+// ownership. Apache Software Foundation (ASF) licenses this file to you under
+// the Apache License, Version 2.0 (the "License"); you may
+// not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package webapp
+
+import (
+ "fmt"
+ "io/fs"
+ "net/http"
+ "strings"
+
+ "github.com/apache/skywalking-banyandb/pkg/logger"
+ "github.com/apache/skywalking-banyandb/pkg/run"
+ "github.com/apache/skywalking-banyandb/ui"
+)
+
+type ServiceRepo interface {
+ run.Config
+ run.Service
+}
+
+var (
+ _ ServiceRepo = (*service)(nil)
+)
+
+func NewService() ServiceRepo {
+ return &service{
+ stopCh: make(chan struct{}),
+ }
+}
+
+type service struct {
+ listenAddr string
+ mux *http.ServeMux
+ stopCh chan struct{}
+ l *logger.Logger
+}
+
+func (p *service) FlagSet() *run.FlagSet {
+ flagSet := run.NewFlagSet("")
+ flagSet.StringVar(&p.listenAddr, "webapp-listener-addr", ":17913", "listen addr for webapp")
+ return flagSet
+}
+
+func (p *service) Validate() error {
+ return nil
+}
+
+func (p *service) Name() string {
+ return "webapp"
+}
+
+func (p *service) PreRun() error {
+ p.l = logger.GetLogger(p.Name())
+ fSys, err := fs.Sub(ui.DistContent, "dist")
+ if err != nil {
+ return err
+ }
+ p.mux = http.NewServeMux()
+ httpFS := http.FS(fSys)
+ fileServer := http.FileServer(http.FS(fSys))
+ serveIndex := serveFileContents("index.html", httpFS)
+ p.mux.Handle("/", intercept404(fileServer, serveIndex))
Review Comment:
I didn't find any reason to import `gin` or other frameworks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] hanahmily commented on a diff in pull request #130: [WIP]Add bydbctl and ui projects
Posted by GitBox <gi...@apache.org>.
hanahmily commented on code in PR #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130#discussion_r890631062
##########
banyand/webapp/webapp.go:
##########
@@ -0,0 +1,153 @@
+// Licensed to Apache Software Foundation (ASF) under one or more contributor
+// license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright
+// ownership. Apache Software Foundation (ASF) licenses this file to you under
+// the Apache License, Version 2.0 (the "License"); you may
+// not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package webapp
+
+import (
+ "fmt"
+ "io/fs"
+ "net/http"
+ "strings"
+
+ "github.com/apache/skywalking-banyandb/pkg/logger"
+ "github.com/apache/skywalking-banyandb/pkg/run"
+ "github.com/apache/skywalking-banyandb/ui"
+)
+
+type ServiceRepo interface {
+ run.Config
+ run.Service
+}
+
+var (
+ _ ServiceRepo = (*service)(nil)
+)
+
+func NewService() ServiceRepo {
+ return &service{
+ stopCh: make(chan struct{}),
+ }
+}
+
+type service struct {
+ listenAddr string
+ mux *http.ServeMux
+ stopCh chan struct{}
+ l *logger.Logger
+}
+
+func (p *service) FlagSet() *run.FlagSet {
+ flagSet := run.NewFlagSet("")
+ flagSet.StringVar(&p.listenAddr, "webapp-listener-addr", ":17913", "listen addr for webapp")
Review Comment:
I prefer this port. The frontend could access API through `/api/*`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-banyandb] lujiajing1126 commented on a diff in pull request #130: [WIP]Add bydbctl and ui projects
Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on code in PR #130:
URL: https://github.com/apache/skywalking-banyandb/pull/130#discussion_r890686828
##########
banyand/webapp/webapp.go:
##########
@@ -0,0 +1,153 @@
+// Licensed to Apache Software Foundation (ASF) under one or more contributor
+// license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright
+// ownership. Apache Software Foundation (ASF) licenses this file to you under
+// the Apache License, Version 2.0 (the "License"); you may
+// not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package webapp
+
+import (
+ "fmt"
+ "io/fs"
+ "net/http"
+ "strings"
+
+ "github.com/apache/skywalking-banyandb/pkg/logger"
+ "github.com/apache/skywalking-banyandb/pkg/run"
+ "github.com/apache/skywalking-banyandb/ui"
+)
+
+type ServiceRepo interface {
+ run.Config
+ run.Service
+}
+
+var (
+ _ ServiceRepo = (*service)(nil)
+)
+
+func NewService() ServiceRepo {
+ return &service{
+ stopCh: make(chan struct{}),
+ }
+}
+
+type service struct {
+ listenAddr string
+ mux *http.ServeMux
+ stopCh chan struct{}
+ l *logger.Logger
+}
+
+func (p *service) FlagSet() *run.FlagSet {
+ flagSet := run.NewFlagSet("")
+ flagSet.StringVar(&p.listenAddr, "webapp-listener-addr", ":17913", "listen addr for webapp")
+ return flagSet
+}
+
+func (p *service) Validate() error {
+ return nil
+}
+
+func (p *service) Name() string {
+ return "webapp"
+}
+
+func (p *service) PreRun() error {
+ p.l = logger.GetLogger(p.Name())
+ fSys, err := fs.Sub(ui.DistContent, "dist")
+ if err != nil {
+ return err
+ }
+ p.mux = http.NewServeMux()
+ httpFS := http.FS(fSys)
+ fileServer := http.FileServer(http.FS(fSys))
+ serveIndex := serveFileContents("index.html", httpFS)
+ p.mux.Handle("/", intercept404(fileServer, serveIndex))
Review Comment:
Then we have to mount `/api` here.
Shall we consider some web framework like `gin`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org