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

KEP-2170: Strictly verify the CRD marker validation and defaulting in the integration testings #2304

Merged

Conversation

tenzen-y
Copy link
Member

@tenzen-y tenzen-y commented Oct 23, 2024

What this PR does / why we need it:
I refactored the CRD marker integration testing so that we could more strictly verify the expected behavior.
Additionally, I made the .spec.runtimeRef field as immutable field to reduce unexpected errors when actual Jobs are built.

Which issue(s) this PR fixes (optional, in Fixes #<issue number>, #<issue number>, ... format, will close the issue(s) when PR gets merged):
Fixes #2293
Relates to #2170

Checklist:

  • Docs included if any changes are user facing

@tenzen-y
Copy link
Member Author

/hold
/assign @kubeflow/wg-training-leads
/cc @akshaychitneni

Copy link

@tenzen-y: GitHub didn't allow me to request PR reviews from the following users: akshaychitneni.

Note that only kubeflow members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/hold
/assign @kubeflow/wg-training-leads
/cc @akshaychitneni

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@coveralls
Copy link

coveralls commented Oct 23, 2024

Pull Request Test Coverage Report for Build 11489327226

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 11482479049: 0.0%
Covered Lines: 77
Relevant Lines: 77

💛 - Coveralls

@tenzen-y tenzen-y force-pushed the v2-refactor-webhook-integration-test branch from d0f18be to 719a6f1 Compare October 23, 2024 22:46
Comment on lines +31 to +33
func BeForbiddenError() types.GomegaMatcher {
return BeAPIError(ForbiddenError)
}
Copy link
Member

Choose a reason for hiding this comment

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

When we could return this error ?

Copy link
Member Author

Choose a reason for hiding this comment

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

We will use this in webhook impl similar to

allErrs = append(allErrs, field.Forbidden(elasticNProcPerNodePath, fmt.Sprintf("must not be used with %s", nprocPerNodePath)))

Copy link
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

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

Thank you @tenzen-y
/lgtm
/approve

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andreyvelich

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tenzen-y
Copy link
Member Author

/hold cancel

@google-oss-prow google-oss-prow bot merged commit a655a90 into kubeflow:master Oct 24, 2024
41 checks passed
@tenzen-y tenzen-y deleted the v2-refactor-webhook-integration-test branch October 24, 2024 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add strict validation on error messages in tests for v2 APIs
3 participants