Skip to content

Conversation

@kaanyalti
Copy link

@kaanyalti kaanyalti commented Aug 15, 2025

PR 6/6

  • Enhancement

What does this PR do?

Why is it important?

  • Disk space errors are not user friendly, so when the upgrade state shows the os disk space error the status output and the fleet ui gets cluttered.
  • By setting the detail error to ErrInsufficientDiskSpaceError we are now providing a consistent and concise error message to the user.

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • [ ] I have added an entry in ./changelog/fragments using the changelog tool
  • [ ] I have added an integration test or an E2E test

Disruptive User Impact

none

How to test this PR locally

  • Coordinator unit test is sufficient

Related issues

@kaanyalti kaanyalti requested a review from a team as a code owner August 15, 2025 15:59
@kaanyalti kaanyalti added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team skip-changelog backport-active-all Automated backport with mergify to all the active branches labels Aug 15, 2025
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@kaanyalti
Copy link
Author

kaanyalti commented Aug 15, 2025

The changelog relevant to this pr is added in #9122
The changelog will be in a separate PR

michalpristas
michalpristas previously approved these changes Aug 19, 2025
ycombinator
ycombinator previously approved these changes Aug 19, 2025
@kaanyalti kaanyalti dismissed stale reviews from ycombinator and michalpristas via f015070 August 20, 2025 13:01
@kaanyalti kaanyalti force-pushed the enhancement/5235_use_disk_space_error_to_set_upgrade_detail_in_coordinator branch from 5a177cd to f015070 Compare August 20, 2025 13:01
@kaanyalti
Copy link
Author

@ycombinator @michalpristas
Added logging as mentioned in the comment, requested re-review

@kaanyalti kaanyalti marked this pull request as draft September 2, 2025 13:09
@kaanyalti kaanyalti force-pushed the enhancement/5235_use_disk_space_error_to_set_upgrade_detail_in_coordinator branch from f015070 to 5a4ed2a Compare September 4, 2025 18:33
@kaanyalti kaanyalti force-pushed the enhancement/5235_use_disk_space_error_to_set_upgrade_detail_in_coordinator branch from 79185f3 to d7e8924 Compare September 8, 2025 18:38
@mergify
Copy link
Contributor

mergify bot commented Sep 9, 2025

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b enhancement/5235_use_disk_space_error_to_set_upgrade_detail_in_coordinator upstream/enhancement/5235_use_disk_space_error_to_set_upgrade_detail_in_coordinator
git merge upstream/main
git push upstream enhancement/5235_use_disk_space_error_to_set_upgrade_detail_in_coordinator

@kaanyalti kaanyalti force-pushed the enhancement/5235_use_disk_space_error_to_set_upgrade_detail_in_coordinator branch from d7e8924 to c140eca Compare September 12, 2025 17:36
@mergify
Copy link
Contributor

mergify bot commented Sep 14, 2025

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b enhancement/5235_use_disk_space_error_to_set_upgrade_detail_in_coordinator upstream/enhancement/5235_use_disk_space_error_to_set_upgrade_detail_in_coordinator
git merge upstream/main
git push upstream enhancement/5235_use_disk_space_error_to_set_upgrade_detail_in_coordinator

@kaanyalti kaanyalti force-pushed the enhancement/5235_use_disk_space_error_to_set_upgrade_detail_in_coordinator branch from c140eca to c52f40f Compare September 18, 2025 17:45
@elastic-sonarqube
Copy link

@kaanyalti kaanyalti marked this pull request as ready for review September 19, 2025 00:54
@kaanyalti kaanyalti merged commit a7a76f6 into elastic:main Sep 19, 2025
23 checks passed
@github-actions
Copy link
Contributor

@Mergifyio backport 8.18 8.19 9.0 9.1

@mergify
Copy link
Contributor

mergify bot commented Sep 19, 2025

