Skip to content

Conversation

@dragomirp
Copy link
Contributor

@dragomirp dragomirp commented Sep 2, 2025

Issue

If the snap fails to install the charm will attempt to block, but subsequent hooks will error out and there should be no way to automatically recover

Solution

Don't handle the snap installation error so that the install hook can fail and can be retried with juju resolve

Checklist

  • I have added or updated any relevant documentation.
  • I have cleaned any remaining cloud resources from my accounts.

@dragomirp dragomirp added the bug Something isn't working as expected label Sep 2, 2025
@codecov
Copy link

codecov bot commented Sep 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.57%. Comparing base (8f60854) to head (8a5e0dd).
⚠️ Report is 4 commits behind head on 16/edge.

❌ Your project status has failed because the head coverage (64.57%) is below the target coverage (70.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           16/edge    #1135      +/-   ##
===========================================
- Coverage    64.61%   64.57%   -0.04%     
===========================================
  Files           17       17              
  Lines         4329     4325       -4     
  Branches       667      667              
===========================================
- Hits          2797     2793       -4     
  Misses        1351     1351              
  Partials       181      181              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dragomirp dragomirp marked this pull request as ready for review September 2, 2025 11:35
@dragomirp dragomirp requested review from a team, marceloneppel and taurus-forever and removed request for a team September 2, 2025 11:35
Copy link
Member

@marceloneppel marceloneppel left a comment

Choose a reason for hiding this comment

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

Thanks!

assert isinstance(harness.model.unit.status, WaitingStatus)


def test_on_install_snap_failure(harness):
Copy link
Contributor

Choose a reason for hiding this comment

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

we should have test(s) for failed snap instannation to make sure juju resolve -all fixes it.

@dragomirp dragomirp merged commit 6f84cce into 16/edge Sep 2, 2025
156 of 163 checks passed
@dragomirp dragomirp deleted the fail-snap branch September 2, 2025 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants