Skip to content

Get result heimdall task#53

Merged
Will Graham (wlggraham) merged 2 commits intomainfrom
get_result_heimdall_task
Apr 1, 2026
Merged

Get result heimdall task#53
Will Graham (wlggraham) merged 2 commits intomainfrom
get_result_heimdall_task

Conversation

@wlggraham
Copy link
Copy Markdown
Contributor

@wlggraham Will Graham (wlggraham) commented Mar 31, 2026

Description

Some Heimdall payloads do not produce a result, but the current Caterpillar Heimdall Task implementation always hits the /result API. This causes issues with certain payloads, particularly SQL DDL.

This PR introduces a new field GetResult, which determines whether or not we want to hit the /result endpoint after completion of a job. This is intentionally different from the ReturnResult which has different behaviors depending on how the heimdall plugin was written. For example, Trino ALWAYS returns a result, regardless of whether or not ReturnResult is used. Because of this, having a separate indicator for how we poll the heimdall API is essential.

To test this, I tested the following pipeline:

  - name: query_with_result
    type: heimdall
    fail_on_error: true
    get_result: false
    job:
      command_criteria:
        - type:sparksql-eks
      cluster_criteria:
        - data:prod
      context:
        query: SHOW databases;
        return_result: true

  - name: echo
    type: echo
    only_data: true 

Both with get_result and without it.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation and I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@wlggraham Will Graham (wlggraham) requested a review from a team as a code owner March 31, 2026 21:24
@wlggraham Will Graham (wlggraham) merged commit 38bc9c7 into main Apr 1, 2026
7 checks passed
@wlggraham Will Graham (wlggraham) deleted the get_result_heimdall_task branch April 1, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants