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

e2e: nodeselector in apiserversauce #7627

Merged
merged 22 commits into from
Feb 8, 2024
Merged

Conversation

sadath-12
Copy link
Contributor

Fixes #7615

Proposed Changes

Added e2e test to make sure nodeselector is picked in apiserversauce deployment correctly from featureFlags

Pre-review Checklist

  • At least 80% unit test coverage
  • E2E tests for any new behavior
  • Docs PR for any user-facing impact
  • Spec PR for any new API feature
  • Conformance test for any change to the spec

Release Note


Docs

@knative-prow knative-prow bot added the area/test-and-release Test infrastructure, tests or release label Jan 24, 2024
Copy link

knative-prow bot commented Jan 24, 2024

Hi @sadath-12. Thanks for your PR.

I'm waiting for a knative 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.

@knative-prow knative-prow bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 24, 2024
Copy link
Member

@Cali0707 Cali0707 left a comment

Choose a reason for hiding this comment

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

Hi @sadath-12, we are moving away from the older style e2e tests to the new rekt tests in eventing. Would you be able to re-write this in the rekt folder as outlined in the issue? For more info on how rekt tests work, take a look at how the tests were added in this commit: 74e165a#diff-942d2d7cd8e70afcaacfa78fd686671629c18c3708a35721aa08f59f9876692f, as well as look at the reconciler-test repo.

@sadath-12
Copy link
Contributor Author

sadath-12 commented Jan 25, 2024

thanks @Cali0707 .

Copy link

codecov bot commented Jan 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (bcba98a) 74.44% compared to head (3f12974) 74.01%.
Report is 17 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7627      +/-   ##
==========================================
- Coverage   74.44%   74.01%   -0.44%     
==========================================
  Files         262      262              
  Lines       15077    15172      +95     
==========================================
+ Hits        11224    11229       +5     
- Misses       3247     3337      +90     
  Partials      606      606              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 26, 2024
Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 26, 2024
Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
@sadath-12
Copy link
Contributor Author

thank you @Cali0707 . The CI are quite flaky and it would be difficult to find our tests so I'm providing the output I got from my machine to confirm it works

sadath@sadath:~/go/src/s-evet$ ./hack/e2e-debug.sh TestApiServerSourceDeployement ./test/rekt
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
=================================================
==== WAITING FOR KNATIVE EVENTING TO COME UP ====
=================================================
Waiting until all pods in namespace knative-eventing are up
All pods are up:
eventing-controller-7755457b98-qbz8h     1/1   Running   1 (8m48s ago)   3h9m
eventing-webhook-58d59fb8f8-hlxcn        1/1   Running   1 (8m48s ago)   3h9m
pingsource-mt-adapter-69cb946cfc-2qn4h   1/1   Running   0               62s
=======================
==== RUNNING TESTS ====
=======================
Running go test with args: -tags=e2e -count=1 -race -timeout=30m -run=TestApiServerSourceDeployement ./test/rekt
PASS test/rekt.TestApiServerSourceDeployement/deploy/Prerequisite (0.00s)
PASS test/rekt.TestApiServerSourceDeployement/deploy/Setup/install_ApiServerSource (21.24s)
PASS test/rekt.TestApiServerSourceDeployement/deploy/Setup/Create_Service_Account_for_ApiServerSource_with_RBAC_for_sources.knative.dev/v1_PingSources (21.83s)
PASS test/rekt.TestApiServerSourceDeployement/deploy/Setup/ApiServerSource_goes_ready (25.02s)
PASS test/rekt.TestApiServerSourceDeployement/deploy/Setup/install_sink (42.90s)
PASS test/rekt.TestApiServerSourceDeployement/deploy/Setup (0.00s)
PASS test/rekt.TestApiServerSourceDeployement/deploy/Requirement/setup_config-features_and_load_into_context (0.00s)
PASS test/rekt.TestApiServerSourceDeployement/deploy/Requirement/setup_node_labels (0.02s)
PASS test/rekt.TestApiServerSourceDeployement/deploy/Requirement (0.00s)
PASS test/rekt.TestApiServerSourceDeployement/deploy/Assert/ApiServerSauce_using_nodeSelector_must_use_it_from_config-features (0.01s)
PASS test/rekt.TestApiServerSourceDeployement/deploy/Assert (0.00s)
PASS test/rekt.TestApiServerSourceDeployement/deploy/Teardown (0.00s)
PASS test/rekt.TestApiServerSourceDeployement/deploy (42.94s)
PASS test/rekt.TestApiServerSourceDeployement (48.37s)
PASS test/rekt

DONE 14 tests in 56.226s
Finished run, return code is 0
XML report written to /tmp/knative.lK4pvNrh/tmp.gL5dCNGpxO/junit_SyxcLIQW.xml
Test log (JSONL) written to /tmp/knative.lK4pvNrh/tmp.gL5dCNGpxO/go_test_SyxcLIQW.jsonl
Test log (ANSI) written to /tmp/knative.lK4pvNrh/tmp.gL5dCNGpxO/go_test_SyxcLIQW-ansi.log
Test log (HTML) written to /tmp/knative.lK4pvNrh/tmp.gL5dCNGpxO/go_test_SyxcLIQW.html

Copy link
Member

@Cali0707 Cali0707 left a comment

Choose a reason for hiding this comment

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

Thanks for your work on this so far @sadath-12

One thing to note about reconciler-tests is that the tests run multiple step functions concurrently in each phase. So everything in f.Setup() runs concurrently, and they will all finish before anything in f.Requirement() runs.

So, to make sure something happens before something else, you need to put them into different phases

test/rekt/features/apiserversource/data_plane.go Outdated Show resolved Hide resolved
test/rekt/features/apiserversource/data_plane.go Outdated Show resolved Hide resolved
test/rekt/resources/configmap/configmap.go Outdated Show resolved Hide resolved
test/rekt/features/apiserversource/data_plane.go Outdated Show resolved Hide resolved
test/rekt/features/apiserversource/data_plane.go Outdated Show resolved Hide resolved
test/rekt/apiserversource_test.go Outdated Show resolved Hide resolved
Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
@sadath-12
Copy link
Contributor Author

@Cali0707 any updates ?

Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
@Cali0707
Copy link
Member

Cali0707 commented Feb 1, 2024

/ok-to-test

@knative-prow knative-prow bot 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 Feb 1, 2024
@pierDipi
Copy link
Member

pierDipi commented Feb 1, 2024

/cc

@knative-prow knative-prow bot requested a review from pierDipi February 1, 2024 16:32
Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
Copy link
Member

@Cali0707 Cali0707 left a comment

Choose a reason for hiding this comment

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

Thanks for all the work on this @sadath-12

Just a few nits and then I think it will be good to merge

test/rekt/apiserversource_test.go Outdated Show resolved Hide resolved
test/rekt/features/apiserversource/data_plane.go Outdated Show resolved Hide resolved
test/rekt/features/apiserversource/data_plane.go Outdated Show resolved Hide resolved
Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
@sadath-12
Copy link
Contributor Author

Thank you @Cali0707

Copy link
Member

@Cali0707 Cali0707 left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Thanks for your work on this @sadath-12 !

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Feb 8, 2024
Copy link

knative-prow bot commented Feb 8, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Cali0707, sadath-12

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

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 8, 2024
@knative-prow knative-prow bot merged commit bcb6100 into knative:main Feb 8, 2024
36 of 39 checks passed
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. area/test-and-release Test infrastructure, tests or release lgtm Indicates that a PR is ready to be merged. 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.

Add e2e test for ApiServerSource node selector
5 participants