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

adding Gateway API conformance tests #60217

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lihongan
Copy link
Contributor

@lihongan lihongan commented Dec 30, 2024

Adding optional job for upstream gateway api conformance test

Copy link
Contributor

openshift-ci bot commented Dec 30, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 30, 2024
Copy link
Contributor

openshift-ci bot commented Dec 30, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lihongan
Once this PR has been reviewed and has the lgtm label, please assign gcs278 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@lihongan
Copy link
Contributor Author

/pj-rehearse

@openshift-ci-robot
Copy link
Contributor

@lihongan: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@lihongan lihongan force-pushed the add-gateway-conformance-test branch from 048819e to a4c01aa Compare December 30, 2024 12:28
@lihongan
Copy link
Contributor Author

/pj-rehearse

@openshift-ci-robot
Copy link
Contributor

@lihongan: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@lihongan lihongan force-pushed the add-gateway-conformance-test branch from a4c01aa to 7057f42 Compare December 31, 2024 03:19
@lihongan
Copy link
Contributor Author

/pj-rehearse

@openshift-ci-robot
Copy link
Contributor

@lihongan: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@lihongan lihongan force-pushed the add-gateway-conformance-test branch from 7057f42 to c48bf24 Compare December 31, 2024 05:16
@lihongan
Copy link
Contributor Author

/pj-rehearse

@openshift-ci-robot
Copy link
Contributor

@lihongan: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@lihongan lihongan force-pushed the add-gateway-conformance-test branch from c48bf24 to 8fdbacc Compare December 31, 2024 07:09
@lihongan
Copy link
Contributor Author

/pj-rehearse

@openshift-ci-robot
Copy link
Contributor

@lihongan: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@lihongan lihongan force-pushed the add-gateway-conformance-test branch from 8fdbacc to 00ad76a Compare December 31, 2024 09:17
@lihongan
Copy link
Contributor Author

/pj-rehearse

@openshift-ci-robot
Copy link
Contributor

@lihongan: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@lihongan lihongan force-pushed the add-gateway-conformance-test branch from 00ad76a to 7fe2037 Compare December 31, 2024 11:44
@lihongan
Copy link
Contributor Author

/pj-rehearse

@openshift-ci-robot
Copy link
Contributor

@lihongan: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@lihongan lihongan force-pushed the add-gateway-conformance-test branch from 7fe2037 to bad1a28 Compare December 31, 2024 13:55
@lihongan
Copy link
Contributor Author

/pj-rehearse

@openshift-ci-robot
Copy link
Contributor

@lihongan: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@lihongan lihongan force-pushed the add-gateway-conformance-test branch from bad1a28 to cd9209c Compare January 2, 2025 04:20
@lihongan
Copy link
Contributor Author

lihongan commented Jan 2, 2025

/pj-rehearse

@openshift-ci-robot
Copy link
Contributor

@lihongan: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci-robot
Copy link
Contributor

[REHEARSALNOTIFIER]
@lihongan: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-cluster-ingress-operator-master-e2e-aws-gatewayapi-conformance openshift/cluster-ingress-operator presubmit Presubmit changed
Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@lihongan lihongan marked this pull request as ready for review January 2, 2025 06:58
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 2, 2025
@openshift-ci openshift-ci bot requested review from candita and dgoodwin January 2, 2025 06:59
Copy link
Contributor

openshift-ci bot commented Jan 2, 2025

@lihongan: all tests passed!

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.


echo "Go version: $(go version)"
cd /go/src/github.com
mkdir kubernetes-sigs && cd kubernetes-sigs
Copy link
Contributor

Choose a reason for hiding this comment

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

Using && here means that the cd command won't run if the directory already exists or if the mkdir command fails for any other reason:

$ mkdir foo && cd foo
$ pwd
/home/mmasters/foo
$ cd ..
$ mkdir foo && cd foo
mkdir: cannot create directory ‘foo’: File exists
$ pwd
/home/mmasters
$ 

mkdir -p doesn't return an error if the directory already exists:

$ ls -d foo
foo
$ mkdir -p foo && cd foo
$ pwd
/home/mmasters/foo
$ 

So it is better to use mkdir -p to avoid an error if the directory already exists (I assume we want to use the existing directory in this case), and use a separate cd command so that a failing mkdir command causes the script to exit on error:

Suggested change
mkdir kubernetes-sigs && cd kubernetes-sigs
mkdir -p kubernetes-sigs
cd kubernetes-sigs

Comment on lines +152 to +153
FEATURE_GATES: '[GatewayAPI=true]'
FEATURE_SET: CustomNoUpgrade
Copy link
Contributor

Choose a reason for hiding this comment

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

We will need to update this once openshift/api#2081 merges (which we want to happen as soon as possible).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, once openshift/api#2081 merges we could just set FEATURE_SET: TechPreviewNoUpgrade.
And finally we will promote to GA in 4.19 right?

Comment on lines +10 to +11
# currently CRD v1.0.0 is supported
git clone --branch release-1.0 https://github.com/kubernetes-sigs/gateway-api
Copy link
Contributor

Choose a reason for hiding this comment

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

It is good that the CRD version is explicit. However, I wonder whether it would be better and practical to specify the version in the openshift/cluster-ingress-operator repository. We might eventually want to use this same job for multiple release branches with various CRD versions, and anyway, it would make version bumps easier if the CRD version for conformance tests and the CRD manifests were both in the same repository (namely openshift/cluster-ingress-operator).

If it isn't easy to read the CRD version from another repository, then we can leave this as a follow-up.

Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose the simplest thing would be to add a Makefile target in openshift/cluster-ingress-operator for running the conformance tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good suggestion, let me try if I can make it with Makefile.

@@ -143,6 +143,18 @@ tests:
requests:
cpu: 100m
workflow: ipi-aws
- always_run: false
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we remove the entry for e2e-aws-gatewayapi above? Doesn't this replace it?

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 don't think the conformance test can replace existing e2e-aws-gatewayapi, the conformance is to test the implementation matches the API specification, but implementation specific features will not be covered by it. For example, e2e-aws-gateway covers the OSSM and DNSRecord tests but conformance doesn't.
We could run conformance tests as part of our full e2e test suite. see https://gateway-api.sigs.k8s.io/concepts/conformance/#conformance

Copy link
Contributor

@candita candita Jan 3, 2025

Choose a reason for hiding this comment

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

Thanks. I misunderstood. Now I see the tests are completely different:

  • ref: ingress-gatewayapi-conf-gatewayclass refers to ci-operator/step-registry/ingress/gatewayapi/conf-gatewayclass/ingress-gatewayapi-conf-gatewayclass-ref.yaml
  • ref: ingress-gatewayapi-conformance-tests refers to ci-operator/step-registry/ingress/gatewayapi/conformance-tests/ingress-gatewayapi-conformance-tests-ref.yaml

This is a new pattern for us. Normally we make very few code additions here because we keep test code in the repo it is used in. I wonder what the benefit is to keep it in the step-registry?

Also, what will happen if the ingress-gateway-conf-gatewayclass fails - can we make this exit instead of running the next test that depends on it (ingress-gatewayapi-conformance-tests)?

If we keep the test code on the step-registry, please add lots of details in the commit message about what was needed in order to make this work.

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.

4 participants