[docs-only] Improve dev docs

This commit is contained in:
mmattel
2024-08-22 19:19:55 +02:00
parent 233d108dbe
commit 54c304d3fc
15 changed files with 106 additions and 54 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
---
title: "Beta testplan"
date: 2022-03-24T00:00:00+00:00
weight: 37
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: beta-testplan.md
+1 -1
View File
@@ -1,7 +1,7 @@
---
title: "Documentation"
date: 2020-07-27T08:39:38+00:00
weight: 99
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: build-docs.md
+1 -1
View File
@@ -1,7 +1,7 @@
---
title: "Build"
date: 2020-02-27T20:35:00+01:00
weight: 30
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: build.md
@@ -1,7 +1,7 @@
---
title: "Continuous Integration"
date: 2020-10-01T20:35:00+01:00
weight: 100
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: continuous-integration.md
+1 -1
View File
@@ -1,7 +1,7 @@
---
title: "Debugging"
date: 2020-03-19T08:21:00+01:00
weight: 50
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: debugging.md
@@ -1,36 +0,0 @@
---
title: "Deprecating Variables"
date: 2022-11-29T15:41:00+01:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: deprecating-variables.md
---
{{< toc >}}
## Deprecating Environment Variables
Sometimes it is necessary to deprecate environment to align their naming with conventions. We therefore added annotations to automate the documentation process. It is necessary to know when the variable is going to be deprecated, when it is going to be removed and why.
### Example
```golang
// Notifications defines the config options for the notifications service.
type Notifications struct {
RevaGateway string `yaml:"reva_gateway" env:"OCIS_REVA_GATEWAY;REVA_GATEWAY" desc:"CS3 gateway used to look up user metadata" deprecationVersion:"3.0" removalVersion:"4.0.0" deprecationInfo:"REVA_GATEWAY changing name for consistency" deprecationReplacement:"OCIS_REVA_GATEWAY"`
...
}
```
There are four different annotation variables that need to be filled:
| Annotation |Description| Format|
|---|---|---|
| deprecationVersion | The version the variable will be deprecated | semver (e.g. 3.0)|
| removalVersion| The version the variable will be removed from the codebase. Note that according to semver, a removal **MUST NOT** be made in a minor or patch version change, but only in a major release | semver (e.g. 4.0.0) |
| deprecationInfo | Information why the variable is deprecated, must start with the name of the variable in order to avoid confusion, when there are multiple options in the `env:`-field | string (e.g. NATS_NATS_HOST is confusing) |
| deprecationReplacement | The name of the variable that is going to replace the deprecated one.| string (e.g. NATS_HOST_ADDRESS) |
### What happens next?
Once a variable has been finally removed, the annotations must be removed again from the code, since they do not serve any purpose from this point.
+13
View File
@@ -0,0 +1,13 @@
---
title: "Environment Variables"
date: 2024-08-22T15:41:00+01:00
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: envvars.md
---
Environment variables are an essential part configuring services.
If you are going to create new ones or deprecate existing ones, mandatory read the [Envvar Naming Scope]({{< ref "services/general-info/envvar-scopes.md" >}}) and the
[Deprecating Variables]({{< ref "services/general-info/deprecating-variables.md" >}}) documentation for more details first before doing so.
+1 -1
View File
@@ -1,7 +1,7 @@
---
title: "Profiling"
date: 2021-08-24T12:32:20+01:00
weight: 56
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: profiling.md
+1 -1
View File
@@ -1,7 +1,7 @@
---
title: "Acceptance Testing"
date: 2018-05-02T00:00:00+00:00
weight: 38
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: testing.md
+1 -1
View File
@@ -1,7 +1,7 @@
---
title: "Unit Testing"
date: 2024-04-25T00:00:00+00:00
weight: 5
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development/unit-testing
geekdocFilePath: _index.md
@@ -1,7 +1,7 @@
---
title: "Standard Library Testing"
date: 2024-04-25T00:00:00+00:00
weight: 15
weight: 10
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development/unit-testing
geekdocFilePath: testing-pkg.md