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

Do not load Logs of Tasks in Tasks overview #961

Closed
Schnitzel opened this Issue Mar 11, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@Schnitzel
Copy link
Member

Schnitzel commented Mar 11, 2019

this is the graphql request that is ran for the tasks tab:

query getEnvironment($openshiftProjectName: String!) {
  environmentByOpenshiftProjectName(openshiftProjectName: $openshiftProjectName) {
    id
    name
    created
    updated
    deployType
    environmentType
    routes
    openshiftProjectName
    project {
      name
      __typename
    }
    services {
      id
      name
      __typename
    }
    tasks {
      id
      name
      status
      created
      started
      completed
      remoteId
      command
      service
      logs
      files {
        id
        filename
        download
        __typename
      }
      __typename
    }
    __typename
  }
}

it includes the logs which are loaded from elasticsearch and can make the request very slow.
as the logs are not used in the overview we should not load the logs in the overview

@rocketeerbkw

This comment has been minimized.

Copy link
Member

rocketeerbkw commented Mar 18, 2019

This is slightly fixed in #976 but not fully. The tasks page does not load the logs anymore, but the task page still has to load every single task and all the logs and then just display one of them.

To fully fix this an addition will need to be made to the api to support selecting only one task from an environment (similar to deployments).

@HurricaneInteractive

This comment has been minimized.

Copy link

HurricaneInteractive commented Mar 26, 2019

Would it be possible to split up the query for the different sections of the dashboard? For example the header can query for the environment and project details to populate that? Then the tasks query could be simplified even more? I haven't looked at the setup for the project so I am just throwing out ideas at this point.

query getEnvironmentTasks($openshiftProjectName: String!) {
  environmentTasksByOpenshiftProjectName(openshiftProjectName: $openshiftProjectName) {
    tasks {
      id
      name
      status
      created
      started
      completed
      remoteId
      command
      service
    }
    __typename
  }
}
@rocketeerbkw

This comment has been minimized.

Copy link
Member

rocketeerbkw commented Mar 26, 2019

@HurricaneInteractive yes, but that doesn't reduce the overall amount of data be requested and delivered.

Like I said in an earlier comment, a change to the api is required and made in #993.

@rocketeerbkw rocketeerbkw removed their assignment Apr 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.