Skip to content

Commit

Permalink
feat: update schema with latest settings (#778)
Browse files Browse the repository at this point in the history
* asd

* asd

* asd

* asd
  • Loading branch information
dbarrosop authored Sep 25, 2023
1 parent 5b8cba1 commit ef1e067
Show file tree
Hide file tree
Showing 238 changed files with 23,829 additions and 2,749 deletions.
20 changes: 20 additions & 0 deletions cmd/config/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func commandExample(cCtx *cli.Context) error { //nolint:funlen,maintidx
EnabledAPIs: []string{
"metadata",
},
LiveQueriesMultiplexedRefetchInterval: ptr(uint32(1000)),
},
Logs: &model.ConfigHasuraLogs{
Level: ptr("warn"),
Expand Down Expand Up @@ -264,6 +265,25 @@ func commandExample(cCtx *cli.Context) error { //nolint:funlen,maintidx
},
Replicas: 1,
},
Settings: &model.ConfigPostgresSettings{
MaxConnections: ptr(int32(100)),
SharedBuffers: ptr("128MB"),
EffectiveCacheSize: ptr("4GB"),
MaintenanceWorkMem: ptr("64MB"),
CheckpointCompletionTarget: ptr(float64(0.9)),
WalBuffers: ptr(int32(-1)),
DefaultStatisticsTarget: ptr(int32(100)),
RandomPageCost: ptr(float64(4)),
EffectiveIOConcurrency: ptr(int32(1)),
WorkMem: ptr("4MB"),
HugePages: ptr("try"),
MinWalSize: ptr("80MB"),
MaxWalSize: ptr("1GB"),
MaxWorkerProcesses: ptr(int32(8)),
MaxParallelWorkersPerGather: ptr(int32(2)),
MaxParallelWorkers: ptr(int32(8)),
MaxParallelMaintenanceWorkers: ptr(int32(2)),
},
},
Provider: &model.ConfigProvider{
Smtp: &model.ConfigSmtp{
Expand Down
1 change: 1 addition & 0 deletions cmd/config/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func expectedConfig() *model.ConfigConfig {
"pgdump",
"config",
},
LiveQueriesMultiplexedRefetchInterval: ptr(uint32(1000)),
},
Logs: &model.ConfigHasuraLogs{Level: ptr("warn")},
Events: &model.ConfigHasuraEvents{HttpPoolSize: ptr(uint32(100))},
Expand Down
2 changes: 2 additions & 0 deletions dockercompose/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ func getConfig() *model.ConfigConfig { //nolint:maintidx
"config",
"pgdump",
},
LiveQueriesMultiplexedRefetchInterval: ptr(uint32(1000)),
},
Logs: &model.ConfigHasuraLogs{
Level: ptr("info"),
Expand All @@ -252,6 +253,7 @@ func getConfig() *model.ConfigConfig { //nolint:maintidx
},
Replicas: 1,
},
Settings: nil,
},
Provider: &model.ConfigProvider{
Sms: &model.ConfigSms{
Expand Down
1 change: 1 addition & 0 deletions dockercompose/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func postgres( //nolint:funlen
}

envars, err := appconfig.PostgresEnv(
cfg,
"local",
"postgres",
"postgres",
Expand Down
24 changes: 22 additions & 2 deletions examples/myproject/nhost/nhost.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ key = '{{ secrets.HASURA_GRAPHQL_JWT_SECRET }}'
[hasura.settings]
enableRemoteSchemaPermissions = false
corsDomain = ['https://zero.app.io', 'https://one.app.io', 'https://two.app.io']
liveQueriesMultiplexedRefetchInterval = 3000

[functions]
[functions.node]
Expand Down Expand Up @@ -130,12 +131,31 @@ timeout = 60000
enabled = false

[postgres]
version = '14.6-20230705-1'
version = '14.6-20230925-1'

[postgres.settings]
maxConnections = 100
sharedBuffers = '256MB'
effectiveCacheSize = '768MB'
maintenanceWorkMem = '64MB'
checkpointCompletionTarget = 0.9
walBuffers = -1
defaultStatisticsTarget = 100
randomPageCost = 1.1
effectiveIOConcurrency = 200
workMem = '1310kB'
hugePages = 'off'
minWalSize = '80MB'
maxWalSize = '1GB'
maxWorkerProcesses = 8
maxParallelWorkersPerGather = 2
maxParallelWorkers = 8
maxParallelMaintenanceWorkers = 2

[provider]

[storage]
version = '0.3.4'
version = '0.4.0'

[observability]
[observability.grafana]
Expand Down
40 changes: 22 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ require (
github.com/go-git/go-git/v5 v5.6.1
github.com/google/go-cmp v0.5.9
github.com/hashicorp/go-getter v1.7.1
github.com/nhost/be v0.0.0-20230823093651-f2ae863636b7
github.com/nhost/be v0.0.0-20230925113431-31dac0d8547b
github.com/pelletier/go-toml/v2 v2.0.8
github.com/urfave/cli/v2 v2.25.5
github.com/wI2L/jsondiff v0.4.0
golang.org/x/mod v0.10.0
golang.org/x/term v0.10.0
golang.org/x/mod v0.12.0
golang.org/x/term v0.11.0
gopkg.in/evanphx/json-patch.v5 v5.6.0
gopkg.in/yaml.v3 v3.0.1
)

require (
cloud.google.com/go v0.110.0 // indirect
cloud.google.com/go/compute v1.19.0 // indirect
cloud.google.com/go v0.110.6 // indirect
cloud.google.com/go/compute v1.23.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v0.13.0 // indirect
cloud.google.com/go/iam v1.1.1 // indirect
cloud.google.com/go/storage v1.30.1 // indirect
cuelang.org/go v0.5.0 // indirect
github.com/99designs/gqlgen v0.17.32 // indirect
Expand All @@ -41,9 +41,10 @@ require (
github.com/go-git/go-billy/v5 v5.4.1 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/google/s2a-go v0.1.4 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.8.0 // indirect
github.com/googleapis/gax-go/v2 v2.11.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
Expand Down Expand Up @@ -74,18 +75,21 @@ require (
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.11.0 // indirect
golang.org/x/net v0.13.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
golang.org/x/tools v0.9.3 // indirect
golang.org/x/crypto v0.12.0 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/oauth2 v0.11.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/text v0.12.0 // indirect
golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.114.0 // indirect
google.golang.org/api v0.126.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/grpc v1.55.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577 // indirect
google.golang.org/grpc v1.57.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
)

Expand Down
Loading

0 comments on commit ef1e067

Please sign in to comment.