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

Inconsistent configuration options between CLI, ct.yaml and --print-config #672

Open
JuryA opened this issue Aug 19, 2024 · 2 comments
Open

Comments

@JuryA
Copy link

JuryA commented Aug 19, 2024

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

Version of Helm and Kubernetes: Not relevant (Kubernetes: v1.30, Helm: v3.15.3)

Version of ct:

  • Version: 3.11.0
  • Git commit: v3.11.0
  • Date: 1970-01-01 00:00:00 (nix build)
  • License: Apache 2.0

What happened:

There is an inconsistency in the configuration syntax between the output of the ct lint --print-config command and the required format for the ct.yaml configuration file. This discrepancy confuses and necessitates a "trial and error" approach rather than a straightforward configuration.

For example, the output from ct lint --print-config displays the following:

Using config file: /home/uzijaltman/usm-chart/.ct/ct.yaml
------------------------------------------------------------------------------------------------------------------------
 Configuration
------------------------------------------------------------------------------------------------------------------------
Remote: origin
TargetBranch: main
Since: HEAD
BuildID:
LintConf: .ct/lintconf.yaml
ChartYamlSchema: .ct/chart_schema.yaml
ValidateMaintainers: true
ValidateChartSchema: true
ValidateYaml: true
AdditionalCommands: [helm unittest {{ .Path }} -t JUnit -o helm-unittest.xml]
CheckVersionIncrement: false
ProcessAllCharts: false
Charts: []
ChartRepos: []
ChartDirs: [helm]
ExcludedCharts: []
HelmExtraArgs: --timeout 800s
HelmLintExtraArgs:
HelmRepoExtraArgs: []
HelmDependencyExtraArgs: []
Debug: false
Upgrade: false
SkipMissingValues: false
SkipCleanUp: false
Namespace:
ReleaseLabel:
ExcludeDeprecated: false
KubectlTimeout: 30s
PrintLogs: true
GithubGroups: false

However, the ct.yaml file requires a different format for the same configuration options—not just a difference in case style, but entirely different option names—which is counterintuitive. For instance:

  • ProcessAllCharts: true in the command output corresponds to all: true in ct.yaml (CLI argument: --all).
  • ValidateMaintainers: true corresponds to validate-maintainers: true in ct.yaml (CLI argument: --validate-maintainers).

This discrepancy is both confusing and frustrating for users who expect consistency between the output of the ct lint --print-config command and the ct.yaml configuration file format.

What you expected to happen:

I expected the configuration format in the ct.yaml file to be consistent with the output from ct lint --print-config. Specifically, the options and their naming conventions should match, enabling users to easily translate the printed configuration into a working ct.yaml file without needing to cross-reference different formats or option names.

Moreover, it would be reasonable to expect that the output from --print-config could be directly saved as the current configuration. Unfortunately, this is not the case. As a result, the --print-config option becomes redundant since it cannot be directly applied or saved as a valid configuration file without manual adjustments.

How to reproduce it (as minimally and precisely as possible):

  1. Create a ct.yaml configuration file using the output from ct lint --print-config.
  2. Attempt to run ct lint using this configuration file.
  3. Observe that the configuration is missing due to mismatched option names and formats.

Anything else we need to know:

No additional information is required at this time, but this issue significantly impacts usability, particularly for inexperienced users or those unfamiliar with the tool.

Copy link

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 Sep 19, 2024
@JuryA
Copy link
Author

JuryA commented Sep 23, 2024

/nostale

@github-actions github-actions bot removed the Stale label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant