Skip to content

Conversation

@salonishah11
Copy link
Contributor

@salonishah11 salonishah11 commented Nov 12, 2025

Jira Ticket: https://broadworkbench.atlassian.net/browse/TSPS-704

Summary of changes:

What

  • Uses outputExpirationDate returned from listPipelineRuns response to display Deletion Date in Job History page

Why

  • Use the expiration date returned by service instead of calculating on client side

Testing strategy

  • manual testing
  • unit tests
Screenshot 2025-11-12 at 10 01 06 AM

Copy link
Contributor

@mmorgantaylor mmorgantaylor left a comment

Choose a reason for hiding this comment

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

looking great, one question

expect(viewOutputsButton).toBeDisabled();

const user = userEvent.setup();
await user.hover(viewOutputsButton);
Copy link
Contributor

Choose a reason for hiding this comment

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

so cool to test the hover text!

});

const jobOutputsDeleted =
const jobOutputsDeleted = !!(
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm having trouble understanding why the addition of !! here didn't change the pipelineRun.status === 'SUCCEEDED' logic. doesn't this mean that jobOutputsDeleted will be True for failed/running jobs? does it not matter because jobOutputsDeleted is only used further down if pipelineRun.status === 'SUCCEEDED' (line 348)? this is still confusing to me to read, but I might be misunderstanding this logic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The !! here converts that expression into a strict boolean value other wise the data type of jobOutputsDeleted will be boolean | " " | undefined. I can add that as a comment as it can be definitely confusing?

Copy link
Contributor

Choose a reason for hiding this comment

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

oh goodness, sorry, that's just me not understanding what !! means. thanks for the explanation - I don't think you need a comment here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No worries. I did add it as a comment because javascript is confusing and I too as code author did get confused initially.

Copy link
Contributor

@mmorgantaylor mmorgantaylor left a comment

Choose a reason for hiding this comment

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

looks great!

Copy link
Member

@MatthewBemis MatthewBemis left a comment

Choose a reason for hiding this comment

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

This looks awesome, and thank you for backfilling the test coverage that checks for the red deletion dates!

@sonarqubecloud
Copy link

@salonishah11 salonishah11 added this pull request to the merge queue Nov 17, 2025
Merged via the queue into dev with commit bec7ec3 Nov 17, 2025
11 checks passed
@salonishah11 salonishah11 deleted the sps_use_expiration_date branch November 17, 2025 14:51
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.

5 participants