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

kpt pipeline validation should use new format #1775

Merged
merged 2 commits into from
Apr 22, 2021

Conversation

natasha41575
Copy link
Contributor

fix #1754

pkg/api/kptfile/v1alpha2/validation.go Outdated Show resolved Hide resolved
@@ -27,8 +28,10 @@ const (
)

func (kf *KptFile) Validate() error {
const op errors.Op = "kptfile.validate"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how should we construct this op string. Should it be [pkgName].[structName].[funcName] or any string that can represent current operation?

Copy link
Contributor Author

@natasha41575 natasha41575 Apr 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked with Morten and he said the convention for now is [package name].[function name]. I will update the PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated it to include the package name

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may need to standardize the format of this string. And it will be good to document how to use this errors package. @droot @mortent

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, this should be addressed as part of #1783 and #1557

@natasha41575 natasha41575 merged commit 756a18f into kptdev:next Apr 22, 2021
@natasha41575 natasha41575 deleted the pipelinevalidationerrors branch April 22, 2021 16:31
frankfarzan pushed a commit to frankfarzan/kpt that referenced this pull request Jun 3, 2021
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

Successfully merging this pull request may close these issues.

kpt pipeline validation should return errors compatible with new error format.
2 participants