backport 8.18 8.19 9.0 9.1

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Sep 19, 2025
…nator (#9392)

* enhancement(5235): added insufficinet disk space error handling in the coordinator

* enhancement(5235): added coordinator tests for insufficient disk space error

enhancement(5235): updated error in test

enhancement(5235): fix coordinator test

* enhancement(5235): added changelog fragment

(cherry picked from commit a7a76f6)

# Conflicts:
#	internal/pkg/agent/application/coordinator/coordinator_unit_test.go
mergify bot pushed a commit that referenced this pull request Sep 19, 2025
…nator (#9392)

* enhancement(5235): added insufficinet disk space error handling in the coordinator

* enhancement(5235): added coordinator tests for insufficient disk space error

enhancement(5235): updated error in test

enhancement(5235): fix coordinator test

* enhancement(5235): added changelog fragment

(cherry picked from commit a7a76f6)

# Conflicts:
#	internal/pkg/agent/application/coordinator/coordinator_unit_test.go
mergify bot pushed a commit that referenced this pull request Sep 19, 2025
…nator (#9392)

* enhancement(5235): added insufficinet disk space error handling in the coordinator

* enhancement(5235): added coordinator tests for insufficient disk space error

enhancement(5235): updated error in test

enhancement(5235): fix coordinator test

* enhancement(5235): added changelog fragment

(cherry picked from commit a7a76f6)

# Conflicts:
#	internal/pkg/agent/application/coordinator/coordinator_unit_test.go
mergify bot pushed a commit that referenced this pull request Sep 19, 2025
…nator (#9392)

* enhancement(5235): added insufficinet disk space error handling in the coordinator

* enhancement(5235): added coordinator tests for insufficient disk space error

enhancement(5235): updated error in test

enhancement(5235): fix coordinator test

* enhancement(5235): added changelog fragment

(cherry picked from commit a7a76f6)

# Conflicts:
#	internal/pkg/agent/application/coordinator/coordinator_unit_test.go
intxgo pushed a commit to intxgo/elastic-agent that referenced this pull request Sep 24, 2025
…nator (elastic#9392)

* enhancement(5235): added insufficinet disk space error handling in the coordinator

* enhancement(5235): added coordinator tests for insufficient disk space error

enhancement(5235): updated error in test

enhancement(5235): fix coordinator test

* enhancement(5235): added changelog fragment
kaanyalti pushed a commit that referenced this pull request Sep 24, 2025
…upgrade detail in coordinator (#10054)

* Enhancement/5235 use disk space error to set upgrade detail in coordinator (#9392)

* enhancement(5235): added insufficinet disk space error handling in the coordinator

* enhancement(5235): added coordinator tests for insufficient disk space error

enhancement(5235): updated error in test

enhancement(5235): fix coordinator test

* enhancement(5235): added changelog fragment

(cherry picked from commit a7a76f6)

# Conflicts:
#	internal/pkg/agent/application/coordinator/coordinator_unit_test.go

* resolved merge conflicts

---------

Co-authored-by: Kaan Yalti <kaan.yalti@elastic.co>
kaanyalti pushed a commit that referenced this pull request Sep 24, 2025
…upgrade detail in coordinator (#10055)

* Enhancement/5235 use disk space error to set upgrade detail in coordinator (#9392)

* enhancement(5235): added insufficinet disk space error handling in the coordinator

* enhancement(5235): added coordinator tests for insufficient disk space error

enhancement(5235): updated error in test

enhancement(5235): fix coordinator test

* enhancement(5235): added changelog fragment

(cherry picked from commit a7a76f6)

# Conflicts:
#	internal/pkg/agent/application/coordinator/coordinator_unit_test.go

* resolved merge conflicts

---------

Co-authored-by: Kaan Yalti <kaan.yalti@elastic.co>
kaanyalti pushed a commit that referenced this pull request Sep 24, 2025
…pgrade detail in coordinator (#10056)

* Enhancement/5235 use disk space error to set upgrade detail in coordinator (#9392)

* enhancement(5235): added insufficinet disk space error handling in the coordinator

* enhancement(5235): added coordinator tests for insufficient disk space error

enhancement(5235): updated error in test

enhancement(5235): fix coordinator test

* enhancement(5235): added changelog fragment

(cherry picked from commit a7a76f6)

# Conflicts:
#	internal/pkg/agent/application/coordinator/coordinator_unit_test.go

* resolved merge conflicts

---------

Co-authored-by: Kaan Yalti <kaan.yalti@elastic.co>
kaanyalti pushed a commit that referenced this pull request Sep 24, 2025
…pgrade detail in coordinator (#10057)

* Enhancement/5235 use disk space error to set upgrade detail in coordinator (#9392)

* enhancement(5235): added insufficinet disk space error handling in the coordinator

* enhancement(5235): added coordinator tests for insufficient disk space error

enhancement(5235): updated error in test

enhancement(5235): fix coordinator test

* enhancement(5235): added changelog fragment

(cherry picked from commit a7a76f6)

# Conflicts:
#	internal/pkg/agent/application/coordinator/coordinator_unit_test.go

* resolved merge conflicts

---------

Co-authored-by: Kaan Yalti <kaan.yalti@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-active-all Automated backport with mergify to all the active branches Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent reports if there is insufficient disk space during upgrade, cleans up, and prevents upgrade

4 participants