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

Fixes the Pipeline Logs streaming issue #3504

Conversation

andrewballantyne
Copy link
Contributor

@andrewballantyne andrewballantyne commented Nov 21, 2019

https://jira.coreos.com/browse/ODC-1849
https://jira.coreos.com/browse/ODC-1804

Fixes the streaming issue of Pipeline Logs. There was a misunderstanding that the container statuses and the container specs were two arrays that were in parallel, that doesn't seem to be the case. The issue we saw in the UI was it was rendering the first container based off of another container (in this case, the build container) which took much longer to complete. Looked like the logs stalled, but it was just not rendering the containers properly.

  • Fix the scrolling issue
    • the logs do not anchor to the bottom, so now that the logs properly stream they don't actually make it easy to see all the live results as they happen
  • Capture a gif of the logs streaming AND scrolling

After talking with @christianvogt, the issues of logs being capped at 1k lines and the scrolling issue has been put into separate bugs. The streaming of logs works again via this PR, so it'll serve as a foundation as we discuss what else is to be fixed for 4.3.

Related Issues:

cc @abhinandan13jan @christianvogt

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 21, 2019
@openshift-ci-robot openshift-ci-robot added the component/dev-console Related to dev-console label Nov 21, 2019
@andrewballantyne andrewballantyne changed the title Fixes the Pipeline Logs streaming issue [WIP] Fixes the Pipeline Logs streaming issue Nov 21, 2019
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 21, 2019
Comment on lines +38 to +43
const containerNames = containers.map((c) => c.name);
const sortedContainerStatus = [];
containerStatus.forEach((cs) => {
const containerIndex = containerNames.indexOf(cs.name);
sortedContainerStatus[containerIndex] = cs;
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is more or less the new code - everything else is just de-duplication of logic.

@abhinandan13jan
Copy link
Contributor

abhinandan13jan commented Nov 21, 2019

https://jira.coreos.com/browse/ODC-1849
https://jira.coreos.com/browse/ODC-1804

Fixes the streaming issue of Pipeline Logs. There was a misunderstanding that the container statuses and the container specs were two arrays that were in parallel, that doesn't seem to be the case. The issue we saw in the UI was it was rendering the first container based off of another container (in this case, the build container) which took much longer to complete. Looked like the logs stalled, but it was just not rendering the containers properly.

  • Fix the scrolling issue

    • the logs do not anchor to the bottom, so now that the logs properly stream they don't actually make it easy to see all the live results as they happen
  • Capture a gif of the logs streaming AND scrolling

cc @abhinandan13jan @christianvogt

Ahh, so the issue is around the container and the status array which doesn't follow order. Good catch.

@andrewballantyne andrewballantyne changed the title [WIP] Fixes the Pipeline Logs streaming issue Fixes the Pipeline Logs streaming issue Nov 21, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 21, 2019
@andrewballantyne
Copy link
Contributor Author

Title of the PR has been updated to bring this out of WIP. Please review this PR in the context of "fixing the streaming of logs" and note the issues at the bottom of the description that will be dealt with in other PRs.

@christianvogt
Copy link
Contributor

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 21, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewballantyne, christianvogt

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 21, 2019
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

5 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit be8aeaa into openshift:master Nov 22, 2019
@spadgett spadgett added this to the v4.3 milestone Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. component/dev-console Related to dev-console lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants