Skip to content

Create a new piezo endpoint for updating data - #136

Open
jdforde wants to merge 1 commit into
mainfrom
SRE-14470-create-piezo-update-data-endpoint
Open

Create a new piezo endpoint for updating data#136
jdforde wants to merge 1 commit into
mainfrom
SRE-14470-create-piezo-update-data-endpoint

Conversation

@jdforde

@jdforde jdforde commented Sep 3, 2026

Copy link
Copy Markdown

Create a new piezo endpoint that allows us to update job data for multiple jobs at once

@jdforde
jdforde requested a review from tmccombs September 3, 2026 17:47

@ifndefJOSH ifndefJOSH left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I just have a couple of questions about whether or not there's any potentially sensitive information about jobs in error messages that could leak out?

val errorMsg = "Exception caught updating the job data map of job %s %s. -- %s".format(
jobKey.getGroup,
jobKey.getName,
e.getLocalizedMessage(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this exception passed through to the HTTP response? If so we need to verify nothing sensitive is exposed.

"updated" -> updated.map(jobKeyJson),
"failures" -> failures,
)
if (failures.isEmpty) Ok(body) else MultiStatus(body)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'm curious who will be calling this endpoint? Other services or will it be public? If the latter, failures need to be sanitized to ensure no sensitive data leaks out.

Comment thread admin/conf/routes
GET /data/jobs com.lucidchart.piezo.admin.controllers.Jobs.getJobsDetail
GET /data/jobs/:group/:name com.lucidchart.piezo.admin.controllers.Jobs.getJobDetail(group: String, name: String)

POST /data/jobs/job-data-map com.lucidchart.piezo.admin.controllers.Jobs.patchJobDataMaps

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Curious why this is a POST vs a PATCH request which the controller method implies.

@tate8

tate8 commented Sep 3, 2026

Copy link
Copy Markdown

Could an in progress job persist its job data after this endpoint updates the lastRunTime thereby overwriting the reset? Does there need to be some mechanism to pause new instances of these jobs from starting and waiting for running executions? This is a rare race condition though but just double checking.

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.

3 participants