Skip to content

Conversation

@aagumin
Copy link
Contributor

@aagumin aagumin commented Nov 21, 2025

Purpose of this PR

Fixing a bug where the SparkApplication did not transition to Failed when the driver pod, while in pending status, received an ErrImagePull.

Proposed changes:

  • Extend pkg/util/sparkpod_test.go
  • Exercise controller-specific logic such as ShouldProcessPodUpdate, driver failure reason detection, and unschedulable transitions.
  • Add reusable pod/status builders to keep complex test scenarios concise.

Change Category

  • Bugfix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that could affect existing functionality)
  • Documentation update

Rationale

These helpers are central to the controller’s reconciliation flow. Covering them with table-top tests protects against regressions when adjusting pod labels, conditions, or driver-specific status handling.

Checklist

  • I have conducted a self-review of my own code.
  • I have updated documentation accordingly.
  • I have added tests that prove my changes are effective or that my feature works.
  • Existing unit tests pass locally with my changes.

Additional Notes

I’m not sure the solution is correct, but the bug is fixed.

@google-oss-prow
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign andreyvelich for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@aagumin aagumin force-pushed the feature/raise-failed-if-imagebackoff branch from ec8d1f3 to f9db676 Compare November 21, 2025 10:57
Signed-off-by: Arsen Gumin <[email protected]>
@aagumin
Copy link
Contributor Author

aagumin commented Nov 21, 2025

/cc @ChenYi015 Hi! Review pls my PR

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.

1 participant