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

Thrown error if charts to relocate can not be calculated #133

Open
migmartri opened this issue Jan 17, 2022 · 1 comment
Open

Thrown error if charts to relocate can not be calculated #133

migmartri opened this issue Jan 17, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@migmartri
Copy link

migmartri commented Jan 17, 2022

Currently, for OCI-based Helm repositories we have two ways to calculate the helm Charts that the tool should sync, a) via an index artifact instructed to be used via useChartsIndex: true and by b) charts: [foobar] slice.

Currently, if the index is not used (or not found) and the charts array is not set, the tool does not fail but just returns a "no charts to index" message. This behavior should be changed since the tool actually requires one of the two mechanisms to work and hence a miss-configuration error should be shown to the user.

There are two scenarios in which the tool should clearly state a miss-configuration

1 - useChartsIndex == false && len(charts) == 0

This was the original behavior (when the index implementation didn't exist), in this case the tool should fail saying that either an index or a manual list of charts should be provided

2 - useChartsIndex == true && foundAndValidIndex == false && len(charts) == 0

Similarly, if the user instructed the tool to use an index but this one does not exist or it's not a valid one. charts syncer should fail if the charts array fallback is not set.

thoughts @jotadrilo @tompizmor

@migmartri migmartri added the bug Something isn't working label Jan 17, 2022
@jotadrilo
Copy link
Contributor

It makes sense to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants