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

Address a code TODO about error message in RequiredPackageVariableSource #456

Closed
m1kola opened this issue Oct 12, 2023 · 0 comments · Fixed by #463
Closed

Address a code TODO about error message in RequiredPackageVariableSource #456

m1kola opened this issue Oct 12, 2023 · 0 comments · Fixed by #463
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.

Comments

@m1kola
Copy link
Member

m1kola commented Oct 12, 2023

It looks like this can be addressed now since I believe version ranges already landed in main:

func (r *RequiredPackageVariableSource) notFoundError() error {
// TODO: update this error message when/if we decide to support version ranges as opposed to fixing the version
// context: we originally wanted to support version ranges and take the highest version that satisfies the range
// during the upstream call on the 2023-04-11 we decided to pin the version instead. But, we'll keep version range
// support under the covers in case we decide to pivot back.
if r.versionRange != "" && r.channelName != "" {
return fmt.Errorf("package '%s' at version '%s' in channel '%s' not found", r.packageName, r.versionRange, r.channelName)
}
if r.versionRange != "" {
return fmt.Errorf("package '%s' at version '%s' not found", r.packageName, r.versionRange)
}
if r.channelName != "" {
return fmt.Errorf("package '%s' in channel '%s' not found", r.packageName, r.channelName)
}
return fmt.Errorf("package '%s' not found", r.packageName)
}

@m1kola m1kola added the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Oct 12, 2023
@m1kola m1kola self-assigned this Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant