Skip to content

moved ShareCreated event consumer from frontend to shared service - #3389

Merged
maki5 merged 2 commits into
mainfrom
feat/share_created_in_share_service
Aug 26, 2026
Merged

moved ShareCreated event consumer from frontend to shared service#3389
maki5 merged 2 commits into
mainfrom
feat/share_created_in_share_service

Conversation

@maki5

@maki5 maki5 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

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

  • FRONTEND_EVENTS_* → SHARING_EVENTS_*
  • FRONTEND_AUTO_ACCEPT_SHARES → SHARING_AUTO_ACCEPT_SHARES
  • FRONTEND_MAX_CONCURRENCY → SHARING_MAX_CONCURRENCY
  • FRONTEND_SERVICE_ACCOUNT_* → SHARING_SERVICE_ACCOUNT_*

closes: #1310

@codacy-production

codacy-production Bot commented Aug 21, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 38 complexity · -106 duplication

Metric Results
Complexity 38
Duplication -106

View in Codacy

🟢 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

View coverage diff in Codacy

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.

@maki5
maki5 marked this pull request as ready for review August 24, 2026 13:36
@maki5
maki5 requested review from butonic, pbleser-oc and rhafer August 24, 2026 13:36

@rhafer rhafer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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, GRPCClientTLS and ServiceAccount
  • 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.

Comment thread services/frontend/pkg/config/config.go Outdated
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"`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Comment thread services/sharing/pkg/config/config.go Outdated

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"`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess introductionVersion should be "%%NEXT%%" for those?

@maki5
maki5 requested a review from rhafer August 26, 2026 12:24
@rhafer

rhafer commented Aug 26, 2026

Copy link
Copy Markdown
Member

@maki5 This needs a rebase on latest main

@maki5
maki5 enabled auto-merge (rebase) August 26, 2026 17:32
@maki5
maki5 force-pushed the feat/share_created_in_share_service branch from 901abae to 1693da6 Compare August 26, 2026 21:18
@maki5
maki5 merged commit 6ceedcf into main Aug 26, 2026
62 of 63 checks passed
@maki5
maki5 deleted the feat/share_created_in_share_service branch August 26, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ShareCreated events should be handled by the sharing service

2 participants