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

Feature: ignore changes in files like README.md? #530

Closed
johanneskastl opened this issue Mar 9, 2023 · 6 comments · May be fixed by #591
Closed

Feature: ignore changes in files like README.md? #530

johanneskastl opened this issue Mar 9, 2023 · 6 comments · May be fixed by #591

Comments

@johanneskastl
Copy link

Is this a request for help?: No.


Is this a BUG REPORT or FEATURE REQUEST? (choose one): FEATURE REQUEST

I am using the helm-chart-testing action, that uses the chart-testing tool (obviously :-) ). It complains, if I make small changes to e.g. a chart's README.md file, and do not bump the chart's version.

For things like README.md or similar it would be nice, if those files could be ignored by ct list-changed.

I found no commandline argument that would allow me to do that. I also found no hint if this is possible using the config file.

@mavimo
Copy link

mavimo commented Mar 31, 2023

@johanneskastl I was thinking the same and I'll like to take care of the implementation of this feature.

Considering that:

  • Helm charts support .helmignore in order to not include files in the chart
  • The current implementation of ct do not take it into account, this mean that in case of files that are not part of the package (e.g.: file in ci folder) every change in those file require a chart bump, also if at the end the chart artefact do not change (same for test folder or any other file/folder that is not shipped in the chart).
  • README.md is not an asset that impact the chart functionality, I'm not sure if it should be part of the chart itself or should be omitted from the tarball (but we should keep in the repo) using the .helmignore file.

I have a few option in mind:

  • Add the functionality to take .helmignore into consideration during the chart-change evaluation (excluding files that are ignored from .helmignore here. Helm ignore functionality is available here but since is an internal package we can't depend from it and we need to mirror the functionality)
  • Add a functionality that omit files from CLI flag/configuration (eg .ctignore file or --ignore-files flag), this seems a bit risky since we can omit files that are part of the final artefact potentially exposing chart developer to issues

Do you have any opinion on that?

cc/ @cpanato

EDIT: After looking into repo I found a PR that is aimed to solve the same problem with a solution that is similar to the first proposal.. #411

@johanneskastl
Copy link
Author

@mavimo Your first proposal sounds good, nice to see there is already a PR for that.

On a related note, I found that people exclude things in the Github Action definition:

---
name: "Charts: Lint and test"

on:
  pull_request:
    paths:
      - 'charts/**'
      - '!charts/**/README.md'
      - '!charts/**/README.md.gotmpl'

(untested example)

@mavimo
Copy link

mavimo commented Apr 5, 2023

@johanneskastl as I understand it going to stop the pipeline to work if only the readme file is changed, this is not bad but then we need to have a dedicate pipeline only for the version check (plus we need to report all the files & folder to ignore also in the CI pipeline, that might be a bit redundant and counterintuitive for a person working on the chart)

@alessio-perugini
Copy link

Having this feature would be great! @cpanato, when you'll be free, would you consider (#411)? 🤓

Copy link

github-actions bot commented Nov 3, 2023

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 github-actions bot added the Stale label Nov 3, 2023
Copy link

github-actions bot commented Nov 8, 2023

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

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants