Don't show logs panel if task never running #1503

Merged
merged 6 commits into from Apr 28, 2017

Conversation

Projects
None yet
2 participants
@PtrTeixeira
Contributor

PtrTeixeira commented Apr 12, 2017

If a task is currently stopped and never reached the RUNNING state,
don't show the "Logs" section, or include a link to
"tail_of_finished_service.log".

PtrTeixeira added some commits Apr 11, 2017

Don't show logs panel if task never running
If a task is currently stopped and never reached the RUNNING state,
don't show the "Logs" section, or include a link to
"tail_of_finished_service.log".
Show if a task never started on detail page
Instead of showing a red label with "Task lost" when a task failed to
start (eg, due to it attempting to accept an invalid offer), show a blue
(info) label with the label "Task aborted."
+
+const labelText = (status, currentState, cleanupType) => {
+ if (status === TaskStatus.NEVER_RAN) {
+ return 'Task aborted';

This comment has been minimized.

@ssalinas

ssalinas Apr 13, 2017

Member

👍 for this, I think this will make things a lot clearer for users

@ssalinas

ssalinas Apr 13, 2017

Member

👍 for this, I think this will make things a lot clearer for users

@ssalinas

This comment has been minimized.

Show comment
Hide comment
@ssalinas

ssalinas Apr 13, 2017

Member

Good to go ahead and test in staging whenever you like @PtrTeixeira

Member

ssalinas commented Apr 13, 2017

Good to go ahead and test in staging whenever you like @PtrTeixeira

PtrTeixeira added some commits Apr 14, 2017

Don't show link to log file if directory is empty
If the directory is linked directory is empty - either there never was
anything there or whatever was there has now been cleaned up - don't
show a link to the latest log on the task detail page.
Don't check length of nullable field
Was previously checking the `length` property to determine if a given
array had contents. This didn't work because in cases where the
directory had been cleaned up, the query to get that field would respond
with an error code, which resulted in `files` being `null` or
`undefined`, rather than the empty array.

@PtrTeixeira PtrTeixeira added the hs_qa label Apr 19, 2017

@ssalinas ssalinas modified the milestone: 0.15.0 Apr 19, 2017

PtrTeixeira added some commits Apr 19, 2017

Be even more careful about nullable variables
In some cases the whole object can be null, not just a field of it. This
checks that the object is present before accessing its fields, which
should hopefully prevent more exceptions from being thrown due to state
oddities.
Return null when files not unavailable
React requires that a component evaluate to either null, a dom element,
or a react component when it renders. The `TaskLatestLog` component was
rendering as `false`, rather than `null`, in cases when files were not
loaded - in particular, when following links directly into a directory
rather than the task page itself.

@ssalinas ssalinas merged commit 389be84 into master Apr 28, 2017

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@ssalinas ssalinas deleted the dont-link-nonexistent-logs branch Apr 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment