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

[tests-only][ociswrapper] Fix oCIS restart when it exits unexpectedly during startup #7072

Merged
merged 6 commits into from
Sep 21, 2023

Conversation

saw-jan
Copy link
Member

@saw-jan saw-jan commented Aug 21, 2023

Description

Improves:

  • restart ocis server if it exists with error during startup
  • do not panic if the process is already finished while stopping the process
  • mark server ready if the server sends the response

Related Issue

Part of #6850

How Has This Been Tested?

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:

@owncloud owncloud deleted a comment from update-docs bot Aug 21, 2023
@saw-jan saw-jan self-assigned this Aug 21, 2023
@saw-jan saw-jan requested a review from 2403905 August 21, 2023 04:49
@saw-jan saw-jan marked this pull request as ready for review August 21, 2023 04:49
@saw-jan saw-jan requested a review from phil-davis August 21, 2023 04:49
Copy link
Contributor

@phil-davis phil-davis left a comment

Choose a reason for hiding this comment

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

Seems OK. I suppose that the actual testing software will see the error (as a 500 status returned by the API, or...) and will be able to make the decision if it retries, or fails the test.
We do want to know when "bad things" go wrong and be able to see test failures. We don't want to actually end up hiding "intermittent nasty problems" by doing retries.

@saw-jan
Copy link
Member Author

saw-jan commented Aug 21, 2023

Seems OK. I suppose that the actual testing software will see the error (as a 500 status returned by the API, or...) and will be able to make the decision if it retries, or fails the test. We do want to know when "bad things" go wrong and be able to see test failures. We don't want to actually end up hiding "intermittent nasty problems" by doing retries.

yeah, the ociswrapper only retries if the ocis server command terminates

@saw-jan saw-jan marked this pull request as draft August 21, 2023 06:14
@saw-jan saw-jan requested a review from phil-davis August 21, 2023 06:14
@saw-jan saw-jan force-pushed the tests/print-err-message branch from e4e14b9 to 73c8925 Compare September 5, 2023 06:59
@saw-jan saw-jan force-pushed the tests/print-err-message branch 2 times, most recently from f67c6f9 to 44585e0 Compare September 18, 2023 08:32
@saw-jan saw-jan changed the title [tests][ociswrapper] Print error message instead of Panic to allow max retries [tests][ociswrapper] Use Fatal insteadof Panic Sep 18, 2023
@saw-jan saw-jan changed the title [tests][ociswrapper] Use Fatal insteadof Panic [tests][ociswrapper] Use Fatal instead of Panic Sep 18, 2023
@saw-jan saw-jan marked this pull request as ready for review September 18, 2023 08:34
@saw-jan saw-jan changed the title [tests][ociswrapper] Use Fatal instead of Panic [tests-only][ociswrapper] Use Fatal instead of Panic Sep 18, 2023
@saw-jan saw-jan force-pushed the tests/print-err-message branch 2 times, most recently from b93d66e to d1f57e2 Compare September 21, 2023 06:49
@saw-jan saw-jan changed the title [tests-only][ociswrapper] Use Fatal instead of Panic [tests-only][ociswrapper] Fix oCIS restart when it exits unexpectedly during startup Sep 21, 2023
@saw-jan
Copy link
Member Author

saw-jan commented Sep 21, 2023

yeah, the ociswrapper only retries if the ocis server command terminates

this was not fully true. Now the recent commits fix this.

tests/ociswrapper/ocis/ocis.go Outdated Show resolved Hide resolved
@saw-jan saw-jan force-pushed the tests/print-err-message branch from a250543 to d4be6a8 Compare September 21, 2023 11:15
@saw-jan saw-jan requested a review from kobergj September 21, 2023 11:15
@sonarqubecloud
Copy link

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 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@kobergj kobergj merged commit 2d3133b into master Sep 21, 2023
@delete-merged-branch delete-merged-branch bot deleted the tests/print-err-message branch September 21, 2023 11:52
ownclouders pushed a commit that referenced this pull request Sep 21, 2023
[tests-only][ociswrapper] Fix oCIS restart when it exits unexpectedly during startup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants