Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • See what's new at GitLab
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab
GitLab
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 34,614
    • Issues 34,614
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 1,087
    • Merge Requests 1,087
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Metrics
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GitLab.org
  • GitLabGitLab
  • Issues
  • #198413

You need to sign in or sign up before continuing.
Closed
Open
Opened Jan 22, 2020 by Gregor Noczinski@blaubaer😎

Pre-Collapsed sections in job logs

Problem to solve

Currently there is the possibility to make sections in the jobs logs collapsible.

section_start:<current_timestamp>:<section_name>\r\033[0K
[..]
section_end:<current_timestamp>:<section_name>\r\033[0K

All these sections are then still opened but could be collapsed to make the log better parseable by humans. However sometimes there are very long sections, which just stuff like:

  • Downloading caches/dependencies
  • Tests
  • Long Error/Warning Messages
  • ...

... which might be great that this is collapsed by default and will be only expanded if the user wants to look into that.

Intended users

Everybody who looks often at jobs logs according to his work.

  • Rachel (Release Manager)
  • Delaney (Development Team Lead)
  • Sasha (Software Developer)
  • Devon (DevOps Engineer)
  • Sidney (Systems Administrator)
  • Sam (Security Analyst)
  • Dana (Data Analyst)

Proposal

There are 3 different variants proposed:

1. An optional parameter area (implemented in !42231 (merged))

section_start:<current_timestamp>:<section_name>[collapsed=true]\r\033[0K
[..]
section_end:<current_timestamp>:<section_name>[collapsed=true]\r\033[0K
Pro
  1. This gives the possibility to add other optional parameters in the future, if required.
Con
  1. Have to be limited functionally to ensure to not collide with following tokens.
  2. Caused by Con 1. maybe harder to implement and quite complex to test.

2. An optional suffix

section_start:<current_timestamp>:<section_name>[:collapsed]\r\033[0K
[..]
section_end:<current_timestamp>:<section_name>[:collapsed]\r\033[0K
Pro
  1. Risk of colliding with other following tokens are low
  2. Effort for implementing and testing might be manageable.
Cons
  1. Not very future proof if other features of the sections might be desired.

3. An optional section name marker suffix

section_start:<current_timestamp>:<section_name>[_collapsed]\r\033[0K
[..]
section_end:<current_timestamp>:<section_name>[_collapsed]\r\033[0K
Pro

See Pro of 2. An optional suffix

Con

See Con of 2. An optional suffix, plus:

  1. Looks like a lazy solution. 😉

Behavior in the UI

  1. While the current section is still active: Do not collapse
  2. Is the section finished and is marked as collapsed: Collapse it.
  3. If someone uses a line jump link (like https://gitlab.com/foo/bar/-/jobs/123#L456) and this line is inside a collapsed section: Do not collapse also if point 2. happens.

Permissions and Security

No more additional permissions required nor checks.

Documentation

Right now there seems to be no documentation for sections in GitLab at all. Maybe it worth it to put a small documentation for that in parallel to https://docs.gitlab.com/ee/user/project/pipelines/job_artifacts.html.

By now, the documentation for sections was written here: https://docs.gitlab.com/ee/ci/pipelines/#expand-and-collapse-job-log-sections

Availability & Testing

What does success look like, and how can we measure that?

People starting to use this feature (like us) and maybe it will be already used for all standard stuff of the logs like:

  • Using Docker executor with image...
  • Fetching changes with git depth set to...
  • ...

But a statistically logging is hard.

What is the type of buyer?

Tier: Core/Free, Starter/Bronze, Premium/Silver, Ultimate/Gold

Links / references

  • gitlab-foss#14664 (closed): Collapsable job log
Edited Oct 02, 2020 by Kev
Assignee
Assign to
13.5
Milestone
13.5 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: gitlab-org/gitlab#198413