Skip to content

chore(kuttl): add test for failing spark job - #735

Open
sweb wants to merge 3 commits into
mainfrom
chore/failing-spark-job-test
Open

chore(kuttl): add test for failing spark job#735
sweb wants to merge 3 commits into
mainfrom
chore/failing-spark-job-test

Conversation

@sweb

@sweb sweb commented Jul 29, 2026

Copy link
Copy Markdown
Member

Description

Adds two kuttl integration test suites: failure-propagation, which verifies that a Spark application failing at runtime is reported with phase Failed and its driver Pod cleaned up, and graceful-shutdown, which verifies that SIGTERM reaches the executor and driver JVMs so that shutdown hooks run and the driver asks its executors to stop.

Tests for stackabletech/docker-images#1595

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

  • Changes are OpenShift compatible
  • CRD changes approved
  • CRD documentation for all fields, following the style guide.
  • Helm chart can be installed and deployed operator works
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible
  • Links to generated (nightly) docs added
  • Release note snippet added

Reviewer

  • Code contains useful comments
  • Code contains useful logging statements
  • (Integration-)Test cases added
  • Documentation added or updated. Follows the style guide.
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added
  • Links to generated (nightly) docs added
  • Release note snippet added
  • Add type/deprecation label & add to the deprecation schedule
  • Add type/experimental label & add to the experimental features tracker

@sweb
sweb marked this pull request as ready for review July 29, 2026 15:33
@sweb sweb moved this to Development: Waiting for Review in Stackable Engineering Jul 29, 2026

@razvan razvan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A nit from Claude which I like is that the test should be more appropriately called signal-propagation, but I'll leave it up to you to change it or not.

selector="spark-role=executor,app.kubernetes.io/instance=graceful-shutdown"
# A signalled container is gone in 1-2s, an unsignalled one at the grace period (30s).
budget_seconds=20

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Comment from Claude which I believe is true. The weekly Jenkins tests set VECTOR_AGGREGATOR='vector-aggregator.default.svc.cluster.local:6000' which enables Vector log collection so budget_seconds might not be enough.

budget_seconds=20 is not safe when Vector is enabled (graceful-shutdown/11-check-executor-shutdown.yaml). The test waits for containerStatuses[spark].state.terminated — container exit, not JVM exit. When enableVectorAgent is true the operator injects _STACKABLE_POST_HOOK = sleep 10; (build/pod.rs:241-251). So the real budget is ~10s + JVM shutdown against a 20s limit and a 30s grace period — very little headroom, and the inline claim "A signalled container is gone in 1-2s" is wrong in exactly the configuration nightly runs in. You can't raise the budget much, since it must stay under the grace period.
Better: key the wait off the log, which you're already streaming — wait for Shutdown hook called (or Driver commanded a shutdown) to appear. That is the direct signal, subsumes the separate shutdown-hook grep, and is immune to the post hook entirely. Worth confirming whether #1595's new trap handling runs the post hook on SIGTERM at all — the whole timing budget hinges on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: Waiting for Review

Development

Successfully merging this pull request may close these issues.

2 participants