Skip to content

Provide a helpful error when the target-branch is wrongly configured #43

Closed

Description

@ctron

I created a new repository, and named the master branch main. Running the lint command failed with a weird error message:

…
Digest: sha256:b7bb1e485c9a7ff67f448ebf9bb54db2cf49150b4f71a3620a87b8f85c32d2d4
Status: Downloaded newer image for quay.io/helmpack/chart-testing:v3.0.0
01ae6f5ccb65b12eb7faa050bcf39fb8526bca8866fb88eecf556e06af7ed699

Error: Error running process: exit status 128
Removing ct container...
Done!

I took me a while to figure out that the linter requires a default branch named master. I know it is possible to re-configure using:

target-branch: main

However, I think that:

  • There should be a proper warning: Branch "master" not found
  • There should be some prominent piece of documentation

Activity

  1. davidkarlsen commented on Aug 29, 2020

    @davidkarlsen
    Member

    +1 - ran into this myself.
    If you run the ct command natively it will provide more output.
    I believe this is because the stdout is lost in the docker run of ct and not piped out to the console, hence you are left with only the error-code.

  2. unguiculus commented on Sep 26, 2020

    @unguiculus
    Member

    That's a weird one. I can reproduce it with the GitHub action. For some reason stderr seems to get lost. However, when I run ct locally in Docker the same way the action does, I get a better error message as expected.

    $ docker run --rm -ti -v $(pwd):/workdir --workdir /workdir --detach --network host --name ct quay.io/helmpack/chart-testing:v3.1.1 cat
    a784466f568784ea490abe50b0294cf710ca761d988fcbfd575400928d3fde1c
    
    $ docker exec -i ct ct lint --target-branch foo
    Linting charts...
    ------------------------------------------------------------------------------------------------------------------------
    No chart changes detected.
    ------------------------------------------------------------------------------------------------------------------------
    Error: Error linting charts: Error identifying charts to process: Error running process: exit status 128
    Error linting charts: Error identifying charts to process: Error running process: exit status 128
  3. noygal commented on Oct 17, 2020

    @noygal

    I can replicate both @ctron and @unguiculus errors, tried to solve the issue on github actions by debugging it locally, same error as mention above.

    Update:
    Following this comment: #25 (comment)
    I've managed to solve the issue by using configuration file, you can see the solution here: https://github.com/noygal/helm-github-pages-example/tree/main/.github

  4. added a commit that references this issue on Feb 3, 2021
  5. jenting commented on May 25, 2022

    @jenting

    +1, I encountered the same error.

  6. cpanato commented on Sep 27, 2022

    @cpanato
    Member

    closing due inactivity and looks like there is an workaround

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions