Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

remove unused configuration #2993

Merged
merged 2 commits into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions changelog/unreleased/fix-remove-unused-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Bugfix: Remove unused configuration

We've fixed removed unused configuration:

- `insecure` from the dataprovider
- `tmp_folder` from the storageprovider

https://github.com/cs3org/reva/pull/2993
11 changes: 0 additions & 11 deletions internal/grpc/services/storageprovider/storageprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ func init() {
type config struct {
Driver string `mapstructure:"driver" docs:"localhome;The storage driver to be used."`
Drivers map[string]map[string]interface{} `mapstructure:"drivers" docs:"url:pkg/storage/fs/localhome/localhome.go"`
TmpFolder string `mapstructure:"tmp_folder" docs:"/var/tmp;Path to temporary folder."`
DataServerURL string `mapstructure:"data_server_url" docs:"http://localhost/data;The URL for the data server."`
ExposeDataServer bool `mapstructure:"expose_data_server" docs:"false;Whether to expose data server."` // if true the client will be able to upload/download directly to it
AvailableXS map[string]uint32 `mapstructure:"available_checksums" docs:"nil;List of available checksums."`
Expand All @@ -73,10 +72,6 @@ func (c *config) init() {
c.Driver = "localhome"
}

if c.TmpFolder == "" {
c.TmpFolder = "/var/tmp/reva/tmp"
}

if c.DataServerURL == "" {
host, err := os.Hostname()
if err != nil || host == "" {
Expand All @@ -95,7 +90,6 @@ func (c *config) init() {
type service struct {
conf *config
storage storage.FS
tmpFolder string
dataServerURL *url.URL
availableXS []*provider.ResourceChecksumPriority
}
Expand Down Expand Up @@ -164,10 +158,6 @@ func New(m map[string]interface{}, ss *grpc.Server) (rgrpc.Service, error) {

c.init()

if err := os.MkdirAll(c.TmpFolder, 0755); err != nil {
return nil, err
}

fs, err := getFS(c)
if err != nil {
return nil, err
Expand Down Expand Up @@ -198,7 +188,6 @@ func New(m map[string]interface{}, ss *grpc.Server) (rgrpc.Service, error) {
service := &service{
conf: c,
storage: fs,
tmpFolder: c.TmpFolder,
dataServerURL: u,
availableXS: xsTypes,
}
Expand Down
1 change: 0 additions & 1 deletion internal/http/services/dataprovider/dataprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ type config struct {
Drivers map[string]map[string]interface{} `mapstructure:"drivers" docs:"url:pkg/storage/fs/localhome/localhome.go;The configuration for the storage driver"`
DataTXs map[string]map[string]interface{} `mapstructure:"data_txs" docs:"url:pkg/rhttp/datatx/manager/simple/simple.go;The configuration for the data tx protocols"`
Timeout int64 `mapstructure:"timeout"`
wkloucek marked this conversation as resolved.
Show resolved Hide resolved
Insecure bool `mapstructure:"insecure"`
NatsAddress string `mapstructure:"nats_address"`
NatsClusterID string `mapstructure:"nats_clusterID"`
}
Expand Down