8000 Logs: Add option to add a max padding for the job name by hverlin · Pull Request #841 · firecow/gitlab-ci-local · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Logs: Add option to add a max padding for the job name #841

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

Merged
merged 3 commits into from
May 3, 2023

Conversation

hverlin
Copy link
Collaborator
@hverlin hverlin commented May 1, 2023

See #840

In some case, the job names can get very long (e.g., for parallel matrix). In this case, it's better if we avoid padding the job name (or at least not try to add 150+ padding length, as it makes the output harder to read)

Example with this job

my-matrix-job:
  stage: .pre
  parallel:
    matrix:
      - MY_VARIABLE:
        - 'very long variable name, for example some URL or long command line parameters'
        - 'another one but shorter'
  script:
    - echo "line 1 - FOO=$MY_VARIABLE"
    - echo "line 2"
  • Use --maxJobNameLength=0 to disable any padding.
gitlab-ci-local --maxJobNameLength=0

image

  • Use --maxJobNameLength=50 to add a max padding
gitlab-ci-local --maxJobNameLength=50

image

Leave empty to keep the current behavior
image

@firecow
Copy link
Owner
firecow commented May 3, 2023

@hverlin Can I pursue you to a little integration test in the tests/test-cases folder?

@hverlin
Copy link
Collaborator Author
hverlin commented May 3, 2023

Used snapshots here, felt it was more readable than asserting equality of the strings due to the escape sequences

image

@firecow
Copy link
Owner
firecow commented May 3, 2023

Used snapshots here, felt it was more readable than asserting equality of the strings due to the escape sequences

image

Uh, nice 🤣 Didn't even know there was such a thing.

Tests are failing though...

@firecow
Copy link
Owner
firecow commented May 3, 2023

Great work @hverlin, you want a developer invite to this project?

@hverlin
Copy link
Collaborator Author
hverlin commented May 3, 2023

Thanks, sure!

Copy link
Owner
@firecow firecow left a comment

Choose a reason for hiding this comment

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

Looks very good to me

@firecow firecow merged commit 4d7f3df into firecow:master May 3, 2023
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.

2 participants
0