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

functionConfig validation for eval and render #2133

Merged
merged 6 commits into from Jun 4, 2021

Conversation

natasha41575
Copy link
Contributor

@natasha41575 natasha41575 commented May 27, 2021

fixes #1959, #2105

@natasha41575 natasha41575 changed the title Function configs require metadata.name field in functionConfigs May 27, 2021
internal/fnruntime/runner.go Outdated Show resolved Hide resolved
thirdparty/kyaml/runfn/runfn.go Outdated Show resolved Hide resolved
@Shell32-Natsu
Copy link
Contributor

Please update the PR to cover #1959

@natasha41575 natasha41575 changed the title require metadata.name field in functionConfigs require metadata.name field in functionConfigs and share functionConfig check between eval and render Jun 2, 2021
@natasha41575 natasha41575 changed the title require metadata.name field in functionConfigs and share functionConfig check between eval and render functionConfig validation for eval and render Jun 2, 2021
Copy link
Contributor

@droot droot left a comment

Choose a reason for hiding this comment

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

Suggestions around error messaging.

pkg/api/kptfile/v1alpha2/validation.go Outdated Show resolved Hide resolved
pkg/api/kptfile/v1alpha2/validation.go Outdated Show resolved Hide resolved
pkg/api/kptfile/v1alpha2/validation.go Outdated Show resolved Hide resolved
thirdparty/kyaml/runfn/runfn.go Outdated Show resolved Hide resolved
pkg/api/kptfile/v1alpha2/validation.go Outdated Show resolved Hide resolved
pkg/api/kptfile/v1alpha2/validation.go Outdated Show resolved Hide resolved
pkg/api/kptfile/v1alpha2/validation.go Outdated Show resolved Hide resolved
@natasha41575 natasha41575 requested a review from droot June 3, 2021 18:49
@natasha41575
Copy link
Contributor Author

@Shell32-Natsu please take a look when you can, thanks!

@natasha41575 natasha41575 merged commit 179a7c7 into kptdev:next Jun 4, 2021
@natasha41575 natasha41575 deleted the functionConfigs branch June 4, 2021 18:16
# limitations under the License.

testType: eval
image: gcr.io/kpt-fn/set-namespace:v0.1
Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't use non-concrete tag like unstable or v0.1 if it's possible. Use full version v0.1.x in kpt e2e test. So we will not suffer from break changes in function.

Copy link
Contributor

Choose a reason for hiding this comment

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

@mengqiy Why are we overwriting 0.1 tags? That may have been OK earlier, but going forward 0.1 should not be treated special (otherwise what's the difference between unstable and v0.1?), and the versioning scheme should apply to it. Using 0.1 should be fine in order to pick up patch releases if needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

We had an issue about breaking change in v0.1 in past a few weeks. 0.1 should be stable but for kpt e2e test I think we should pin to a specific version of function.

Copy link
Contributor

Choose a reason for hiding this comment

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

We should dogfood the versioning scheme we're promising our users. If we're telling them v0.1 is floating to pick up only patches, then we want to feel the pain if it breaks. Otherwise, our e2e is stable, but the user's workflow are broken. Which is worse?

Copy link
Contributor

Choose a reason for hiding this comment

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

That makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants