Skip to content

Conversation

@butonic
Copy link

@butonic butonic commented Aug 28, 2025

port of owncloud#272

@butonic butonic self-assigned this Aug 28, 2025
@github-project-automation github-project-automation bot moved this to Qualification in OpenCloud Team Board Aug 28, 2025
@butonic butonic moved this from Qualification to In Progress in OpenCloud Team Board Aug 28, 2025
@butonic butonic force-pushed the fix-graceful-shutdown branch from f32571d to c5a838d Compare September 8, 2025 15:35
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
@butonic butonic marked this pull request as ready for review September 8, 2025 16:17
@butonic butonic requested a review from rhafer September 8, 2025 16:17
if srv := newServer(HTTP, mainConf, options); srv != nil {
return srv
}
options.Logger.Fatal().Msg("nothing to do, no http enabled_services declared in config")
Copy link

Choose a reason for hiding this comment

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

The log message seems misleading. If there were no http enabled service in the config we'd already returned on line 50.

This line in only reached if newServer for whatever reason fails to initialize the server.

Copy link
Author

Choose a reason for hiding this comment

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

I think in the NewDriven... functions we can Fatal error because we are still parsing the config.

func (s *server) Start() error {
if s.srv == nil {
err := fmt.Errorf("reva %s server not initialized", s.protocol)
s.log.Fatal().Err(err).Send()
Copy link

Choose a reason for hiding this comment

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

Are you sure about the Fatal level here? Shouldn't we let the caller decide whether exiting is the right thing to do or not?

Consider this a comment of Fatal throught the PR. (I am too lazy to repeat it everywhere)

Copy link
Author

Choose a reason for hiding this comment

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

since Start() acually returns an error we should not Fatal in it. Updated.

}

host, _ := os.Hostname()
log.Info().Msgf("host info: %s", host)
Copy link

Choose a reason for hiding this comment

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

This message alone, especially in the case when starting everything from a single binary seems not useful at all.

Copy link
Author

Choose a reason for hiding this comment

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

moved this to a log field ... and got rid of the Msgf() ... brrr

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
@butonic butonic force-pushed the fix-graceful-shutdown branch from 3884e30 to f52e24a Compare September 10, 2025 16:19
@butonic butonic requested a review from rhafer September 10, 2025 16:20
@butonic butonic merged commit 9e673e0 into main Sep 11, 2025
19 checks passed
@butonic butonic deleted the fix-graceful-shutdown branch September 11, 2025 07:27
@github-project-automation github-project-automation bot moved this from In Progress to Done in OpenCloud Team Board Sep 11, 2025
@openclouders openclouders mentioned this pull request Sep 11, 2025
1 task
MahdiBaghbani pushed a commit to MahdiBaghbani/reva-opencloud that referenced this pull request Oct 17, 2025
…-eu#326)

Bumps [golang.org/x/term](https://github.com/golang/term) from 0.32.0 to 0.33.0.
- [Commits](golang/term@v0.32.0...v0.33.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-version: 0.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants