Skip to content

Commit

Permalink
Merge branch 'master' into StoreSettingsViaMetadata
Browse files Browse the repository at this point in the history
  • Loading branch information
kobergj committed Mar 14, 2022
2 parents 1a9d446 + 6cd3827 commit e8c251b
Show file tree
Hide file tree
Showing 216 changed files with 5,059 additions and 1,686 deletions.
12 changes: 9 additions & 3 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ config = {
"modules": [
# if you add a module here please also add it to the root level Makefile
"accounts",
"audit",
"glauth",
"graph-explorer",
"graph",
Expand Down Expand Up @@ -956,11 +957,16 @@ def binaryReleases(ctx):
return pipelines

def binaryRelease(ctx, name):
# uploads binary to https://download.owncloud.com/ocis/ocis/testing/
target = "/ocis/%s/testing" % (ctx.repo.name.replace("ocis-", ""))
# uploads binary to https://download.owncloud.com/ocis/ocis/daily/
target = "/ocis/%s/daily" % (ctx.repo.name.replace("ocis-", ""))
if ctx.build.event == "tag":
# uploads binary to eg. https://download.owncloud.com/ocis/ocis/1.0.0-beta9/
target = "/ocis/%s/%s" % (ctx.repo.name.replace("ocis-", ""), ctx.build.ref.replace("refs/tags/v", ""))
folder = "stable"
buildref = ctx.build.ref.replace("refs/tags/v", "")
buildref = buildref.lower()
if buildref.find("-") != -1: # "x.x.x-alpha", "x.x.x-beta", "x.x.x-rc"
folder = "testing"
target = "/ocis/%s/%s/%s" % (ctx.repo.name.replace("ocis-", ""), folder, buildref)

settings = {
"endpoint": {
Expand Down
4 changes: 2 additions & 2 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repository:
private: false
has_issues: true
has_projects: false
has_wiki: true
has_wiki: false
has_downloads: false

default_branch: master
Expand All @@ -35,7 +35,7 @@ labels:
color: "#3F7A62"
- name: Storage:ownCloudSQL
color: "#3F7A62"

teams:
- name: ci
permission: admin
Expand Down
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,58 @@ The following sections list the changes for unreleased.

## Summary

* Bugfix - Network configuration in individiual_services example: [#3238](https://github.com/owncloud/ocis/pull/3238)
* Bugfix - Improve gif thumbnails: [#3305](https://github.com/owncloud/ocis/pull/3305)
* Enhancement - Log sharing events in audit service: [#3301](https://github.com/owncloud/ocis/pull/3301)
* Enhancement - Include etags in drives listing: [#3267](https://github.com/owncloud/ocis/pull/3267)
* Enhancement - Improve thumbnails API: [#3272](https://github.com/owncloud/ocis/pull/3272)
* Enhancement - Update ownCloud Web to v5.3.0-rc.1: [#6561](https://github.com/owncloud/web/pull/6561)

## Details

* Bugfix - Network configuration in individiual_services example: [#3238](https://github.com/owncloud/ocis/pull/3238)

Tidy up the deployments/examples/ocis_individual_services example so that the
instructions work.

https://github.com/owncloud/ocis/pull/3238

* Bugfix - Improve gif thumbnails: [#3305](https://github.com/owncloud/ocis/pull/3305)

Improved the gif thumbnail generation for gifs with different disposal strategies.

https://github.com/owncloud/ocis/pull/3305

* Enhancement - Log sharing events in audit service: [#3301](https://github.com/owncloud/ocis/pull/3301)

Contains sharing related events. See full list in audit/pkg/types/events.go

https://github.com/owncloud/ocis/pull/3301

* Enhancement - Include etags in drives listing: [#3267](https://github.com/owncloud/ocis/pull/3267)

Added etags in the response of list drives.

https://github.com/owncloud/ocis/pull/3267

* Enhancement - Improve thumbnails API: [#3272](https://github.com/owncloud/ocis/pull/3272)

Changed the thumbnails API to no longer transfer images via GRPC. GRPC has a limited message
size and isn't very efficient with large binary data. The new API transports the images over
HTTP.

https://github.com/owncloud/ocis/pull/3272

* Enhancement - Update ownCloud Web to v5.3.0-rc.1: [#6561](https://github.com/owncloud/web/pull/6561)

Tags: web

We updated ownCloud Web to v5.3.0-rc.1. Please refer to the changelog (linked) for details on
the web release.

https://github.com/owncloud/web/pull/6561
https://github.com/owncloud/ocis/pull/3291
https://github.com/owncloud/web/releases/tag/v5.3.0-rc.1
# Changelog for [1.18.0] (2022-03-03)

The following sections list the changes for 1.18.0.
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ L10N_MODULES := $(shell find . -path '*.tx*' -name 'config' | sed 's|/[^/]*$$||'
# if you add a module here please also add it to the .drone.star file
OCIS_MODULES = \
accounts \
audit \
glauth \
graph \
graph-explorer \
Expand Down
4 changes: 2 additions & 2 deletions accounts/cmd/accounts/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"os"

"github.com/owncloud/ocis/accounts/pkg/command"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/config/defaults"
)

func main() {
if err := command.Execute(config.DefaultConfig()); err != nil {
if err := command.Execute(defaults.DefaultConfig()); err != nil {
os.Exit(1)
}
}
27 changes: 27 additions & 0 deletions accounts/cmd/helper/defaultconfig/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package main

import (
"fmt"

accountsdefaults "github.com/owncloud/ocis/accounts/pkg/config/defaults"
idpdefaults "github.com/owncloud/ocis/idp/pkg/config/defaults"
"gopkg.in/yaml.v2"
)

func main() {

fn1 := accountsdefaults.FullDefaultConfig
fn2 := idpdefaults.FullDefaultConfig

b, err := yaml.Marshal(fn1())
if err != nil {
return
}
fmt.Println(string(b))

b, err = yaml.Marshal(fn2())
if err != nil {
return
}
fmt.Println(string(b))
}
6 changes: 3 additions & 3 deletions accounts/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (

// Config combines all available configuration parts.
type Config struct {
*shared.Commons
*shared.Commons `ocisConfig:"-" yaml:"-"`

Service Service
Service Service `ocisConfig:"-" yaml:"-"`

Tracing *Tracing `ocisConfig:"tracing"`
Log *Log `ocisConfig:"log"`
Expand All @@ -28,7 +28,7 @@ type Config struct {
HashDifficulty int `ocisConfig:"hash_difficulty" env:"ACCOUNTS_HASH_DIFFICULTY" desc:"The hash difficulty makes sure that validating a password takes at least a certain amount of time."`
DemoUsersAndGroups bool `ocisConfig:"demo_users_and_groups" env:"ACCOUNTS_DEMO_USERS_AND_GROUPS" desc:"If this flag is set the service will setup the demo users and groups."`

Context context.Context
Context context.Context `ocisConfig:"-" yaml:"-"`
}

// Asset defines the available asset configuration.
Expand Down
68 changes: 0 additions & 68 deletions accounts/pkg/config/defaultconfig.go

This file was deleted.

112 changes: 112 additions & 0 deletions accounts/pkg/config/defaults/defaultconfig.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
package defaults

import (
"path"
"strings"

"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/config/defaults"
)

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:9182",
Token: "",
Pprof: false,
Zpages: false,
},
HTTP: config.HTTP{
Addr: "127.0.0.1:9181",
Namespace: "com.owncloud.web",
Root: "/",
CacheTTL: 604800, // 7 days
CORS: config.CORS{
AllowedOrigins: []string{"*"},
AllowedMethods: []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
AllowedHeaders: []string{"Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With"},
AllowCredentials: true,
},
},
GRPC: config.GRPC{
Addr: "127.0.0.1:9180",
Namespace: "com.owncloud.api",
},
Service: config.Service{
Name: "accounts",
},
Asset: config.Asset{},
TokenManager: config.TokenManager{
JWTSecret: "Pive-Fumkiu4",
},
HashDifficulty: 11,
DemoUsersAndGroups: true,
Repo: config.Repo{
Backend: "CS3",
Disk: config.Disk{
Path: path.Join(defaults.BaseDataPath(), "accounts"),
},
CS3: config.CS3{
ProviderAddr: "localhost:9215",
},
},
Index: config.Index{
UID: config.UIDBound{
Lower: 0,
Upper: 1000,
},
GID: config.GIDBound{
Lower: 0,
Upper: 1000,
},
},
ServiceUser: config.ServiceUser{
UUID: "95cb8724-03b2-11eb-a0a6-c33ef8ef53ad",
Username: "",
UID: 0,
GID: 0,
},
}
}

func EnsureDefaults(cfg *config.Config) {
// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
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 BindEnv.
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, "/")
}
cfg.Repo.Backend = strings.ToLower(cfg.Repo.Backend)
}
2 changes: 1 addition & 1 deletion accounts/pkg/config/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package config
// GRPC defines the available grpc configuration.
type GRPC struct {
Addr string `ocisConfig:"addr" env:"ACCOUNTS_GRPC_ADDR" desc:"The address of the grpc service."`
Namespace string
Namespace string `ocisConfig:"-" yaml:"-"`
}
4 changes: 2 additions & 2 deletions accounts/pkg/config/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package config
// HTTP defines the available http configuration.
type HTTP struct {
Addr string `ocisConfig:"addr" env:"ACCOUNTS_HTTP_ADDR" desc:"The address of the http service."`
Namespace string
Namespace string `ocisConfig:"-" yaml:"-"`
Root string `ocisConfig:"root" env:"ACCOUNTS_HTTP_ROOT" desc:"The root path of the http service."`
CacheTTL int `ocisConfig:"cache_ttl" env:"ACCOUNTS_CACHE_TTL" desc:"The cache time for the static assets."`
CORS CORS
CORS CORS `ocisConfig:"cors"`
}

// CORS defines the available cors configuration.
Expand Down
Loading

0 comments on commit e8c251b

Please sign in to comment.