-
Notifications
You must be signed in to change notification settings - Fork 197
[8.19] (backport #9122) Enhancement/5235 insufficient disk handling retry shows underlying error #9798
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ror (#9122) * enhancement(5235): added stdlib wrapper functions for testability enhancement(5235): added comment in stdlib wrappers enhancement(5235): added license header in stdlib wrappers * enhancement(5235): using stdlib wrappers in http downloader enhancement(5235): added comments explaining why stdlib wrappers are used in http downloader * enhancement(5235): using stdlib wrappers in fs downloader enhancement(5235): added comments in fs downloader explaining why stdlib wrappers are used * enhancement(5235): added stlib mocker utils enhancement(5235): ran mage update enhancement(5235): updated the stdlib wrapper mocker to use map instead of switch * enhancement(5235): wrapping errors in http downloader * enhancement(5235): wrapping errors in fs downloader * enhancement(5235): added disk space error and relevant tests * enhancement(5235): added diskspace error check in http downloader before calling reporter enhancement(5235): added comment in http downloader explaining why diskpace error chec is called before the download progress reporter call enhancement(5235): instead of overwriting the error we are using a copy to report. the returned error is now wrapped in the htttp downloadfile function * enhancement(5235): added http downloader test for disk space error enhancement(5235): using stdlib mocker in http donwloader test enhancement(5235): removed unnecessary fmt enhancement(5235): added state message assertion in http downloader test enhancement(5235): using common stdlib mock util in http downloader test enhancement(5235): updated http downloader test * enhancement(5235): added fs downloader disk space error tests enhancement(5235): using common stdlib mock util in fs downloader * enhancement(5235): replaced errors.New with fmt.Errorf in step_download * enhancement(5235): wrapping error in backoff.Permanent in download with retries if the error is a diskspace error. enhancement(5235): added downloaderrors import in step download * enhancement(5235): added insufficient disk space test case in step download tests * enhancement(5235): added archive helper functions in upgrade tests enhancement(5235): added comments for the archive helper functions enhancement(5235): added archive helper functions in upgrade tests enhancement(5235): added comments for the archive helper functions enhancement(5235): buildArchiveFiles archive helper function * enhancement(5235): added deferred error handler in upgrade function to add insufficient disk space error into the error chain enhancement(5235): added comments for the deferred error handler in upgrade func * enhancement(5235): added upgrader test for download error handling enhancement(5235): updated the download error handling test, added additional assertions in mocked functions to make sure that they are called enhancement(5235): added comments explaining steps taken in upgrader test enhancement(5235): using common stdlib mock util in upgrade test enhancement(5235): removed error string comparison * enhancement(5235): remove stdlib wrappers and mock utils * enhancement(5235): add stdlib funcs in http downloader struct, update http downloader tests * enhancement(5235): add stdlib funcs in fs downloader struct and update tests * enhancement(5235): separated artifact downloader from upgrader, updated relevant tests * enhancement(5235): added artifact downloader interface, updated SetClient function to set downloader fleet server uri. Updated upgrader tests * enhancement(5235): fix fs downloader tests * enhancement(5235): added comment in upgrader struct * enhancement(5235): refactored upgrade test for readabiltiy * enhancement(5235): updated disk space error check function to return false for ErrInsufficientDiskSpace * enhancement(5235): fixed download with retries error handling test case (cherry picked from commit 134b3de)
6 tasks
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
|
💚 Build Succeeded
cc @kaanyalti |
kaanyalti
approved these changes
Sep 8, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR 1/6
What does this PR do?
Why is it important?
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files./changelog/fragments
using the changelog toolDisruptive User Impact
None, unless user relies on specific error messages in upgrade details in the status output.
How to test this PR locally
Related issues
This is an automatic backport of pull request #9122 done by [Mergify](https://mergify.com).