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

Rework Ginkgo usage #9522

Merged
merged 5 commits into from
Feb 16, 2023
Merged

Rework Ginkgo usage #9522

merged 5 commits into from
Feb 16, 2023

Conversation

dud225
Copy link
Contributor

@dud225 dud225 commented Jan 18, 2023

Currently Ginkgo is launched multiple times with different options to
accomodate various use-cases. In particular, some specs needs to be run
sequentially because non-namespaced objects are created that conflicts with
concurent Helm deployments. However Ginkgo is able to handle such cases
natively, in particular specs that needs to be run sequentially are
supported (Serial spec).

This change marks the specs that needs to be run sequentially as Serial
specs and runs the whole test suite from a single Ginkgo invocation. As a
result, a single JUnit report is now generated.

As part of this change, the following controller error in the TopologyHints
test is fixed:

Error getting ConfigMap "$NAMESPACE/tcp-services": no object matching key
"$NAMESPACE/tcp-services" in local store

In addition, "go get" invocations are being replaced by "go install" because
the former performs changes in the go.sum and go.mod files.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 18, 2023
@k8s-ci-robot
Copy link
Contributor

@dud225: This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jan 18, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @dud225. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority labels Jan 18, 2023
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 18, 2023
Copy link
Member

@tao12345666333 tao12345666333 left a comment

Choose a reason for hiding this comment

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

Thanks, I'm going to trigger the test, but I haven't looked at the specific changes yet.

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 18, 2023
@@ -19,12 +20,7 @@ controller:
periodSeconds: 1
service:
type: NodePort
electionID: ingress-controller-leader
ingressClassResource:
Copy link
Contributor

Choose a reason for hiding this comment

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

any reason to remove this? IIRC on tests this may generate some conflict as multiple ingresses may try to reconcile it :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok I see you remove the charts after it. Maybe we should always remove charts and add this as part of AfterEach :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

any reason to remove this?

as this chart is expected to run alone (Serial), there is no need to disable the non-namespaced objects

Maybe we should always remove charts and add this as part of AfterEach :)

TBH I was thinking about it but finally forgo because that would slightly increase the execution time of the general case where the removal of the ns is enough.
But I'm still leaning towards this idea as this would help to not fall into the trap when the removal of the chart deployment is necessary. Let me know what you think.

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 just read your other comment where you approve the idea ;)

@rikatz
Copy link
Contributor

rikatz commented Jan 19, 2023

@dud225 this is an amazing change, thank you very much!! We really need a bunch on improvements on how we use ginkgo.

This one is approved to me, as soon as you can just answer about the uninstallChart as part of the AfterEach, if it does make sense, and if it does, push a new commit we can merge it.

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 19, 2023
@dud225
Copy link
Contributor Author

dud225 commented Jan 19, 2023

@dud225 this is an amazing change, thank you very much!! We really need a bunch on improvements on how we use ginkgo.

This one is approved to me, as soon as you can just answer about the uninstallChart as part of the AfterEach, if it does make sense, and if it does, push a new commit we can merge it.

Thanks for the compliment.
I've updated the test suite to clean out the Helm deployment systematically.

@longwuyuan
Copy link
Contributor

@dud225 Can you please check the failed CI
@rikatz hopefully we can merge this before the break

@dud225
Copy link
Contributor Author

dud225 commented Jan 20, 2023

Hello
to me it's a transient error with no relation whatsoever with the change:

Run actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7
Starting download for docker.tar.gz
Error: Unable to find any artifacts for the associated workflow

In addition there are different flavour of this particular job targetting the last Kubernetes versions which all running fine.
In any case I don't have the permission to launch again the failed job.

So I think that this PR can be merged.

@dud225 dud225 requested review from rikatz and removed request for ElvinEfendi January 30, 2023 08:09
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 1, 2023
Currently Ginkgo is launched multiple times with different options to
accomodate various use-cases. In particular, some specs needs to be run
sequentially because non-namespaced objects are created that conflicts
with concurent Helm deployments.
However Ginkgo is able to handle such cases natively, in particular
specs that needs to be run sequentially are supported (Serial spec).

This commit marks the specs that needs to be run sequentially as Serial
specs and runs the whole test suite from a single Ginkgo invocation. As
a result, a single JUnit report is now generated.

Signed-off-by: Hervé Werner <[email protected]>
Error getting ConfigMap "$NAMESPACE/tcp-services": no object matching key "$NAMESPACE/tcp-services" in local store

Signed-off-by: Hervé Werner <[email protected]>
Executing "go get" changes the go.mod & go.sum files which is not the
case of "go install".

Signed-off-by: Hervé Werner <[email protected]>
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 1, 2023
@rikatz
Copy link
Contributor

rikatz commented Feb 16, 2023

/lgtm
/approve
Thank you

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 16, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dud225, rikatz

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants