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

Activitylog Service #9327

Merged
merged 6 commits into from
Jun 10, 2024
Merged

Activitylog Service #9327

merged 6 commits into from
Jun 10, 2024

Conversation

kobergj
Copy link
Collaborator

@kobergj kobergj commented Jun 5, 2024

Adds the activitylog service. As of now it only stores activities. Retrieving them comes with #9196

For more info see also the ADR: https://owncloud.dev/ocis/adr/0028-activities-service/

Fixes #9195

@kobergj kobergj marked this pull request as draft June 5, 2024 14:25
@kobergj
Copy link
Collaborator Author

kobergj commented Jun 5, 2024

  • Provide a README.md for that service in the root folder of that service.
    • Use CamelCase for section headers.
  • For images and example files used in README.md:
    • Create a folder named md-sources on the same level where README.md is located. Put all the images and example files referenced by README.md into this folder.
    • Use absolute references like https://raw.githubusercontent.com/owncloud/ocis/master/services/<service-name>/md-sources/file to make the content accessible for both README.md and owncloud.dev
      bad <img src="https://github.com/owncloud/ocis/blob/master/services/graph/images/mermaid-graph.svg" width="500" />
      good <img src="https://raw.githubusercontent.com/owncloud/ocis/master/services/graph/images/mermaid-graph.svg" width="500" />
  • If new CLI command are introduced, that command must be described in the README.md.
  • If new global envvars are introduced, the name must start with OCIS_.
  • Add the service to the makefile in the ocis repo root.
  • Make the service startable for binary and individual startup:
    • For single binary add service to ocis/pkg/runtime
    • For individual startup add service to ocis/pkg/commands
    • Add the service config to ocis-pkg/config/defaultconfig.go
  • If the service is using service accounts, add it to ocis/pkg/init/init.go
  • Add the service to .drone.star to enable CI.
  • Inform doc team in an early stage to review the readme AND the environment variables created.
    • The description must reflect the behaviour AND usually has a positive code quality impact.
  • Create proper description strings for envvars - see other services for examples, especially when it comes to multiple values. This must include:
    • base description, set of available values, description of each value.
  • When suggestable commits are created for text changes and you agree, collect them to a batch and commit them. Do not forget to rebase locally to avoid overwriting the changes made.
  • If new envvars are introduced which serve the same purpose but in multiple services, an additional envvar must be added at the beginning of the list starting with OCIS_ (global envvar).
  • Ensure that a service has a debug port
  • If the new service introduces a new port:
  • Make sure to have a function FullDefaultConfig() in pkg/config/defaults/defaultconfig.go of your service. It is needed to create the documentation.
  • Add metrics to the code to enable monitoring. See the proxy service for implementation details.
    • Plus add a monitoring documentation in the README.md file

@mmattel
Copy link
Contributor

mmattel commented Jun 6, 2024

Hooking myself in as this is also admin docs relevant.

@kobergj kobergj marked this pull request as ready for review June 7, 2024 13:17
Copy link
Contributor

@2403905 2403905 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for me.

Copy link
Member

@dragonchaser dragonchaser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit-picking on the wording.
and doesn't it need a change to the init command for the service account?

services/activitylog/README.md Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Jun 10, 2024

@kobergj kobergj merged commit 6ace1fc into owncloud:master Jun 10, 2024
4 checks passed
@kobergj kobergj deleted the Activities branch June 10, 2024 10:28
ownclouders pushed a commit that referenced this pull request Jun 10, 2024
@micbar micbar mentioned this pull request Jun 19, 2024
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ocis] implement activity store
4 participants