From 3babaf1a4dc3558cec9f8e14a83527d08063206f Mon Sep 17 00:00:00 2001 From: David Christofas Date: Tue, 4 Oct 2022 15:55:30 +0200 Subject: [PATCH] remove the graph-explorer servier from ocis (#4733) --- .drone.star | 3 +- .vscode/launch.json | 2 +- Makefile | 1 - .../oc10_ocis_parallel/config/ocis/proxy.yaml | 2 - .../oc10_ocis_parallel/docker-compose.yml | 2 +- .../ocis_hello/config/ocis/proxy.yaml | 2 - .../config/proxy/proxy.yaml | 2 - .../docker-compose.yml | 22 ---- .../docker-compose-additions.yml | 8 -- .../examples/ocis_ldap/docker-compose.yml | 2 +- docs/ocis/development/debugging.md | 3 - docs/services/graph-explorer/.gitignore | 0 docs/services/graph-explorer/_index.md | 18 --- docs/services/graph-explorer/configuration.md | 15 --- docs/services/port-ranges.md | 2 +- ocis-pkg/config/config.go | 2 - ocis-pkg/config/defaultconfig.go | 2 - ocis/pkg/command/graph-explorer.go | 30 ----- ocis/pkg/runtime/service/service.go | 2 - services/graph-explorer/.dockerignore | 2 - services/graph-explorer/Makefile | 44 ------- services/graph-explorer/assets/.keep | 0 .../graph-explorer/cmd/graph-explorer/main.go | 14 --- .../docker/Dockerfile.linux.amd64 | 19 --- .../docker/Dockerfile.linux.arm | 19 --- .../docker/Dockerfile.linux.arm64 | 19 --- services/graph-explorer/docker/manifest.tmpl | 22 ---- services/graph-explorer/graph_explorer.go | 9 -- services/graph-explorer/pkg/assets/option.go | 50 -------- services/graph-explorer/pkg/command/health.go | 54 --------- services/graph-explorer/pkg/command/root.go | 59 ---------- services/graph-explorer/pkg/command/server.go | 104 ----------------- .../graph-explorer/pkg/command/version.go | 50 -------- services/graph-explorer/pkg/config/config.go | 32 ----- services/graph-explorer/pkg/config/debug.go | 9 -- .../pkg/config/defaults/defaultconfig.go | 71 ----------- services/graph-explorer/pkg/config/http.go | 16 --- services/graph-explorer/pkg/config/log.go | 9 -- .../graph-explorer/pkg/config/parser/parse.go | 38 ------ services/graph-explorer/pkg/config/service.go | 6 - services/graph-explorer/pkg/config/tracing.go | 9 -- .../graph-explorer/pkg/logging/logging.go | 17 --- .../graph-explorer/pkg/metrics/metrics.go | 33 ------ .../graph-explorer/pkg/server/debug/option.go | 50 -------- .../graph-explorer/pkg/server/debug/server.go | 59 ---------- .../graph-explorer/pkg/server/http/option.go | 76 ------------ .../graph-explorer/pkg/server/http/server.go | 55 --------- .../pkg/service/v0/instrument.go | 30 ----- .../graph-explorer/pkg/service/v0/logging.go | 30 ----- .../graph-explorer/pkg/service/v0/option.go | 50 -------- .../graph-explorer/pkg/service/v0/service.go | 110 ------------------ .../graph-explorer/pkg/service/v0/tracing.go | 26 ----- .../graph-explorer/pkg/tracing/tracing.go | 23 ---- services/graph-explorer/reflex.conf | 2 - .../idp/pkg/config/defaults/defaultconfig.go | 11 -- .../pkg/config/defaults/defaultconfig.go | 5 - sonar-project.properties | 2 +- .../drone/ocis/proxy.yaml | 2 - 58 files changed, 6 insertions(+), 1350 deletions(-) delete mode 100644 docs/services/graph-explorer/.gitignore delete mode 100644 docs/services/graph-explorer/_index.md delete mode 100644 docs/services/graph-explorer/configuration.md delete mode 100644 ocis/pkg/command/graph-explorer.go delete mode 100644 services/graph-explorer/.dockerignore delete mode 100644 services/graph-explorer/Makefile delete mode 100644 services/graph-explorer/assets/.keep delete mode 100644 services/graph-explorer/cmd/graph-explorer/main.go delete mode 100644 services/graph-explorer/docker/Dockerfile.linux.amd64 delete mode 100644 services/graph-explorer/docker/Dockerfile.linux.arm delete mode 100644 services/graph-explorer/docker/Dockerfile.linux.arm64 delete mode 100644 services/graph-explorer/docker/manifest.tmpl delete mode 100644 services/graph-explorer/graph_explorer.go delete mode 100644 services/graph-explorer/pkg/assets/option.go delete mode 100644 services/graph-explorer/pkg/command/health.go delete mode 100644 services/graph-explorer/pkg/command/root.go delete mode 100644 services/graph-explorer/pkg/command/server.go delete mode 100644 services/graph-explorer/pkg/command/version.go delete mode 100644 services/graph-explorer/pkg/config/config.go delete mode 100644 services/graph-explorer/pkg/config/debug.go delete mode 100644 services/graph-explorer/pkg/config/defaults/defaultconfig.go delete mode 100644 services/graph-explorer/pkg/config/http.go delete mode 100644 services/graph-explorer/pkg/config/log.go delete mode 100644 services/graph-explorer/pkg/config/parser/parse.go delete mode 100644 services/graph-explorer/pkg/config/service.go delete mode 100644 services/graph-explorer/pkg/config/tracing.go delete mode 100644 services/graph-explorer/pkg/logging/logging.go delete mode 100644 services/graph-explorer/pkg/metrics/metrics.go delete mode 100644 services/graph-explorer/pkg/server/debug/option.go delete mode 100644 services/graph-explorer/pkg/server/debug/server.go delete mode 100644 services/graph-explorer/pkg/server/http/option.go delete mode 100644 services/graph-explorer/pkg/server/http/server.go delete mode 100644 services/graph-explorer/pkg/service/v0/instrument.go delete mode 100644 services/graph-explorer/pkg/service/v0/logging.go delete mode 100644 services/graph-explorer/pkg/service/v0/option.go delete mode 100644 services/graph-explorer/pkg/service/v0/service.go delete mode 100644 services/graph-explorer/pkg/service/v0/tracing.go delete mode 100644 services/graph-explorer/pkg/tracing/tracing.go delete mode 100644 services/graph-explorer/reflex.conf diff --git a/.drone.star b/.drone.star index 4111969372..8efd2e8fdd 100644 --- a/.drone.star +++ b/.drone.star @@ -66,7 +66,6 @@ config = { "services/auth-machine", "services/frontend", "services/gateway", - "services/graph-explorer", "services/graph", "services/groups", "services/idm", @@ -1944,7 +1943,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on = "SHARING_USER_OWNCLOUDSQL_DB_NAME": "owncloud", # General oCIS config # OCIS_RUN_SERVICES specifies to start all fullstack services except idm and idp. These are replaced by external services - "OCIS_RUN_SERVICES": "app-registry,app-provider,auth-basic,auth-machine,frontend,gateway,graph,graph-explorer,groups,nats,notifications,ocdav,ocs,proxy,search,settings,sharing,storage-system,storage-publiclink,storage-shares,storage-users,store,thumbnails,users,web,webdav", + "OCIS_RUN_SERVICES": "app-registry,app-provider,auth-basic,auth-machine,frontend,gateway,graph,groups,nats,notifications,ocdav,ocs,proxy,search,settings,sharing,storage-system,storage-publiclink,storage-shares,storage-users,store,thumbnails,users,web,webdav", "OCIS_LOG_LEVEL": "info", "OCIS_URL": OCIS_URL, "OCIS_BASE_DATA_PATH": "/mnt/data/ocis", diff --git a/.vscode/launch.json b/.vscode/launch.json index 144562162e..c714629bd9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -27,7 +27,7 @@ // demo users "IDM_CREATE_DEMO_USERS": "true", // OCIS_RUN_SERVICES allows to start a subset of services even in the supervised mode - //"OCIS_RUN_SERVICES": "settings,storage-system,graph,graph-explorer,idp,idm,ocs,store,thumbnails,web,webdav,frontend,gateway,users,groups,auth-basic,storage-authmachine,storage-users,storage-shares,storage-publiclink,storage-system,app-provider,sharing,proxy,ocdav", + //"OCIS_RUN_SERVICES": "settings,storage-system,graph,idp,idm,ocs,store,thumbnails,web,webdav,frontend,gateway,users,groups,auth-basic,storage-authmachine,storage-users,storage-shares,storage-publiclink,storage-system,app-provider,sharing,proxy,ocdav", /* * Keep secrets and passwords in one block to allow easy uncommenting diff --git a/Makefile b/Makefile index d4e43e2555..fe99873626 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,6 @@ OCIS_MODULES = \ services/frontend \ services/gateway \ services/graph \ - services/graph-explorer \ services/groups \ services/idm \ services/idp \ diff --git a/deployments/examples/oc10_ocis_parallel/config/ocis/proxy.yaml b/deployments/examples/oc10_ocis_parallel/config/ocis/proxy.yaml index 7a3688598c..6b87edebed 100755 --- a/deployments/examples/oc10_ocis_parallel/config/ocis/proxy.yaml +++ b/deployments/examples/oc10_ocis_parallel/config/ocis/proxy.yaml @@ -51,8 +51,6 @@ policies: backend: http://localhost:9140 - endpoint: /graph/ backend: http://localhost:9120 - - endpoint: /graph-explorer - backend: http://localhost:9135 - endpoint: /api/v0/settings backend: http://localhost:9190 - endpoint: /settings.js diff --git a/deployments/examples/oc10_ocis_parallel/docker-compose.yml b/deployments/examples/oc10_ocis_parallel/docker-compose.yml index 79a8c880bf..58d16c3f29 100644 --- a/deployments/examples/oc10_ocis_parallel/docker-compose.yml +++ b/deployments/examples/oc10_ocis_parallel/docker-compose.yml @@ -111,7 +111,7 @@ services: OCIS_STORAGE_READ_ONLY: "false" # TODO: conflict with OWNCLOUDSQL -> https://github.com/owncloud/ocis/issues/2303 # General oCIS config # OCIS_RUN_SERVICES specifies to start all fullstack services except idm and idp. These are replaced by external services - OCIS_RUN_SERVICES: app-registry,app-provider,auth-basic,auth-machine,frontend,gateway,graph,graph-explorer,groups,nats,notifications,ocdav,ocs,proxy,search,settings,sharing,storage-system,storage-publiclink,storage-shares,storage-users,store,thumbnails,users,web,webdav + OCIS_RUN_SERVICES: app-registry,app-provider,auth-basic,auth-machine,frontend,gateway,graph,groups,nats,notifications,ocdav,ocs,proxy,search,settings,sharing,storage-system,storage-publiclink,storage-shares,storage-users,store,thumbnails,users,web,webdav OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-error} # make oCIS less verbose OCIS_LOG_COLOR: "${OCIS_LOG_COLOR:-false}" OCIS_URL: https://${CLOUD_DOMAIN:-cloud.owncloud.test} diff --git a/deployments/examples/ocis_hello/config/ocis/proxy.yaml b/deployments/examples/ocis_hello/config/ocis/proxy.yaml index e7db5e37a8..de59de6aab 100644 --- a/deployments/examples/ocis_hello/config/ocis/proxy.yaml +++ b/deployments/examples/ocis_hello/config/ocis/proxy.yaml @@ -51,8 +51,6 @@ policies: backend: http://localhost:9140 - endpoint: /graph/ backend: http://localhost:9120 - - endpoint: /graph-explorer - backend: http://localhost:9135 - endpoint: /api/v0/settings backend: http://localhost:9190 - endpoint: /settings.js diff --git a/deployments/examples/ocis_individual_services/config/proxy/proxy.yaml b/deployments/examples/ocis_individual_services/config/proxy/proxy.yaml index 9e2e22e7f6..aedb554dc6 100644 --- a/deployments/examples/ocis_individual_services/config/proxy/proxy.yaml +++ b/deployments/examples/ocis_individual_services/config/proxy/proxy.yaml @@ -47,8 +47,6 @@ policies: backend: http://frontend:9140 - endpoint: /graph/ backend: http://graph:9120 - - endpoint: /graph-explorer - backend: http://graph-explorer:9135 - endpoint: /api/v0/settings backend: http://settings:9190 - endpoint: /settings.js diff --git a/deployments/examples/ocis_individual_services/docker-compose.yml b/deployments/examples/ocis_individual_services/docker-compose.yml index 401dfa1709..8974bd9cc7 100644 --- a/deployments/examples/ocis_individual_services/docker-compose.yml +++ b/deployments/examples/ocis_individual_services/docker-compose.yml @@ -185,28 +185,6 @@ services: driver: "local" restart: always - graph-explorer: - image: owncloud/ocis:${OCIS_DOCKER_TAG:-latest} - deploy: - replicas: ${OCIS_SCALE:-1} - networks: - ocis-net: - entrypoint: - - ocis - - graph-explorer - - server - environment: - GRAPH_EXPLOER_LOG_LEVEL: "${OCIS_LOG_LEVEL:-error}" - GRAPH_EXPLOER_LOG_COLOR: "${OCIS_LOG_COLOR:-false}" - GRAPH_EXPLOER_LOG_PRETTY: "${OCIS_LOG_PRETTY:-false}" - - GRAPH_EXPLORER_HTTP_ADDR: 0.0.0.0:9135 - GRAPH_EXPLORER_ISSUER: https://${OCIS_DOMAIN} - GRAPH_EXPLORER_GRAPH_URL_BASE: https://${OCIS_DOMAIN} - logging: - driver: "local" - restart: always - audit: image: owncloud/ocis:${OCIS_DOCKER_TAG:-latest} deploy: diff --git a/deployments/examples/ocis_individual_services/monitoring_tracing/docker-compose-additions.yml b/deployments/examples/ocis_individual_services/monitoring_tracing/docker-compose-additions.yml index 56f7102b26..db6864b70b 100644 --- a/deployments/examples/ocis_individual_services/monitoring_tracing/docker-compose-additions.yml +++ b/deployments/examples/ocis_individual_services/monitoring_tracing/docker-compose-additions.yml @@ -83,14 +83,6 @@ services: OCIS_TRACING_ENDPOINT: jaeger-agent:6831 # metrics GRAPH_DEBUG_ADDR: 0.0.0.0:9124 - #graph-explorer: - # environment: - # # tracing - # OCIS_TRACING_ENABLED: "true" - # OCIS_TRACING_TYPE: jaeger - # OCIS_TRACING_ENDPOINT: jaeger-agent:6831 - # # metrics - # GRAPH_EXPLORER_DEBUG_ADDR: 0.0.0.0:9136 storage-system: environment: # tracing diff --git a/deployments/examples/ocis_ldap/docker-compose.yml b/deployments/examples/ocis_ldap/docker-compose.yml index ee7b166314..05fcb8a87c 100644 --- a/deployments/examples/ocis_ldap/docker-compose.yml +++ b/deployments/examples/ocis_ldap/docker-compose.yml @@ -74,7 +74,7 @@ services: IDP_LDAP_UUID_ATTRIBUTE_TYPE: binary GRAPH_LDAP_SERVER_WRITE_ENABLED: "false" # assuming the external ldap is readonly # OCIS_RUN_SERVICES specifies to start all services except glauth, idm and accounts. These are replaced by external services - OCIS_RUN_SERVICES: app-registry,app-provider,audit,auth-basic,auth-machine,frontend,gateway,graph,graph-explorer,groups,idp,nats,notifications,ocdav,ocs,proxy,search,settings,sharing,storage-system,storage-publiclink,storage-shares,storage-users,store,thumbnails,users,web,webdav + OCIS_RUN_SERVICES: app-registry,app-provider,audit,auth-basic,auth-machine,frontend,gateway,graph,groups,idp,nats,notifications,ocdav,ocs,proxy,search,settings,sharing,storage-system,storage-publiclink,storage-shares,storage-users,store,thumbnails,users,web,webdav # General oCIS config OCIS_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test} OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-error} # make oCIS less verbose diff --git a/docs/ocis/development/debugging.md b/docs/ocis/development/debugging.md index 15aaf5bb81..ed65bd2ff0 100644 --- a/docs/ocis/development/debugging.md +++ b/docs/ocis/development/debugging.md @@ -28,7 +28,6 @@ Run the debug binary with `OCIS_LOG_LEVEL=debug bin/ocis-debug server` and then 12837 pts/1 Sl+ 0:00 bin/ocis-debug server 12845 pts/1 Sl 0:00 bin/ocis-debug graph 12847 pts/1 Sl 0:00 bin/ocis-debug reva-auth-bearer -12848 pts/1 Sl 0:00 bin/ocis-debug graph-explorer 12849 pts/1 Sl 0:00 bin/ocis-debug ocs 12850 pts/1 Sl 0:00 bin/ocis-debug reva-storage-oc-data 12863 pts/1 Sl 0:00 bin/ocis-debug webdav @@ -78,7 +77,6 @@ LOG_LEVEL="debug" bin/ocis --log-level=$LOG_LEVEL micro & bin/ocis --log-level=$LOG_LEVEL glauth & -bin/ocis --log-level=$LOG_LEVEL graph-explorer & bin/ocis --log-level=$LOG_LEVEL graph & #bin/ocis --log-level=$LOG_LEVEL hello & bin/ocis --log-level=$LOG_LEVEL idp & @@ -107,7 +105,6 @@ bin/ocis --log-level=$LOG_LEVEL proxy & 12837 pts/1 Sl+ 0:00 bin/ocis-debug server 12845 pts/1 Sl 0:00 bin/ocis-debug graph 12847 pts/1 Sl 0:00 bin/ocis-debug reva-auth-bearer -12848 pts/1 Sl 0:00 bin/ocis-debug graph-explorer 12849 pts/1 Sl 0:00 bin/ocis-debug ocs 12850 pts/1 Sl 0:00 bin/ocis-debug reva-storage-oc-data 12863 pts/1 Sl 0:00 bin/ocis-debug webdav diff --git a/docs/services/graph-explorer/.gitignore b/docs/services/graph-explorer/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/services/graph-explorer/_index.md b/docs/services/graph-explorer/_index.md deleted file mode 100644 index f395da2dfd..0000000000 --- a/docs/services/graph-explorer/_index.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Graph-Explorer" -date: 2018-05-02T00:00:00+00:00 -weight: 20 -geekdocRepo: https://github.com/owncloud/ocis -geekdocEditPath: edit/master/docs/services/graph-explorer -geekdocFilePath: _index.md -geekdocCollapseSection: true ---- - -## Abstract - - -This service embeds [Graph-Explorer](https://github.com/owncloud/ocis/tree/master/graph-explorer) to provide a UI for ownCloud Infinite Scale. - -## Table of Contents - -{{< toc-tree >}} diff --git a/docs/services/graph-explorer/configuration.md b/docs/services/graph-explorer/configuration.md deleted file mode 100644 index 910c9ed678..0000000000 --- a/docs/services/graph-explorer/configuration.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Service Configuration -date: 2018-05-02T00:00:00+00:00 -weight: 20 -geekdocRepo: https://github.com/owncloud/ocis -geekdocEditPath: edit/master/docs/services/graph-explorer -geekdocFilePath: configuration.md -geekdocCollapseSection: true ---- - -## Example YAML Config - -{{< include file="services/_includes/graph-explorer-config-example.yaml" language="yaml" >}} - -{{< include file="services/_includes/graph-explorer_configvars.md" >}} \ No newline at end of file diff --git a/docs/services/port-ranges.md b/docs/services/port-ranges.md index ccfc53c304..2ffeaba0d6 100644 --- a/docs/services/port-ranges.md +++ b/docs/services/port-ranges.md @@ -31,7 +31,7 @@ We also suggest to use the last port in your extensions' range as a debug/metric | 9120-9124 | [graph]({{< ref "./graph/_index.md" >}}) | | 9125-9129 | FREE (formerly used by glauth) | | 9130-9134 | [idp]({{< ref "./idp/_index.md" >}}) | -| 9135-9139 | [graph-explorer]({{< ref "./graph-explorer/_index.md" >}}) | +| 9135-9139 | FREE (formerly used by graph-explorer) | | 9140-9141 | [frontend]({{< ref "./frontend/_index.md" >}}) | | 9142-9143 | [gateway]({{< ref "./gateway/_index.md" >}}) | | 9144-9145 | [users]({{< ref "./users/_index.md" >}}) | diff --git a/ocis-pkg/config/config.go b/ocis-pkg/config/config.go index dd772c2357..ee82ffef33 100644 --- a/ocis-pkg/config/config.go +++ b/ocis-pkg/config/config.go @@ -11,7 +11,6 @@ import ( authmachine "github.com/owncloud/ocis/v2/services/auth-machine/pkg/config" frontend "github.com/owncloud/ocis/v2/services/frontend/pkg/config" gateway "github.com/owncloud/ocis/v2/services/gateway/pkg/config" - graphExplorer "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config" graph "github.com/owncloud/ocis/v2/services/graph/pkg/config" groups "github.com/owncloud/ocis/v2/services/groups/pkg/config" idm "github.com/owncloud/ocis/v2/services/idm/pkg/config" @@ -83,7 +82,6 @@ type Config struct { Frontend *frontend.Config `yaml:"frontend"` Gateway *gateway.Config `yaml:"gateway"` Graph *graph.Config `yaml:"graph"` - GraphExplorer *graphExplorer.Config `yaml:"graph_explorer"` Groups *groups.Config `yaml:"groups"` IDM *idm.Config `yaml:"idm"` IDP *idp.Config `yaml:"idp"` diff --git a/ocis-pkg/config/defaultconfig.go b/ocis-pkg/config/defaultconfig.go index 90144d3b04..261db77b4c 100644 --- a/ocis-pkg/config/defaultconfig.go +++ b/ocis-pkg/config/defaultconfig.go @@ -9,7 +9,6 @@ import ( authmachine "github.com/owncloud/ocis/v2/services/auth-machine/pkg/config/defaults" frontend "github.com/owncloud/ocis/v2/services/frontend/pkg/config/defaults" gateway "github.com/owncloud/ocis/v2/services/gateway/pkg/config/defaults" - graphExplorer "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config/defaults" graph "github.com/owncloud/ocis/v2/services/graph/pkg/config/defaults" groups "github.com/owncloud/ocis/v2/services/groups/pkg/config/defaults" idm "github.com/owncloud/ocis/v2/services/idm/pkg/config/defaults" @@ -50,7 +49,6 @@ func DefaultConfig() *Config { Frontend: frontend.DefaultConfig(), Gateway: gateway.DefaultConfig(), Graph: graph.DefaultConfig(), - GraphExplorer: graphExplorer.DefaultConfig(), Groups: groups.DefaultConfig(), IDM: idm.DefaultConfig(), IDP: idp.DefaultConfig(), diff --git a/ocis/pkg/command/graph-explorer.go b/ocis/pkg/command/graph-explorer.go deleted file mode 100644 index 87e6fe71f6..0000000000 --- a/ocis/pkg/command/graph-explorer.go +++ /dev/null @@ -1,30 +0,0 @@ -package command - -import ( - "github.com/owncloud/ocis/v2/ocis-pkg/config" - "github.com/owncloud/ocis/v2/ocis-pkg/config/configlog" - "github.com/owncloud/ocis/v2/ocis-pkg/config/parser" - "github.com/owncloud/ocis/v2/ocis/pkg/command/helper" - "github.com/owncloud/ocis/v2/ocis/pkg/register" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/command" - "github.com/urfave/cli/v2" -) - -// GraphExplorerCommand is the entrypoint for the graph-explorer command. -func GraphExplorerCommand(cfg *config.Config) *cli.Command { - return &cli.Command{ - Name: cfg.GraphExplorer.Service.Name, - Usage: helper.SubcommandDescription(cfg.GraphExplorer.Service.Name), - Category: "services", - Before: func(c *cli.Context) error { - configlog.Error(parser.ParseConfig(cfg, true)) - cfg.GraphExplorer.Commons = cfg.Commons - return nil - }, - Subcommands: command.GetCommands(cfg.GraphExplorer), - } -} - -func init() { - register.AddCommand(GraphExplorerCommand) -} diff --git a/ocis/pkg/runtime/service/service.go b/ocis/pkg/runtime/service/service.go index 99623d8918..f809b2d348 100644 --- a/ocis/pkg/runtime/service/service.go +++ b/ocis/pkg/runtime/service/service.go @@ -26,7 +26,6 @@ import ( authmachine "github.com/owncloud/ocis/v2/services/auth-machine/pkg/command" frontend "github.com/owncloud/ocis/v2/services/frontend/pkg/command" gateway "github.com/owncloud/ocis/v2/services/gateway/pkg/command" - graphExplorer "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/command" graph "github.com/owncloud/ocis/v2/services/graph/pkg/command" groups "github.com/owncloud/ocis/v2/services/groups/pkg/command" idm "github.com/owncloud/ocis/v2/services/idm/pkg/command" @@ -106,7 +105,6 @@ func NewService(options ...Option) (*Service, error) { s.ServicesRegistry[opts.Config.Nats.Service.Name] = nats.NewSutureService s.ServicesRegistry[opts.Config.StorageSystem.Service.Name] = storageSystem.NewSutureService s.ServicesRegistry[opts.Config.Graph.Service.Name] = graph.NewSutureService - s.ServicesRegistry[opts.Config.GraphExplorer.Service.Name] = graphExplorer.NewSutureService s.ServicesRegistry[opts.Config.IDM.Service.Name] = idm.NewSutureService s.ServicesRegistry[opts.Config.OCS.Service.Name] = ocs.NewSutureService s.ServicesRegistry[opts.Config.Store.Service.Name] = store.NewSutureService diff --git a/services/graph-explorer/.dockerignore b/services/graph-explorer/.dockerignore deleted file mode 100644 index 4ec85b5e4f..0000000000 --- a/services/graph-explorer/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!bin/ diff --git a/services/graph-explorer/Makefile b/services/graph-explorer/Makefile deleted file mode 100644 index 2c37c8a016..0000000000 --- a/services/graph-explorer/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -SHELL := bash -NAME := graph-explorer - -include ../../.make/recursion.mk - -############ tooling ############ -ifneq (, $(shell command -v go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI -include ../../.bingo/Variables.mk -endif - -############ go tooling ############ -include ../../.make/go.mk - -############ release ############ -include ../../.make/release.mk - -############ docs generate ############ -include ../../.make/docs.mk - -.PHONY: docs-generate -docs-generate: config-docs-generate - -############ generate ############ -include ../../.make/generate.mk - -.PHONY: ci-go-generate -ci-go-generate: # CI runs ci-node-generate automatically before this target - -.PHONY: ci-node-generate -ci-node-generate: pull-assets - -.PHONY: pull-assets -pull-assets: - git clean -xfd assets - curl --fail -slL -o- https://github.com/owncloud/graph-explorer/releases/download/v1.7.10.3/release.tar.gz | tar xvzf - -C assets/ - -############ licenses ############ -.PHONY: ci-node-check-licenses -ci-node-check-licenses: - #TODO: check this fork! - -.PHONY: ci-node-save-licenses -ci-node-save-licenses: - #TODO: check this fork! But it doesn't even build diff --git a/services/graph-explorer/assets/.keep b/services/graph-explorer/assets/.keep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/services/graph-explorer/cmd/graph-explorer/main.go b/services/graph-explorer/cmd/graph-explorer/main.go deleted file mode 100644 index 092cd87412..0000000000 --- a/services/graph-explorer/cmd/graph-explorer/main.go +++ /dev/null @@ -1,14 +0,0 @@ -package main - -import ( - "os" - - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/command" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config/defaults" -) - -func main() { - if err := command.Execute(defaults.DefaultConfig()); err != nil { - os.Exit(1) - } -} diff --git a/services/graph-explorer/docker/Dockerfile.linux.amd64 b/services/graph-explorer/docker/Dockerfile.linux.amd64 deleted file mode 100644 index 768cc69703..0000000000 --- a/services/graph-explorer/docker/Dockerfile.linux.amd64 +++ /dev/null @@ -1,19 +0,0 @@ -FROM amd64/alpine:latest - -RUN apk update && \ - apk upgrade && \ - apk add ca-certificates mailcap && \ - rm -rf /var/cache/apk/* && \ - echo 'hosts: files dns' >| /etc/nsswitch.conf - -LABEL maintainer="ownCloud GmbH " \ - org.label-schema.name="oCIS Graph-Explorer" \ - org.label-schema.vendor="ownCloud GmbH" \ - org.label-schema.schema-version="1.0" - -EXPOSE 9100 9104 - -ENTRYPOINT ["/usr/bin/ocis-graph-explorer"] -CMD ["server"] - -COPY bin/ocis-graph-explorer /usr/bin/ocis-graph-explorer diff --git a/services/graph-explorer/docker/Dockerfile.linux.arm b/services/graph-explorer/docker/Dockerfile.linux.arm deleted file mode 100644 index e5a1c8be0c..0000000000 --- a/services/graph-explorer/docker/Dockerfile.linux.arm +++ /dev/null @@ -1,19 +0,0 @@ -FROM arm32v6/alpine:latest - -RUN apk update && \ - apk upgrade && \ - apk add ca-certificates mailcap && \ - rm -rf /var/cache/apk/* && \ - echo 'hosts: files dns' >| /etc/nsswitch.conf - -LABEL maintainer="ownCloud GmbH " \ - org.label-schema.name="oCIS Graph-Explorer" \ - org.label-schema.vendor="ownCloud GmbH" \ - org.label-schema.schema-version="1.0" - -EXPOSE 9100 9104 - -ENTRYPOINT ["/usr/bin/ocis-graph-explorer"] -CMD ["server"] - -COPY bin/ocis-graph-explorer /usr/bin/ocis-graph-explorer diff --git a/services/graph-explorer/docker/Dockerfile.linux.arm64 b/services/graph-explorer/docker/Dockerfile.linux.arm64 deleted file mode 100644 index 5a47338bab..0000000000 --- a/services/graph-explorer/docker/Dockerfile.linux.arm64 +++ /dev/null @@ -1,19 +0,0 @@ -FROM arm64v8/alpine:latest - -RUN apk update && \ - apk upgrade && \ - apk add ca-certificates mailcap && \ - rm -rf /var/cache/apk/* && \ - echo 'hosts: files dns' >| /etc/nsswitch.conf - -LABEL maintainer="ownCloud GmbH " \ - org.label-schema.name="oCIS Graph-Explorer" \ - org.label-schema.vendor="ownCloud GmbH" \ - org.label-schema.schema-version="1.0" - -EXPOSE 9100 9104 - -ENTRYPOINT ["/usr/bin/ocis-graph-explorer"] -CMD ["server"] - -COPY bin/ocis-graph-explorer /usr/bin/ocis-graph-explorer diff --git a/services/graph-explorer/docker/manifest.tmpl b/services/graph-explorer/docker/manifest.tmpl deleted file mode 100644 index 1394b3b68c..0000000000 --- a/services/graph-explorer/docker/manifest.tmpl +++ /dev/null @@ -1,22 +0,0 @@ -image: owncloud/ocis-graph-explorer:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} -{{#if build.tags}} -tags: -{{#each build.tags}} - - {{this}} -{{/each}} -{{/if}} -manifests: - - image: owncloud/ocis-graph-explorer:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 - platform: - architecture: amd64 - os: linux - - image: owncloud/ocis-graph-explorer:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 - platform: - architecture: arm64 - variant: v8 - os: linux - - image: owncloud/ocis-graph-explorer:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm - platform: - architecture: arm - variant: v6 - os: linux diff --git a/services/graph-explorer/graph_explorer.go b/services/graph-explorer/graph_explorer.go deleted file mode 100644 index 6de3e4ccd7..0000000000 --- a/services/graph-explorer/graph_explorer.go +++ /dev/null @@ -1,9 +0,0 @@ -package graphexplorer - -import ( - "embed" -) - -//go:generate make generate -//go:embed assets/* -var Assets embed.FS diff --git a/services/graph-explorer/pkg/assets/option.go b/services/graph-explorer/pkg/assets/option.go deleted file mode 100644 index b02703243a..0000000000 --- a/services/graph-explorer/pkg/assets/option.go +++ /dev/null @@ -1,50 +0,0 @@ -package assets - -import ( - "net/http" - - "github.com/owncloud/ocis/v2/ocis-pkg/assetsfs" - "github.com/owncloud/ocis/v2/ocis-pkg/log" - graphexplorer "github.com/owncloud/ocis/v2/services/graph-explorer" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config" -) - -// New returns a new http filesystem to serve assets. -func New(opts ...Option) http.FileSystem { - options := newOptions(opts...) - return assetsfs.New(graphexplorer.Assets, "", options.Logger) -} - -// Option defines a single option function. -type Option func(o *Options) - -// Options defines the available options for this package. -type Options struct { - Logger log.Logger - Config *config.Config -} - -// newOptions initializes the available default options. -func newOptions(opts ...Option) Options { - opt := Options{} - - for _, o := range opts { - o(&opt) - } - - return opt -} - -// Logger provides a function to set the logger option. -func Logger(val log.Logger) Option { - return func(o *Options) { - o.Logger = val - } -} - -// Config provides a function to set the config option. -func Config(val *config.Config) Option { - return func(o *Options) { - o.Config = val - } -} diff --git a/services/graph-explorer/pkg/command/health.go b/services/graph-explorer/pkg/command/health.go deleted file mode 100644 index 96a4302963..0000000000 --- a/services/graph-explorer/pkg/command/health.go +++ /dev/null @@ -1,54 +0,0 @@ -package command - -import ( - "fmt" - "net/http" - - "github.com/owncloud/ocis/v2/ocis-pkg/config/configlog" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config/parser" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/logging" - "github.com/urfave/cli/v2" -) - -// Health is the entrypoint for the health command. -func Health(cfg *config.Config) *cli.Command { - return &cli.Command{ - Name: "health", - Usage: "check health status", - Category: "info", - Before: func(c *cli.Context) error { - return configlog.ReturnError(parser.ParseConfig(cfg)) - }, - Action: func(c *cli.Context) error { - logger := logging.Configure(cfg.Service.Name, cfg.Log) - - resp, err := http.Get( - fmt.Sprintf( - "http://%s/healthz", - cfg.Debug.Addr, - ), - ) - - if err != nil { - logger.Fatal(). - Err(err). - Msg("Failed to request health check") - } - - defer resp.Body.Close() - - if resp.StatusCode != http.StatusOK { - logger.Fatal(). - Int("code", resp.StatusCode). - Msg("Health seems to be in bad state") - } - - logger.Debug(). - Int("code", resp.StatusCode). - Msg("Health got a good state") - - return nil - }, - } -} diff --git a/services/graph-explorer/pkg/command/root.go b/services/graph-explorer/pkg/command/root.go deleted file mode 100644 index 1649def983..0000000000 --- a/services/graph-explorer/pkg/command/root.go +++ /dev/null @@ -1,59 +0,0 @@ -package command - -import ( - "context" - "os" - - "github.com/owncloud/ocis/v2/ocis-pkg/clihelper" - ociscfg "github.com/owncloud/ocis/v2/ocis-pkg/config" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config" - "github.com/thejerf/suture/v4" - "github.com/urfave/cli/v2" -) - -// GetCommands provides all commands for this service -func GetCommands(cfg *config.Config) cli.Commands { - return []*cli.Command{ - // start this service - Server(cfg), - - // interaction with this service - - // infos about this service - Health(cfg), - Version(cfg), - } -} - -// Execute is the entry point for the graph-explorer command. -func Execute(cfg *config.Config) error { - app := clihelper.DefaultApp(&cli.App{ - Name: "graph-explorer", - Usage: "Serve Graph-Explorer for oCIS", - Commands: GetCommands(cfg), - }) - - return app.Run(os.Args) -} - -// SutureService allows for the graph-explorer command to be embedded and supervised by a suture supervisor tree. -type SutureService struct { - cfg *config.Config -} - -// NewSutureService creates a new graph-explorer.SutureService -func NewSutureService(cfg *ociscfg.Config) suture.Service { - cfg.GraphExplorer.Commons = cfg.Commons - return SutureService{ - cfg: cfg.GraphExplorer, - } -} - -func (s SutureService) Serve(ctx context.Context) error { - s.cfg.Context = ctx - if err := Execute(s.cfg); err != nil { - return err - } - - return nil -} diff --git a/services/graph-explorer/pkg/command/server.go b/services/graph-explorer/pkg/command/server.go deleted file mode 100644 index aa2e5be077..0000000000 --- a/services/graph-explorer/pkg/command/server.go +++ /dev/null @@ -1,104 +0,0 @@ -package command - -import ( - "context" - "fmt" - - "github.com/oklog/run" - "github.com/owncloud/ocis/v2/ocis-pkg/config/configlog" - "github.com/owncloud/ocis/v2/ocis-pkg/version" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config/parser" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/logging" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/metrics" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/server/debug" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/server/http" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/tracing" - "github.com/urfave/cli/v2" -) - -// Server is the entrypoint for the server command. -func Server(cfg *config.Config) *cli.Command { - return &cli.Command{ - Name: "server", - Usage: fmt.Sprintf("start the %s service without runtime (unsupervised mode)", cfg.Service.Name), - Category: "server", - Before: func(ctx *cli.Context) error { - return configlog.ReturnFatal(parser.ParseConfig(cfg)) - }, - Action: func(c *cli.Context) error { - logger := logging.Configure(cfg.Service.Name, cfg.Log) - err := tracing.Configure(cfg) - if err != nil { - return err - } - var ( - gr = run.Group{} - ctx, cancel = func() (context.Context, context.CancelFunc) { - if cfg.Context == nil { - return context.WithCancel(context.Background()) - } - return context.WithCancel(cfg.Context) - }() - mtrcs = metrics.New() - ) - - defer cancel() - - mtrcs.BuildInfo.WithLabelValues(version.GetString()).Set(1) - - { - server, err := http.Server( - http.Logger(logger), - http.Context(ctx), - http.Namespace(cfg.HTTP.Namespace), - http.Config(cfg), - http.Metrics(mtrcs), - ) - - if err != nil { - logger.Info().Err(err).Str("transport", "http").Msg("Failed to initialize server") - return err - } - - gr.Add(func() error { - err := server.Run() - if err != nil { - logger.Error(). - Err(err). - Str("transport", "http"). - Msg("Failed to start server") - } - return err - }, func(err error) { - logger.Error(). - Str("transport", "http"). - Err(err). - Msg("Shutting down server") - - cancel() - }) - } - - { - server, err := debug.Server( - debug.Logger(logger), - debug.Context(ctx), - debug.Config(cfg), - ) - - if err != nil { - logger.Info().Err(err).Str("transport", "debug").Msg("Failed to initialize server") - return err - } - - gr.Add(server.ListenAndServe, func(_ error) { - _ = server.Shutdown(ctx) - cancel() - }) - } - - return gr.Run() - }, - } -} diff --git a/services/graph-explorer/pkg/command/version.go b/services/graph-explorer/pkg/command/version.go deleted file mode 100644 index 3152b2b4b7..0000000000 --- a/services/graph-explorer/pkg/command/version.go +++ /dev/null @@ -1,50 +0,0 @@ -package command - -import ( - "fmt" - "os" - - "github.com/owncloud/ocis/v2/ocis-pkg/registry" - "github.com/owncloud/ocis/v2/ocis-pkg/version" - - tw "github.com/olekukonko/tablewriter" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config" - "github.com/urfave/cli/v2" -) - -// Version prints the service versions of all running instances. -func Version(cfg *config.Config) *cli.Command { - return &cli.Command{ - Name: "version", - Usage: "print the version of this binary and the running service instances", - Category: "info", - Action: func(c *cli.Context) error { - fmt.Println("Version: " + version.GetString()) - fmt.Printf("Compiled: %s\n", version.Compiled()) - fmt.Println("") - - reg := registry.GetRegistry() - services, err := reg.GetService(cfg.HTTP.Namespace + "." + cfg.Service.Name) - if err != nil { - fmt.Println(fmt.Errorf("could not get %s services from the registry: %v", cfg.Service.Name, err)) - return err - } - - if len(services) == 0 { - fmt.Println("No running " + cfg.Service.Name + " service found.") - return nil - } - - table := tw.NewWriter(os.Stdout) - table.SetHeader([]string{"Version", "Address", "Id"}) - table.SetAutoFormatHeaders(false) - for _, s := range services { - for _, n := range s.Nodes { - table.Append([]string{s.Version, n.Address, n.Id}) - } - } - table.Render() - return nil - }, - } -} diff --git a/services/graph-explorer/pkg/config/config.go b/services/graph-explorer/pkg/config/config.go deleted file mode 100644 index cccfe691b8..0000000000 --- a/services/graph-explorer/pkg/config/config.go +++ /dev/null @@ -1,32 +0,0 @@ -package config - -import ( - "context" - - "github.com/owncloud/ocis/v2/ocis-pkg/shared" -) - -// Config combines all available configuration parts. -type Config struct { - Commons *shared.Commons `yaml:"-"` // don't use this directly as configuration for a service - - Service Service `yaml:"-"` - - Tracing *Tracing `yaml:"tracing"` - Log *Log `yaml:"log"` - Debug Debug `yaml:"debug"` - - HTTP HTTP `yaml:"http"` - - GraphExplorer GraphExplorer `yaml:"graph_explorer"` - - Context context.Context `yaml:"-"` -} - -// GraphExplorer defines the available graph-explorer configuration. -type GraphExplorer struct { - ClientID string `yaml:"client_id" env:"GRAPH_EXPLORER_CLIENT_ID" desc:"OIDC client ID the graph explorer uses. This client needs to be set up in your IDP."` - Issuer string `yaml:"issuer" env:"OCIS_URL;OCIS_OIDC_ISSUER;GRAPH_EXPLORER_ISSUER" desc:"URL of the OIDC issuer. It defaults to URL of the builtin IDP."` - GraphURLBase string `yaml:"graph_url_base" env:"OCIS_URL;GRAPH_EXPLORER_GRAPH_URL_BASE" desc:"Base URL where the graph explorer is reachable for users."` - GraphURLPath string `yaml:"graph_url_path" env:"GRAPH_EXPLORER_GRAPH_URL_PATH" desc:"URL path where the graph explorer is reachable for users."` -} diff --git a/services/graph-explorer/pkg/config/debug.go b/services/graph-explorer/pkg/config/debug.go deleted file mode 100644 index ebdfe5b3eb..0000000000 --- a/services/graph-explorer/pkg/config/debug.go +++ /dev/null @@ -1,9 +0,0 @@ -package config - -// Debug defines the available debug configuration. -type Debug struct { - Addr string `yaml:"addr" env:"GRAPH_EXPLORER_DEBUG_ADDR" desc:"Bind address of the debug server, where metrics, health, config and debug endpoints will be exposed."` - Token string `yaml:"token" env:"GRAPH_EXPLORER_DEBUG_TOKEN" desc:"Token to secure the metrics endpoint."` - Pprof bool `yaml:"pprof" env:"GRAPH_EXPLORER_DEBUG_PPROF" desc:"Enables pprof, which can be used for profiling."` - Zpages bool `yaml:"zpages" env:"GRAPH_EXPLORER_DEBUG_ZPAGES" desc:"Enables zpages, which can be used for collecting and viewing in-memory traces."` -} diff --git a/services/graph-explorer/pkg/config/defaults/defaultconfig.go b/services/graph-explorer/pkg/config/defaults/defaultconfig.go deleted file mode 100644 index 62e8fef645..0000000000 --- a/services/graph-explorer/pkg/config/defaults/defaultconfig.go +++ /dev/null @@ -1,71 +0,0 @@ -package defaults - -import ( - "strings" - - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config" -) - -func FullDefaultConfig() *config.Config { - cfg := DefaultConfig() - EnsureDefaults(cfg) - Sanitize(cfg) - return cfg -} - -func DefaultConfig() *config.Config { - return &config.Config{ - Debug: config.Debug{ - Addr: "127.0.0.1:9136", - Token: "", - Pprof: false, - Zpages: false, - }, - HTTP: config.HTTP{ - Addr: "127.0.0.1:9135", - Root: "/graph-explorer", - Namespace: "com.owncloud.web", - }, - Service: config.Service{ - Name: "graph-explorer", - }, - GraphExplorer: config.GraphExplorer{ - ClientID: "ocis-explorer.js", - Issuer: "https://localhost:9200", - GraphURLBase: "https://localhost:9200", - GraphURLPath: "/graph", - }, - } -} - -func EnsureDefaults(cfg *config.Config) { - // provide with defaults for shared logging, since we need a valid destination address for "envdecode". - if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil { - cfg.Log = &config.Log{ - Level: cfg.Commons.Log.Level, - Pretty: cfg.Commons.Log.Pretty, - Color: cfg.Commons.Log.Color, - File: cfg.Commons.Log.File, - } - } else if cfg.Log == nil { - cfg.Log = &config.Log{} - } - // provide with defaults for shared tracing, since we need a valid destination address for "envdecode". - if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil { - cfg.Tracing = &config.Tracing{ - Enabled: cfg.Commons.Tracing.Enabled, - Type: cfg.Commons.Tracing.Type, - Endpoint: cfg.Commons.Tracing.Endpoint, - Collector: cfg.Commons.Tracing.Collector, - } - } else if cfg.Tracing == nil { - cfg.Tracing = &config.Tracing{} - } -} - -func Sanitize(cfg *config.Config) { - // sanitize config - if cfg.HTTP.Root == "/" { - cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/graph-explorer") - } -} diff --git a/services/graph-explorer/pkg/config/http.go b/services/graph-explorer/pkg/config/http.go deleted file mode 100644 index b09f2492dd..0000000000 --- a/services/graph-explorer/pkg/config/http.go +++ /dev/null @@ -1,16 +0,0 @@ -package config - -// HTTP defines the available http configuration. -type HTTP struct { - Addr string `yaml:"addr" env:"GRAPH_EXPLORER_HTTP_ADDR" desc:"The bind address of the HTTP service."` - Root string `yaml:"root" env:"GRAPH_EXPLORER_HTTP_ROOT" desc:"Subdirectory that serves as the root for this HTTP service."` - Namespace string `yaml:"-"` -} - -// CORS defines the available cors configuration. -type CORS struct { - AllowedOrigins []string `yaml:"allowed_origins"` - AllowedMethods []string `yaml:"allowed_methods"` - AllowedHeaders []string `yaml:"allowed_headers"` - AllowCredentials bool `yaml:"allowed_credentials"` -} diff --git a/services/graph-explorer/pkg/config/log.go b/services/graph-explorer/pkg/config/log.go deleted file mode 100644 index 4c19188291..0000000000 --- a/services/graph-explorer/pkg/config/log.go +++ /dev/null @@ -1,9 +0,0 @@ -package config - -// Log defines the available log configuration. -type Log struct { - Level string `mapstructure:"level" env:"OCIS_LOG_LEVEL;GRAPH_EXPLORER_LOG_LEVEL" desc:"The log level. Valid values are: \"panic\", \"fatal\", \"error\", \"warn\", \"info\", \"debug\", \"trace\"."` - Pretty bool `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;GRAPH_EXPLORER_LOG_PRETTY" desc:"Activates pretty log output."` - Color bool `mapstructure:"color" env:"OCIS_LOG_COLOR;GRAPH_EXPLORER_LOG_COLOR" desc:"Activates colorized log output."` - File string `mapstructure:"file" env:"OCIS_LOG_FILE;GRAPH_EXPLORER_LOG_FILE" desc:"The path to the log file. Activates logging to this file if set."` -} diff --git a/services/graph-explorer/pkg/config/parser/parse.go b/services/graph-explorer/pkg/config/parser/parse.go deleted file mode 100644 index a77ced49d5..0000000000 --- a/services/graph-explorer/pkg/config/parser/parse.go +++ /dev/null @@ -1,38 +0,0 @@ -package parser - -import ( - "errors" - - ociscfg "github.com/owncloud/ocis/v2/ocis-pkg/config" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config/defaults" - - "github.com/owncloud/ocis/v2/ocis-pkg/config/envdecode" -) - -// ParseConfig loads configuration from known paths. -func ParseConfig(cfg *config.Config) error { - _, err := ociscfg.BindSourcesToStructs(cfg.Service.Name, cfg) - if err != nil { - return err - } - - defaults.EnsureDefaults(cfg) - - // load all env variables relevant to the config in the current context. - if err := envdecode.Decode(cfg); err != nil { - // no environment variable set for this config is an expected "error" - if !errors.Is(err, envdecode.ErrNoTargetFieldsAreSet) { - return err - } - } - - // sanitize config - defaults.Sanitize(cfg) - - return Validate(cfg) -} - -func Validate(cfg *config.Config) error { - return nil -} diff --git a/services/graph-explorer/pkg/config/service.go b/services/graph-explorer/pkg/config/service.go deleted file mode 100644 index d1eac383f0..0000000000 --- a/services/graph-explorer/pkg/config/service.go +++ /dev/null @@ -1,6 +0,0 @@ -package config - -// Service defines the available service configuration. -type Service struct { - Name string `yaml:"-"` -} diff --git a/services/graph-explorer/pkg/config/tracing.go b/services/graph-explorer/pkg/config/tracing.go deleted file mode 100644 index afe80410dc..0000000000 --- a/services/graph-explorer/pkg/config/tracing.go +++ /dev/null @@ -1,9 +0,0 @@ -package config - -// Tracing defines the available tracing configuration. -type Tracing struct { - Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;GRAPH_EXPLORER_TRACING_ENABLED" desc:"Activates tracing."` - Type string `yaml:"type" env:"OCIS_TRACING_TYPE;GRAPH_EXPLORER_TRACING_TYPE" desc:"The type of tracing. Defaults to \"\", which is the same as \"jaeger\". Allowed tracing types are \"jaeger\" and \"\" as of now."` - Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;GRAPH_EXPLORER_TRACING_ENDPOINT" desc:"The endpoint of the tracing agent."` - Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;GRAPH_EXPLORER_TRACING_COLLECTOR" desc:"The HTTP endpoint for sending spans directly to a collector, i.e. http://jaeger-collector:14268/api/traces. Only used if the tracing endpoint is unset."` -} diff --git a/services/graph-explorer/pkg/logging/logging.go b/services/graph-explorer/pkg/logging/logging.go deleted file mode 100644 index 7fd5a58f45..0000000000 --- a/services/graph-explorer/pkg/logging/logging.go +++ /dev/null @@ -1,17 +0,0 @@ -package logging - -import ( - "github.com/owncloud/ocis/v2/ocis-pkg/log" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config" -) - -// LoggerFromConfig initializes a service-specific logger instance. -func Configure(name string, cfg *config.Log) log.Logger { - return log.NewLogger( - log.Name(name), - log.Level(cfg.Level), - log.Pretty(cfg.Pretty), - log.Color(cfg.Color), - log.File(cfg.File), - ) -} diff --git a/services/graph-explorer/pkg/metrics/metrics.go b/services/graph-explorer/pkg/metrics/metrics.go deleted file mode 100644 index be28d582ed..0000000000 --- a/services/graph-explorer/pkg/metrics/metrics.go +++ /dev/null @@ -1,33 +0,0 @@ -package metrics - -import "github.com/prometheus/client_golang/prometheus" - -var ( - // Namespace defines the namespace for the defines metrics. - Namespace = "ocis" - - // Subsystem defines the subsystem for the defines metrics. - Subsystem = "graph-explorer" -) - -// Metrics defines the available metrics of this service. -type Metrics struct { - // Counter *prometheus.CounterVec - BuildInfo *prometheus.GaugeVec -} - -// New initializes the available metrics. -func New() *Metrics { - m := &Metrics{ - BuildInfo: prometheus.NewGaugeVec(prometheus.GaugeOpts{ - Namespace: Namespace, - Subsystem: Subsystem, - Name: "build_info", - Help: "Build information", - }, []string{"version"}), - } - - _ = prometheus.Register(m.BuildInfo) - // TODO: implement metrics - return m -} diff --git a/services/graph-explorer/pkg/server/debug/option.go b/services/graph-explorer/pkg/server/debug/option.go deleted file mode 100644 index ac86e54fd5..0000000000 --- a/services/graph-explorer/pkg/server/debug/option.go +++ /dev/null @@ -1,50 +0,0 @@ -package debug - -import ( - "context" - - "github.com/owncloud/ocis/v2/ocis-pkg/log" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config" -) - -// Option defines a single option function. -type Option func(o *Options) - -// Options defines the available options for this package. -type Options struct { - Logger log.Logger - Context context.Context - Config *config.Config -} - -// newOptions initializes the available default options. -func newOptions(opts ...Option) Options { - opt := Options{} - - for _, o := range opts { - o(&opt) - } - - return opt -} - -// Logger provides a function to set the logger option. -func Logger(val log.Logger) Option { - return func(o *Options) { - o.Logger = val - } -} - -// Context provides a function to set the context option. -func Context(val context.Context) Option { - return func(o *Options) { - o.Context = val - } -} - -// Config provides a function to set the config option. -func Config(val *config.Config) Option { - return func(o *Options) { - o.Config = val - } -} diff --git a/services/graph-explorer/pkg/server/debug/server.go b/services/graph-explorer/pkg/server/debug/server.go deleted file mode 100644 index 424d621f39..0000000000 --- a/services/graph-explorer/pkg/server/debug/server.go +++ /dev/null @@ -1,59 +0,0 @@ -package debug - -import ( - "io" - "net/http" - - "github.com/owncloud/ocis/v2/ocis-pkg/service/debug" - "github.com/owncloud/ocis/v2/ocis-pkg/version" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config" -) - -// Server initializes the debug service and server. -func Server(opts ...Option) (*http.Server, error) { - options := newOptions(opts...) - - return debug.NewService( - debug.Logger(options.Logger), - debug.Name(options.Config.Service.Name), - debug.Version(version.GetString()), - debug.Address(options.Config.Debug.Addr), - debug.Token(options.Config.Debug.Token), - debug.Pprof(options.Config.Debug.Pprof), - debug.Zpages(options.Config.Debug.Zpages), - debug.Health(health(options.Config)), - debug.Ready(ready(options.Config)), - ), nil -} - -// health implements the health check. -func health(cfg *config.Config) func(http.ResponseWriter, *http.Request) { - return func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "text/plain") - w.WriteHeader(http.StatusOK) - - // TODO: check if services are up and running - - _, err := io.WriteString(w, http.StatusText(http.StatusOK)) - // io.WriteString should not fail but if it does we want to know. - if err != nil { - panic(err) - } - } -} - -// ready implements the ready check. -func ready(cfg *config.Config) func(http.ResponseWriter, *http.Request) { - return func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "text/plain") - w.WriteHeader(http.StatusOK) - - // TODO: check if services are up and running - - _, err := io.WriteString(w, http.StatusText(http.StatusOK)) - // io.WriteString should not fail but if it does we want to know. - if err != nil { - panic(err) - } - } -} diff --git a/services/graph-explorer/pkg/server/http/option.go b/services/graph-explorer/pkg/server/http/option.go deleted file mode 100644 index b174852820..0000000000 --- a/services/graph-explorer/pkg/server/http/option.go +++ /dev/null @@ -1,76 +0,0 @@ -package http - -import ( - "context" - - "github.com/owncloud/ocis/v2/ocis-pkg/log" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/metrics" - "github.com/urfave/cli/v2" -) - -// Option defines a single option function. -type Option func(o *Options) - -// Options defines the available options for this package. -type Options struct { - Logger log.Logger - Context context.Context - Config *config.Config - Metrics *metrics.Metrics - Flags []cli.Flag - Namespace string -} - -// newOptions initializes the available default options. -func newOptions(opts ...Option) Options { - opt := Options{} - - for _, o := range opts { - o(&opt) - } - - return opt -} - -// Logger provides a function to set the logger option. -func Logger(val log.Logger) Option { - return func(o *Options) { - o.Logger = val - } -} - -// Context provides a function to set the context option. -func Context(val context.Context) Option { - return func(o *Options) { - o.Context = val - } -} - -// Config provides a function to set the config option. -func Config(val *config.Config) Option { - return func(o *Options) { - o.Config = val - } -} - -// Metrics provides a function to set the metrics option. -func Metrics(val *metrics.Metrics) Option { - return func(o *Options) { - o.Metrics = val - } -} - -// Flags provides a function to set the flags option. -func Flags(val []cli.Flag) Option { - return func(o *Options) { - o.Flags = append(o.Flags, val...) - } -} - -// Namespace provides a function to set the Namespace option. -func Namespace(val string) Option { - return func(o *Options) { - o.Namespace = val - } -} diff --git a/services/graph-explorer/pkg/server/http/server.go b/services/graph-explorer/pkg/server/http/server.go deleted file mode 100644 index bb35c2cd13..0000000000 --- a/services/graph-explorer/pkg/server/http/server.go +++ /dev/null @@ -1,55 +0,0 @@ -package http - -import ( - chimiddleware "github.com/go-chi/chi/v5/middleware" - "github.com/owncloud/ocis/v2/ocis-pkg/middleware" - "github.com/owncloud/ocis/v2/ocis-pkg/service/http" - "github.com/owncloud/ocis/v2/ocis-pkg/version" - svc "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/service/v0" - "go-micro.dev/v4" -) - -// Server initializes the http service and server. -func Server(opts ...Option) (http.Service, error) { - options := newOptions(opts...) - - service := http.NewService( - http.Logger(options.Logger), - http.Namespace(options.Namespace), - http.Name("graph-explorer"), - http.Version(version.GetString()), - http.Address(options.Config.HTTP.Addr), - http.Context(options.Context), - http.Flags(options.Flags...), - ) - - handle := svc.NewService( - svc.Logger(options.Logger), - svc.Config(options.Config), - svc.Middleware( - chimiddleware.RealIP, - chimiddleware.RequestID, - middleware.NoCache, - middleware.Secure, - middleware.Version( - "graph-explorer", - version.GetString(), - ), - middleware.Logger( - options.Logger, - ), - ), - ) - - { - handle = svc.NewInstrument(handle, options.Metrics) - handle = svc.NewLogging(handle, options.Logger) - handle = svc.NewTracing(handle) - } - - if err := micro.RegisterHandler(service.Server(), handle); err != nil { - return http.Service{}, err - } - - return service, nil -} diff --git a/services/graph-explorer/pkg/service/v0/instrument.go b/services/graph-explorer/pkg/service/v0/instrument.go deleted file mode 100644 index 58dfd3d01f..0000000000 --- a/services/graph-explorer/pkg/service/v0/instrument.go +++ /dev/null @@ -1,30 +0,0 @@ -package svc - -import ( - "net/http" - - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/metrics" -) - -// NewInstrument returns a service that instruments metrics. -func NewInstrument(next Service, metrics *metrics.Metrics) Service { - return instrument{ - next: next, - metrics: metrics, - } -} - -type instrument struct { - next Service - metrics *metrics.Metrics -} - -// ServeHTTP implements the Service interface. -func (i instrument) ServeHTTP(w http.ResponseWriter, r *http.Request) { - i.next.ServeHTTP(w, r) -} - -// ConfigJs implements the Service interface. -func (i instrument) ConfigJs(w http.ResponseWriter, r *http.Request) { - i.next.ConfigJs(w, r) -} diff --git a/services/graph-explorer/pkg/service/v0/logging.go b/services/graph-explorer/pkg/service/v0/logging.go deleted file mode 100644 index 8ead4de6a9..0000000000 --- a/services/graph-explorer/pkg/service/v0/logging.go +++ /dev/null @@ -1,30 +0,0 @@ -package svc - -import ( - "net/http" - - "github.com/owncloud/ocis/v2/ocis-pkg/log" -) - -// NewLogging returns a service that logs messages. -func NewLogging(next Service, logger log.Logger) Service { - return logging{ - next: next, - logger: logger, - } -} - -type logging struct { - next Service - logger log.Logger -} - -// ServeHTTP implements the Service interface. -func (l logging) ServeHTTP(w http.ResponseWriter, r *http.Request) { - l.next.ServeHTTP(w, r) -} - -// ConfigJs implements the Service interface. -func (l logging) ConfigJs(w http.ResponseWriter, r *http.Request) { - l.next.ConfigJs(w, r) -} diff --git a/services/graph-explorer/pkg/service/v0/option.go b/services/graph-explorer/pkg/service/v0/option.go deleted file mode 100644 index f3a2f690f9..0000000000 --- a/services/graph-explorer/pkg/service/v0/option.go +++ /dev/null @@ -1,50 +0,0 @@ -package svc - -import ( - "net/http" - - "github.com/owncloud/ocis/v2/ocis-pkg/log" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config" -) - -// Option defines a single option function. -type Option func(o *Options) - -// Options defines the available options for this package. -type Options struct { - Logger log.Logger - Config *config.Config - Middleware []func(http.Handler) http.Handler -} - -// newOptions initializes the available default options. -func newOptions(opts ...Option) Options { - opt := Options{} - - for _, o := range opts { - o(&opt) - } - - return opt -} - -// Logger provides a function to set the logger option. -func Logger(val log.Logger) Option { - return func(o *Options) { - o.Logger = val - } -} - -// Config provides a function to set the config option. -func Config(val *config.Config) Option { - return func(o *Options) { - o.Config = val - } -} - -// Middleware provides a function to set the middleware option. -func Middleware(val ...func(http.Handler) http.Handler) Option { - return func(o *Options) { - o.Middleware = val - } -} diff --git a/services/graph-explorer/pkg/service/v0/service.go b/services/graph-explorer/pkg/service/v0/service.go deleted file mode 100644 index f95b5b806a..0000000000 --- a/services/graph-explorer/pkg/service/v0/service.go +++ /dev/null @@ -1,110 +0,0 @@ -package svc - -import ( - "fmt" - "io" - "net/http" - "strings" - - "github.com/go-chi/chi/v5" - "github.com/owncloud/ocis/v2/ocis-pkg/log" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/assets" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config" -) - -// Service defines the service handlers. -type Service interface { - ServeHTTP(http.ResponseWriter, *http.Request) - ConfigJs(http.ResponseWriter, *http.Request) -} - -// NewService returns a service implementation for Service. -func NewService(opts ...Option) Service { - options := newOptions(opts...) - - m := chi.NewMux() - m.Use(options.Middleware...) - - svc := GraphExplorer{ - logger: options.Logger, - config: options.Config, - mux: m, - } - - m.Route(options.Config.HTTP.Root, func(r chi.Router) { - r.Get("/config.js", svc.ConfigJs) - r.Mount("/", svc.Static()) - }) - - return svc -} - -// GraphExplorer defines implements the business logic for Service. -type GraphExplorer struct { - logger log.Logger - config *config.Config - mux *chi.Mux -} - -// ServeHTTP implements the Service interface. -func (p GraphExplorer) ServeHTTP(w http.ResponseWriter, r *http.Request) { - p.mux.ServeHTTP(w, r) -} - -// ConfigJs implements the Service interface. -func (p GraphExplorer) ConfigJs(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "application/javascript") - w.WriteHeader(http.StatusOK) - if _, err := io.WriteString(w, fmt.Sprintf("window.ClientId = \"%v\";", p.config.GraphExplorer.ClientID)); err != nil { - p.logger.Error().Err(err).Msg("Could not write to response writer") - } - if _, err := io.WriteString(w, fmt.Sprintf("window.Iss = \"%v\";", p.config.GraphExplorer.Issuer)); err != nil { - p.logger.Error().Err(err).Msg("Could not write to response writer") - } - if _, err := io.WriteString(w, fmt.Sprintf("window.GraphUrl = \"%v\";", p.config.GraphExplorer.GraphURLBase+p.config.GraphExplorer.GraphURLPath)); err != nil { - p.logger.Error().Err(err).Msg("Could not write to response writer") - } -} - -// Static simply serves all static files. -func (p GraphExplorer) Static() http.HandlerFunc { - rootWithSlash := p.config.HTTP.Root - - if !strings.HasSuffix(rootWithSlash, "/") { - rootWithSlash = rootWithSlash + "/" - } - - static := http.StripPrefix( - rootWithSlash, - http.FileServer( - assets.New( - assets.Logger(p.logger), - assets.Config(p.config), - ), - ), - ) - - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if rootWithSlash != "/" && r.URL.Path == p.config.HTTP.Root { - http.Redirect( - w, - r, - rootWithSlash, - http.StatusMovedPermanently, - ) - - return - } - - if r.URL.Path != rootWithSlash && strings.HasSuffix(r.URL.Path, "/") { - http.NotFound( - w, - r, - ) - - return - } - - static.ServeHTTP(w, r) - }) -} diff --git a/services/graph-explorer/pkg/service/v0/tracing.go b/services/graph-explorer/pkg/service/v0/tracing.go deleted file mode 100644 index 9da7293119..0000000000 --- a/services/graph-explorer/pkg/service/v0/tracing.go +++ /dev/null @@ -1,26 +0,0 @@ -package svc - -import ( - "net/http" -) - -// NewTracing returns a service that instruments traces. -func NewTracing(next Service) Service { - return tracing{ - next: next, - } -} - -type tracing struct { - next Service -} - -// ServeHTTP implements the Service interface. -func (t tracing) ServeHTTP(w http.ResponseWriter, r *http.Request) { - t.next.ServeHTTP(w, r) -} - -// ConfigJs implements the Service interface. -func (t tracing) ConfigJs(w http.ResponseWriter, r *http.Request) { - t.next.ConfigJs(w, r) -} diff --git a/services/graph-explorer/pkg/tracing/tracing.go b/services/graph-explorer/pkg/tracing/tracing.go deleted file mode 100644 index 2371083fbc..0000000000 --- a/services/graph-explorer/pkg/tracing/tracing.go +++ /dev/null @@ -1,23 +0,0 @@ -package tracing - -import ( - pkgtrace "github.com/owncloud/ocis/v2/ocis-pkg/tracing" - "github.com/owncloud/ocis/v2/services/graph-explorer/pkg/config" - "go.opentelemetry.io/otel/trace" -) - -var ( - // TraceProvider is the global trace provider for the proxy service. - TraceProvider = trace.NewNoopTracerProvider() -) - -func Configure(cfg *config.Config) error { - var err error - if cfg.Tracing.Enabled { - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, cfg.Service.Name, cfg.Tracing.Type); err != nil { - return err - } - } - - return nil -} diff --git a/services/graph-explorer/reflex.conf b/services/graph-explorer/reflex.conf deleted file mode 100644 index f4f3f7c80b..0000000000 --- a/services/graph-explorer/reflex.conf +++ /dev/null @@ -1,2 +0,0 @@ -# backend --r '^(cmd|pkg)/.*\.go$' -R '^node_modules/' -s -- sh -c 'make bin/ocis-graph-explorer-debug && bin/ocis-graph-explorer-debug --log-level debug server --debug-pprof --debug-zpages --asset-path assets/' diff --git a/services/idp/pkg/config/defaults/defaultconfig.go b/services/idp/pkg/config/defaults/defaultconfig.go index 47248d4dbc..5076544959 100644 --- a/services/idp/pkg/config/defaults/defaultconfig.go +++ b/services/idp/pkg/config/defaults/defaultconfig.go @@ -81,17 +81,6 @@ func DefaultConfig() *config.Config { "{{OCIS_URL}}", }, }, - { - ID: "ocis-explorer.js", - Name: "oCIS Graph Explorer", - Trusted: true, - RedirectURIs: []string{ - "{{OCIS_URL}}/graph-explorer/", - }, - Origins: []string{ - "{{OCIS_URL}}", - }, - }, { ID: "xdXOt13JKxym1B1QcEncf2XDkLAexMBFwiT9j6EfhhHFJhs2KM9jbjTmf8JBXE69", Secret: "UBntmLjC2yYCeHwsyj73Uwo9TAaecAetRwMw0xYcvNL9yRdLSUi0hUAHfvCHFeFh", diff --git a/services/proxy/pkg/config/defaults/defaultconfig.go b/services/proxy/pkg/config/defaults/defaultconfig.go index 436c365a4b..06b5878c17 100644 --- a/services/proxy/pkg/config/defaults/defaultconfig.go +++ b/services/proxy/pkg/config/defaults/defaultconfig.go @@ -190,11 +190,6 @@ func DefaultPolicies() []config.Policy { Endpoint: "/graph/", Backend: "http://localhost:9120", }, - { - Endpoint: "/graph-explorer", - Backend: "http://localhost:9135", - Unprotected: true, - }, { Endpoint: "/api/v0/settings", Backend: "http://localhost:9190", diff --git a/sonar-project.properties b/sonar-project.properties index 2dbf424ac6..7f4bad49c3 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -33,7 +33,7 @@ sonar.go.coverage.reportPaths=cache/coverage/* # golangci-lint does not support wildcard # https://github.com/SonarSource/slang/blob/85b05160bc1b31c6072a35f8818da4376b107afa/sonar-go-plugin/src/main/java/org/sonar/go/externalreport/GolangCILintReportSensor.java#L37 # https://github.com/SonarSource/slang/blob/85b05160bc1b31c6072a35f8818da4376b107afa/sonar-go-plugin/src/main/java/org/sonar/go/externalreport/AbstractReportSensor.java#L76-L90 -sonar.go.golangci-lint.reportPaths=cache/checkstyle/app-provider_checkstyle.xml,cache/checkstyle/app-registry_checkstyle.xml,cache/checkstyle/audit_checkstyle.xml,cache/checkstyle/auth-basic_checkstyle.xml,cache/checkstyle/auth-bearer_checkstyle.xml,cache/checkstyle/auth-machine_checkstyle.xml,cache/checkstyle/frontend_checkstyle.xml,cache/checkstyle/gateway_checkstyle.xml,cache/checkstyle/graph_checkstyle.xml,cache/checkstyle/graph-explorer_checkstyle.xml,cache/checkstyle/groups_checkstyle.xml,cache/checkstyle/idm_checkstyle.xml,cache/checkstyle/idp_checkstyle.xml,cache/checkstyle/nats_checkstyle.xml,cache/checkstyle/notifications_checkstyle.xml,cache/checkstyle/ocdav_checkstyle.xml,cache/checkstyle/ocs_checkstyle.xml,cache/checkstyle/proxy_checkstyle.xml,cache/checkstyle/search_checkstyle.xml,cache/checkstyle/settings_checkstyle.xml,cache/checkstyle/sharing_checkstyle.xml,cache/checkstyle/storage-publiclink_checkstyle.xml,cache/checkstyle/storage-shares_checkstyle.xml,cache/checkstyle/storage-system_checkstyle.xml,cache/checkstyle/storage-users_checkstyle.xml,cache/checkstyle/store_checkstyle.xml,cache/checkstyle/thumbnails_checkstyle.xml,cache/checkstyle/users_checkstyle.xml,cache/checkstyle/web_checkstyle.xml,cache/checkstyle/webdav_checkstyle.xml +sonar.go.golangci-lint.reportPaths=cache/checkstyle/app-provider_checkstyle.xml,cache/checkstyle/app-registry_checkstyle.xml,cache/checkstyle/audit_checkstyle.xml,cache/checkstyle/auth-basic_checkstyle.xml,cache/checkstyle/auth-bearer_checkstyle.xml,cache/checkstyle/auth-machine_checkstyle.xml,cache/checkstyle/frontend_checkstyle.xml,cache/checkstyle/gateway_checkstyle.xml,cache/checkstyle/graph_checkstyle.xml,cache/checkstyle/groups_checkstyle.xml,cache/checkstyle/idm_checkstyle.xml,cache/checkstyle/idp_checkstyle.xml,cache/checkstyle/nats_checkstyle.xml,cache/checkstyle/notifications_checkstyle.xml,cache/checkstyle/ocdav_checkstyle.xml,cache/checkstyle/ocs_checkstyle.xml,cache/checkstyle/proxy_checkstyle.xml,cache/checkstyle/search_checkstyle.xml,cache/checkstyle/settings_checkstyle.xml,cache/checkstyle/sharing_checkstyle.xml,cache/checkstyle/storage-publiclink_checkstyle.xml,cache/checkstyle/storage-shares_checkstyle.xml,cache/checkstyle/storage-system_checkstyle.xml,cache/checkstyle/storage-users_checkstyle.xml,cache/checkstyle/store_checkstyle.xml,cache/checkstyle/thumbnails_checkstyle.xml,cache/checkstyle/users_checkstyle.xml,cache/checkstyle/web_checkstyle.xml,cache/checkstyle/webdav_checkstyle.xml # Exclude files sonar.exclusions=**/third_party,docs/**,changelog/**,*/pkg/assets/embed.go,idp/assets/identifier/**,**/package.json,**/rollup.config.js,CHANGELOG.md,**/pkg/proto/**/*.pb.*,deployments/**,tests/**,vendor-bin/**,README.md,**/mocks/ diff --git a/tests/parallelDeployAcceptance/drone/ocis/proxy.yaml b/tests/parallelDeployAcceptance/drone/ocis/proxy.yaml index 7a3688598c..6b87edebed 100644 --- a/tests/parallelDeployAcceptance/drone/ocis/proxy.yaml +++ b/tests/parallelDeployAcceptance/drone/ocis/proxy.yaml @@ -51,8 +51,6 @@ policies: backend: http://localhost:9140 - endpoint: /graph/ backend: http://localhost:9120 - - endpoint: /graph-explorer - backend: http://localhost:9135 - endpoint: /api/v0/settings backend: http://localhost:9190 - endpoint: /settings.js