chart-testing icon indicating copy to clipboard operation
chart-testing copied to clipboard

cannot detect changes

Open cometta opened this issue 1 year ago • 5 comments

i'm using ct version 3.10.1

on my local machine, i add foo: bar in deployment.yaml file, then run the command ct list-changed --target-branch main , ct lint --target-branch main no changes detected. can advice on this?

Linting charts...

------------------------------------------------------------------------------------------------------------------------
No chart changes detected.
------------------------------------------------------------------------------------------------------------------------

may i know if there are files changes in /templates/*yaml folder , it should detect it right?

cometta avatar Mar 15 '24 09:03 cometta

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Apr 15 '24 02:04 github-actions[bot]

not stale.

viccuad avatar Apr 19 '24 10:04 viccuad

@cometta @viccuad i just tested locally using https://github.com/falcosecurity/charts and chart repo and made a change in https://github.com/falcosecurity/charts/blob/master/charts/falco/templates/client-certs-secret.yaml for example and then run:

$ pwd
/Users/cpanato/code/src/github.com/falcosecurity/charts

$ ct list-changed --target-branch master
charts/falco

can do you have a repo that i can try to reproduce or can you describe better the issue you are facing

cpanato avatar Apr 19 '24 10:04 cpanato

I see same behavior when commit to main branch, on my laptop this is OK, even after commit, but when I push, the CI code dont see any change:

ct list-changed --chart-dirs charts returns nothing

https://gitlab.com/tdecaux/helm-charts/-/jobs/6884479202

Capture d’écran, le 2024-05-18 à 08 37 02

Gitlab see the change, the job is execute only if

  changes:
    paths:
      - $HELM_CHARTS_DIR/**/*
    compare_to: main

but helm ct no.

ebuildy avatar May 18 '24 12:05 ebuildy

Few settings might cause this behaviour.

      --chart-dirs strings        Directories containing Helm charts. May be specified multiple times
                                  or separate values with commas (default [charts])
      --since string              The Git reference used to identify changed charts (default "HEAD")
      --target-branch string      The name of the target branch used to identify changed charts (default "main")

may i know if there are files changes in /templates/*yaml folder , it should detect it right?

@cometta try to set --chart-dirs=. if templates directory is in repo root.

@ebuildy when you are in master already, ct can't compare. Try to run git diff HEAD - will be no output. In that case, try to specify --since=HEAD~1 to check changes in the latest commit in the branch.

[!NOTE] Some CI systems might do shallow clone so you will not get history at all. You need to run something like this git fetch origin master --depth=2 before running ct

wzooff avatar Jun 13 '24 11:06 wzooff

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jul 14 '24 01:07 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Jul 20 '24 01:07 github-actions[bot]