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

Chore: Extend the live service utility for handling 503 errors #4143

Merged
merged 3 commits into from Sep 9, 2023

Conversation

stumpylog
Copy link
Member

Proposed change

I'd written two of these utilities to handle HTTP errors when using Gotenberg/Tika in the CI test runs. This combines them into a single place for usage. It will probably fail right away, but it seemed to be more stable in my numerous re-runs.

The best change is probably the skipping if the calls all failed with HTTP 503 errors. We don't really care if the server died in our tests.

Type of change

  • 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 not work as expected)
  • Other (please explain): - Code cleanup

Checklist:

  • I have read & agree with the contributing guidelines.
  • If applicable, I have included testing coverage for new code in this PR, for backend and / or front-end changes.
  • If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
  • If applicable, I have checked that all tests pass, see documentation.
  • I have run all pre-commit hooks, see documentation.
  • I have made corresponding changes to the documentation as needed.
  • I have checked my modifications for any breaking changes.

@stumpylog stumpylog requested a review from a team as a code owner September 8, 2023 17:33
@paperless-ngx-secretary paperless-ngx-secretary bot added backend non-trivial Requires approval by several team members labels Sep 8, 2023
Copy link
Member

@shamoon shamoon left a comment

Choose a reason for hiding this comment

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

Worth a shot! This is the last bugaboo in our ci but yea seems random and is rarely relevant.

@shamoon
Copy link
Member

shamoon commented Sep 8, 2023

I dont get why this didnt work?

@stumpylog stumpylog marked this pull request as draft September 8, 2023 17:49
@stumpylog
Copy link
Member Author

I do. The errors are chained, so the actual raised error is a ParseError from an httpx.xyzError. I'll need to do some tweaking

@shamoon shamoon added this to the v2.0.0 milestone Sep 8, 2023
@stumpylog stumpylog marked this pull request as ready for review September 8, 2023 20:52
@stumpylog
Copy link
Member Author

stumpylog commented Sep 8, 2023

8 runs without a failure. Naturally, it will fail immediately in dev. In some hacked up testing, it does properly handle a ParseError from an HTTPStatusError and the status code skipping of a test.

@stumpylog stumpylog merged commit 46a3919 into dev Sep 9, 2023
31 checks passed
@stumpylog stumpylog deleted the chore/fix-test-flakiness-more branch September 9, 2023 02:20
@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2023

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backend non-trivial Requires approval by several team members
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants