Skip to content

feat: add Spark History Server link to job details#113

Open
Shivang Nagta (ShivangNagta) wants to merge 1 commit into
patterninc:mainfrom
ShivangNagta:feat/spark-history-link
Open

feat: add Spark History Server link to job details#113
Shivang Nagta (ShivangNagta) wants to merge 1 commit into
patterninc:mainfrom
ShivangNagta:feat/spark-history-link

Conversation

@ShivangNagta

@ShivangNagta Shivang Nagta (ShivangNagta) commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a "Spark History" link on the job details page for Spark-on-EKS jobs.
The link needs Spark's runtime application id, which
surfaces on the SparkApplication Custom Resource status. So the sparkeks plugin now
captures Status.SparkApplicationID during job monitoring and persists it
on the job (new spark_application_id column, added as
not null default ''); the UI then renders the History Server
link when an id is present, and hide it otherwise.

Test

Tested locally (migration, persistence, UI);
Haven't done e2e testing in sandbox as this adds no extra API call for the id. The monitor loop
already fetches Status (for AppState), and SparkApplicationID is just another field on that same object, so reading it adds no new call or failure mode.

Confirmed the spark-operator populates Status.SparkApplicationID at runtime by running the operator's spark-pi example on a local kind cluster and reading the field back.
local_spark_cluster

Manual seeding for testing (for spark and non-spark job)
manual_seed

Button Rendering in Job Details Page (for a spark job)
button_on_dashboard

Some Notes (open for comments)

spark_application_id is the first plugin-specific column on jobs (the other columns are generic). It looks a little bit odd to me but Claude's reasoning for it was - "there's no generic home for plugin runtime metadata as of now", which seems to be true, because our use case is to store a runtime generated data (spark_application_id) in the heimdall database. I could not find in any other plugins, doing something like this.
Some other options could be:
a. add a separate table for storing spark_application_id with a foreign key reference to the original job table. This separates the spark specific data from generic job table but that adds an extra API/read call, and also does not avoid the fact that we would still have to add spark specific table update somewhere in updateAsyncJobStatus function.
b. If more plugins need to store runtime metadata, a generic metadata column may be preferable to per-plugin columns. But this seems like an early abstraction.

@ShivangNagta Shivang Nagta (ShivangNagta) marked this pull request as ready for review June 24, 2026 09:49
Copilot AI review requested due to automatic review settings June 24, 2026 09:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

<Button
styleType='text-blue'
as='externalLink'
href={`https://spark-history.data-platform.aws.pattern.com/history/${jobData?.spark_application_id}/jobs/`}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Shivang Nagta (@ShivangNagta) this is going to be shipped with oss docker image. Lets find another way to inject this in UI

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If this is going to the jobs table, add something more generic, maybe a json that stores key-value and the column is extra_job_attributes. And the frontend then uses the key as display text and the value as the hyperlink for all the attributes that exist for that column.
Or some better approach, anyway, a specific column for spark application ID is not what I would like to see.

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.

4 participants