moved ShareCreated event consumer from frontend to shared service - #3389
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 38 |
| Duplication | -106 |
🟢 Coverage 0.00% diff coverage · -0.01% coverage variation
Metric Results Coverage variation ✅ -0.01% coverage variation (-1.00%) Diff coverage ✅ 0.00% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (0c601bb) 84494 19647 23.25% Head commit (1693da6) 84480 (-14) 19634 (-13) 23.24% (-0.01%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#3389) 26 0 0.00% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
rhafer
left a comment
There was a problem hiding this comment.
While keep in the old setting in the frontend service is good for documentations reason, I think we should already remove the code that uses these settings in the frontend service. i.e.:
- there is no need to initialize the default for
MaxConcurrency,AutoAcceptShares,Events,GRPCClientTLSandServiceAccount - The "nats reachability" check can be removed from the debug handler, as the frontend no longer needs "nats" ( see
services/frontend/pkg/server/debug/server.go)
BTW, just some cosmetics (for future PRs): we usually prefer to submit PR from personal forks instead of the main repo. And rebasing a PR onto current main is normally preferred over adding merge commits to the PR.
| FullTextSearch bool `yaml:"full_text_search" env:"FRONTEND_FULL_TEXT_SEARCH_ENABLED" desc:"Set to true to signal the web client that full-text search is enabled." introductionVersion:"1.0.0"` | ||
| CheckForUpdates bool `yaml:"check_for_updates" env:"FRONTEND_CHECK_FOR_UPDATES" desc:"Enable automatic checking for updates. Defaults to true." introductionVersion:"3.6.0"` | ||
| PublicURL string `yaml:"public_url" env:"OC_URL;FRONTEND_PUBLIC_URL" desc:"The public facing URL of the OpenCloud frontend." introductionVersion:"1.0.0"` | ||
| MaxConcurrency int `yaml:"max_concurrency" env:"OC_MAX_CONCURRENCY;FRONTEND_MAX_CONCURRENCY" desc:"Maximum number of concurrent go-routines. Higher values can potentially get work done faster but will also cause more load on the system. Values of 0 or below will be ignored and the default value will be used." introductionVersion:"1.0.0" deprecationVersion:"1.0.0" removalVersion:"%%NEXT_PRODUCTION_VERSION%%" deprecationInfo:"FRONTEND_MAX_CONCURRENCY is deprecated and will be removed in a future version. Please use SHARING_MAX_CONCURRENCY (sharing service) instead." deprecationReplacement:"SHARING_MAX_CONCURRENCY"` |
There was a problem hiding this comment.
I think deprecationVersion needs to be "%%NEXT%%" for all of the deprecated settings in this PR. It's referring to the version from which on the setting is considered deprecated.
|
|
||
| ServiceAccount ServiceAccount `yaml:"service_account"` | ||
| SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"SHARING_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token." introductionVersion:"1.0.0"` | ||
| AutoAcceptShares bool `yaml:"auto_accept_shares" env:"FRONTEND_AUTO_ACCEPT_SHARES;SHARING_AUTO_ACCEPT_SHARES" desc:"Defines if shares should be auto accepted by default. Users can change this setting individually in their profile." introductionVersion:"1.0.0"` |
There was a problem hiding this comment.
I guess introductionVersion should be "%%NEXT%%" for those?
|
@maki5 This needs a rebase on latest main |
901abae to
1693da6
Compare
ShareCreated event consumer for auto accept shares is moved from frontend service to share service
new env vars introduced but the old env vars are still working for backwards compatibility
closes: #1310