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

unify configuration and commands #2818

Merged
merged 38 commits into from
Jan 7, 2022
Merged

Conversation

wkloucek
Copy link
Contributor

@wkloucek wkloucek commented Nov 24, 2021

Description

This PR:

  • adds missing commands for some services (which previously couldn't be started except with ocis server)
  • use tags on the config structs to get config values from the environment (instead of mappings.go)
  • unify common config parts like Service.Version
  • ensures, that each config file will only be parsed once
  • changes the behaviour of subcommands: eg. ocis accounts will no longer run a server, but display the help. In order to run the server one needs to run ocis accounts server.
  • the version subcommand now displays the version / compile time and the version of running services (context dependent which services are displayed)
  • moved a lot of stuff around in its own packages (eg. config.Parse(...))
  • moved a lot of stuff around in its own files (eg. default config, http config, grpc config, ...)

Out of scope:

  • ./storage/ was not touched, this will be done in a separate PR

Related Issue

  • Fixes <issue_link>

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@update-docs
Copy link

update-docs bot commented Nov 24, 2021

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@wkloucek wkloucek self-assigned this Nov 25, 2021
@wkloucek wkloucek force-pushed the unify-commands-and-service-options branch from 2e0f480 to 3e6c22a Compare December 15, 2021 12:04
@wkloucek wkloucek force-pushed the unify-commands-and-service-options branch 2 times, most recently from c16852b to 58935aa Compare December 17, 2021 10:49
@ownclouders
Copy link
Contributor

ownclouders commented Dec 17, 2021

💥 Acceptance test Core-API-Tests-ocis-storage-8 failed. Further test are cancelled...

@wkloucek wkloucek changed the title add missing commands and unify service / namespace options add missing commands / unify configuration Dec 17, 2021
@wkloucek wkloucek force-pushed the unify-commands-and-service-options branch from 1535f25 to 3261bf5 Compare December 21, 2021 09:28
@butonic
Copy link
Member

butonic commented Dec 22, 2021

hm I may have added the machine auth command in #2910

do you need a review after fixing the merge conflict?

@wkloucek wkloucek force-pushed the unify-commands-and-service-options branch from 3261bf5 to 23b87ea Compare December 23, 2021 08:46
@wkloucek wkloucek force-pushed the unify-commands-and-service-options branch from 1f634d8 to 6d0b754 Compare January 3, 2022 08:47
@wkloucek wkloucek changed the title add missing commands / unify configuration unify configuration and commands Jan 4, 2022
@wkloucek wkloucek requested a review from refs January 4, 2022 11:30
@wkloucek wkloucek marked this pull request as ready for review January 4, 2022 11:30
@wkloucek wkloucek requested a review from C0rby January 7, 2022 09:01
Copy link
Contributor

@C0rby C0rby left a comment

Choose a reason for hiding this comment

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

Just one small things. 👍

accounts/pkg/command/health.go Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Jan 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 42 Code Smells

27.3% 27.3% Coverage
32.3% 32.3% Duplication

@wkloucek wkloucek merged commit d9e681f into master Jan 7, 2022
@delete-merged-branch delete-merged-branch bot deleted the unify-commands-and-service-options branch January 7, 2022 12:49
ownclouders pushed a commit that referenced this pull request Jan 7, 2022
Merge: 0abc6d7 62dbd89
Author: Willy Kloucek <34452982+wkloucek@users.noreply.github.com>
Date:   Fri Jan 7 13:49:23 2022 +0100

    Merge pull request #2818 from owncloud/unify-commands-and-service-options

    unify configuration and commands
This was referenced Jan 10, 2022
@micbar micbar mentioned this pull request Feb 16, 2022
22 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.

4 participants