Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: Check for skipped state in task run table to fix endless duration #1134

Merged
merged 11 commits into from
Dec 7, 2021

Conversation

ThatGalNatalie
Copy link
Contributor

PR Checklist:

  • add a short description of what's changed to the top of the CHANGELOG.md
  • add/update tests (or don't, for reasons explained below)

Describe this PR

Resolves #1110

Copy link

@pleek91 pleek91 left a comment

Choose a reason for hiding this comment

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

Everything looks good. But lets DRY up the logic by creating some utility functions.

src/pages/TaskRun/MappedTaskRuns-Tile.vue Outdated Show resolved Hide resolved
src/pages/TaskRun/MappedTaskRuns-Tile.vue Outdated Show resolved Hide resolved
@ThatGalNatalie ThatGalNatalie dismissed pleek91’s stale review November 19, 2021 20:55

created utility function

zhen0
zhen0 previously requested changes Nov 30, 2021
Copy link
Member

@zhen0 zhen0 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 good to me but I also see that duration count in the task run details tile. Could we add your durationCalc method there too?
Screen Shot 2021-11-30 at 1 14 12 PM

@@ -71,7 +72,11 @@ export default {
return `%${this.searchTerm}%`
}
},
methods: {},
methods: {
durationCalc(startTime, endTime, state) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I would import the method with this full name calculateDuration, and rather than using another name here but calling the imported method I would just make it available to the template with

methods: {
    calculateDuration
}

which should work fine since the arguments do not change

@@ -75,7 +76,11 @@ export default {
return `%${this.searchTerm}%`
}
},
methods: {},
methods: {
durationCalc(startTime, endTime, state) {
Copy link
Contributor

Choose a reason for hiding this comment

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

same suggestion here

src/utils/calculateDuration.js Outdated Show resolved Hide resolved
src/utils/calculateDuration.js Outdated Show resolved Hide resolved
@ThatGalNatalie ThatGalNatalie dismissed zhen0’s stale review December 1, 2021 19:31

added method to task run details tile

Copy link
Member

@zhen0 zhen0 left a comment

Choose a reason for hiding this comment

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

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.

BUG: SKIPPED states don't have end times so UI counts up duration forever
4 participants