## Summary
`BaseSparkApp.run()` records **FAILED** in the jobs service but then
returns normally, so the Spark application exits successfully.
Engine-level status reports these jobs as succeeded, which hides
failures such as table commits rejected by the tables service. `run()`
now rethrows the failure, wrapped with the job id, after
`onFinished(false)` records the state, so the application exits as
failed.
<!--- HINT: Replace #nnn with corresponding Issue number, if you are
fixing an existing issue -->
## Changes
- [ ] Client-facing API Changes
- [ ] Internal API Changes
- [ ] Bug Fixes
- [ ] New Features
- [ ] Performance Improvements
- [ ] Code Style
- [x] Refactoring
- [ ] Documentation
- [ ] Tests
For all the boxes checked, please include additional details of the
changes made in this pull request.
## Testing Done
<!--- Check any relevant boxes with "x" -->
- [ ] Manually Tested on local docker setup. Please include commands
ran, and their output.
- [x] Added new tests for the changes made.
- [ ] Updated existing tests to reflect the changes made.
- [ ] No tests added or updated. Please explain why. If unsure, please
feel free to ask for help.
- [ ] Some other form of testing like staging or soak time in
production. Please explain.
For all the boxes checked, include a detailed description of the testing
done for the changes made in this pull request.
# Additional Information
- [ ] Breaking Changes
- [ ] Deprecations
- [ ] Large PR broken into smaller PRs, and PR plan linked in the
description.
For all the boxes checked, include additional details of the changes
made in this pull request.
Co-authored-by: James Wang <jamewang@linkedin.com>