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

No chart changes detected #108

Open
SapiensAnatis opened this issue Jan 29, 2023 · 9 comments
Open

No chart changes detected #108

SapiensAnatis opened this issue Jan 29, 2023 · 9 comments
Labels
question Further information is requested

Comments

@SapiensAnatis
Copy link

Hey, I'm probably messing something up here, but every run of the action on my chart repo is saying that nothing has changed when it has.

Take for instance this run:
https://github.com/SapiensAnatis/helm-charts/actions/runs/4033008969

which was triggered by this commit:
SapiensAnatis/helm-charts@4728958

It says that nothing has changed when I've clearly updated one of the templates. Additionally, I think my directory structure is sound, with

Git repository
├───.github
│   └───workflows
└───charts
    └───dragalia-api
        ├───charts
        └───templates
            └───tests

Feel free to look at the repo itself but summarily the chart depends on two bitnami charts (redis and postgresql) and has the following ct.yaml

remote: origin
chart-dirs:
  - charts
chart-repos:
  - bitnami=https://charts.bitnami.com/bitnami
helm-extra-args: --timeout 600s

When I run the same command that the action is running, ct list-changed --target-branch master --config ct.yaml --remote=origin after making a change, I see the chart in the list of changes so not sure what's going on

@cpanato
Copy link
Member

cpanato commented Mar 24, 2023

I took a look at your repo and cloned that and run locally the ct with a chart change and that works fine.

does that still an issue? otherwise lets close this issue, thanks!

@cpanato cpanato added the question Further information is requested label Mar 24, 2023
@MindTooth
Copy link

I can verify that this affects me too.

Locally:

$ ct list-changed --target-branch master --config ct.yaml --remote=origin
containers/helm

But, initial PR where I try to use this action doesn't detect any changes. And no checking is done.

IMHO, it's not very obvious what I'm doing wrong. And it seems by this, I'm not the only that have problems.

@cpanato
Copy link
Member

cpanato commented Nov 1, 2023

I can verify that this affects me too.

Locally:

$ ct list-changed --target-branch master --config ct.yaml --remote=origin
containers/helm

But, initial PR where I try to use this action doesn't detect any changes. And no checking is done.

IMHO, it's not very obvious what I'm doing wrong. And it seems by this, I'm not the only that have problems.

@MindTooth made a comment in your PR, that change should work, i've tested in a fork and works for me

@cpanato
Copy link
Member

cpanato commented Nov 1, 2023

@SapiensAnatis i dont see the job in the repo to reproduce the issue

@MindTooth
Copy link

MindTooth commented Nov 1, 2023

I can verify that this affects me too.
Locally:

$ ct list-changed --target-branch master --config ct.yaml --remote=origin
containers/helm

But, initial PR where I try to use this action doesn't detect any changes. And no checking is done.
IMHO, it's not very obvious what I'm doing wrong. And it seems by this, I'm not the only that have problems.

@MindTooth made a comment in your PR, that change should work, i've tested in a fork and works for me

I saw. Thank you! 🙏🏻 Any reason why I need --config ct.yaml? I thought that it was the standard file that ct parsed.

Notice that if no config file is specified, then ct.yaml (or any of the supported formats) is loaded from the current directory, $HOME/.ct, or /etc/ct, in that order, if found.

@cpanato
Copy link
Member

cpanato commented Nov 1, 2023

you also can set CT_CONFIG_DIR

@tirelibirefe
Copy link

@SapiensAnatis is right; changes are not being detected.

      - name: Run chart-testing (list-changed)
        id: list-changed
        run: |
          changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
          if [[ -n "$changed" ]]; then
            echo "changed=true" >> "$GITHUB_OUTPUT"
          fi

Maybe detected but although I replace "true" operators with "false", the steps don't work:

  ```
  • name: Run chart-testing (lint)
    if: steps.list-changed.outputs.changed == 'true'
    run: ct lint --target-branch ${{ github.event.repository.default_branch }}

    - name: Create kind cluster
      if: steps.list-changed.outputs.changed == 'true'
      uses: helm/[email protected]
    
    - name: Run chart-testing (install)
      if: steps.list-changed.outputs.changed == 'true'
      run: ct install --target-branch ${{ github.event.repository.default_branch }}
    

@tirelibirefe
Copy link

I added --config .github/ct.yaml, I think it works now.

@znd4
Copy link

znd4 commented Jun 6, 2024

It seems like this is being caused by CT_CONFIG_DIR being set in ct.sh.

This feels like an anti-pattern, since chart-testing supports .ct/ct.yaml without further configuration.

znd4 added a commit to znd4/chart-testing-action that referenced this issue Jun 6, 2024
Fixes helm#108 

Signed-off-by: Zane Dufour <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants