question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cz check range sometimes failed in GitLab CI

See original GitHub issue

Description

Runcz check --range origin/master..HEAD to check commits in CI occasionally fails. And it worked after I retried the job.But sometimes it didn’t work after retrying multiple times. I couldn’t find out the reason ,

Steps to reproduce

lint: retry: 1 script: - cz version - cz check --rev-range origin/master…HEAD

Current behavior

cz check --rev-range origin/master..HEAD failed. Outputs attached below:

  fatal: ambiguous argument 'master..HEAD': unknown revision or path not in the working tree.
  Use '--' to separate paths from revisions, like this:
  'git <command> [<revision>...] -- [<file>...]'

Desired behavior

cz check --rev-range can run successfully in gitlab CI.

Screenshots

image

Environment

commitizen version: 2.34.0 python version: 3.7.5 operating system: Linux

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:2
  • Comments:19 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
SsuperLcommented, Dec 5, 2022

What would be the output of git log origin/master..? Can it generate output as expected?

Oh,it didn’t show anything of git log origin/master. Maybe there’s no git fetch on some CI machines. I try git fetch origin and it works. Thanks for your help!

0reactions
SsuperLcommented, Dec 20, 2022

@SsuperL One of the stuff I can think of is shallow clone. Maybe you could take a look at this direction as well 😃

Okay, I’ll check it out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to troubleshoot a GitLab pipeline failure
Sometimes when a test fails it's reasonable to ask if perhaps it's simply too wide. But there are other reasons tests can fail....
Read more >
Troubleshooting CI/CD - GitLab Docs
“Checking pipeline status” message ... This message is shown when the merge request has no pipeline associated with the latest commit yet. This...
Read more >
Gitlab CI script doesn't pass exit code of previous command ...
I encountered it when I wanted to print the logs when the test succeeds, but make the command fail anyways. I had something...
Read more >
Code Quality Job Failed - GitLab CI/CD
Hi, I have problem with code quality job. It's always failed without further details. This is my first time enabling the job on...
Read more >
GitLab CI external test for coverage "fails" - Stack Overflow
I think this error might have something to do with the coverage range you have declared. Looking at your .codecov.yml file:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found