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

test/kokoro: Add bootstrap generator test into Go Kokoro script #6463

Merged
merged 6 commits into from
Aug 1, 2023

Conversation

zasweq
Copy link
Contributor

@zasweq zasweq commented Jul 20, 2023

This PR adds the bootstrap generator test into Go kokoro script.

RELEASE NOTES: N/A

@zasweq zasweq added this to the 1.57 Release milestone Jul 20, 2023
@zasweq zasweq requested a review from easwars July 20, 2023 16:47
@@ -167,6 +167,7 @@ main() {
"outlier_detection_test"
"remove_neg_test"
"round_robin_test"
"bootstrap_generator_test"
Copy link
Member

Choose a reason for hiding this comment

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

We need to figure out the logic on only including this when the branch under test is master. See an example here: https://github.com/grpc/grpc/blob/5b46c8bdbad733fa74ddf07c5b6fa3c9a600dbb9/tools/internal_ci/linux/grpc_xds_k8s_xlang.sh#L59-L62

You kinda need to do the opposite - add the bootstrap_generator_test to the list of tests only if $TESTING_VERSION is `master.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

)
if [ "${TESTING_VERSION}" != "master" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

We need the opposite: only add it when the version IS master

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops, sorry, missed that.

)
if [ "${TESTING_VERSION}" != "master" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, interesting, changed. Noted for future.

@sergiitk
Copy link
Member

Test run:

@easwars
Copy link
Contributor

easwars commented Jul 21, 2023

I don't know enough about this script. Since you will probably need an approver from one of the maintainers, I will approve once @sergiitk approves. Thanks.

@easwars easwars assigned sergiitk and zasweq and unassigned easwars Jul 21, 2023
@sergiitk
Copy link
Member

Hm, something didn't work with the test run. It didn't run the bootstrap_generator_test.
@zasweq - could you please add set -x before the test_suites=( line so we can debug this?

@zasweq
Copy link
Contributor Author

zasweq commented Jul 24, 2023

Screenshot 2023-07-24 at 12 19 14 PM

@zasweq
Copy link
Contributor Author

zasweq commented Jul 24, 2023

From your invocation, I see the that outlier detection test passed, and did not "not run"? Am I missing something?

@zasweq
Copy link
Contributor Author

zasweq commented Jul 24, 2023

@sergiitk
Copy link
Member

@zasweq https://source.cloud.google.com/results/invocations/11ca23e1-e69c-4d16-b781-8c146ba9e88b/targets

There's no bootstrap_generator_test in the list of passed tests.

@sergiitk
Copy link
Member

New test run with debugging enabled:

@@ -168,6 +169,9 @@ main() {
"remove_neg_test"
"round_robin_test"
)
if [[ "${TESTING_VERSION}" == "master" ]]; then
Copy link
Member

@sergiitk sergiitk Jul 24, 2023

Choose a reason for hiding this comment

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

Ah, that's on me. This would've worked when merged. The reason the test wasn't running is for manual test run we set TESTING_VERSION to dev-master, and not master.

This should take care of it:

Suggested change
if [[ "${TESTING_VERSION}" == "master" ]]; then
if [[ "${TESTING_VERSION}" =~ "master" ]]; then

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@sergiitk
Copy link
Member

@sergiitk
Copy link
Member

Ok, now we see the test ran, and it failed

BootstrapGeneratorServerTest.test_baseline_in_server_with_bootstrap_version2 ('v0.12.0', 'gcr.io/grpc-testing/td-grpc-bootstrap:8765051ef3b742bc5cd20f16de078ae7547f2ba2')

Traceback (most recent call last):
  File "/tmp/tmp.6gukgbTRj6/grpc/tools/run_tests/xds_k8s_test_driver/venv/lib/python3.10/site-packages/absl/testing/parameterized.py", line 316, in bound_param_test
    return test_method(self, *testcase_params)
  File "/tmp/tmp.6gukgbTRj6/grpc/tools/run_tests/xds_k8s_test_driver/tests/bootstrap_generator_test.py", line 202, in test_baseline_in_server_with_bootstrap_version
    self.test_server = self.startTestServer(
  File "/tmp/tmp.6gukgbTRj6/grpc/tools/run_tests/xds_k8s_test_driver/framework/bootstrap_generator_testcase.py", line 143, in startTestServer
    test_server = server_runner.run(
  File "/tmp/tmp.6gukgbTRj6/grpc/tools/run_tests/xds_k8s_test_driver/framework/test_app/runners/k8s/k8s_xds_server_runner.py", line 212, in run
    pod = self._wait_pod_started(pod_name)
  File "/tmp/tmp.6gukgbTRj6/grpc/tools/run_tests/xds_k8s_test_driver/framework/test_app/runners/k8s/k8s_base_runner.py", line 552, in _wait_pod_started
    self.k8s_namespace.wait_for_pod_started(name, **kwargs)
  File "/tmp/tmp.6gukgbTRj6/grpc/tools/run_tests/xds_k8s_test_driver/framework/infrastructure/k8s.py", line 559, in wait_for_pod_started
    retryer(self.get_pod, pod_name)
  File "/tmp/tmp.6gukgbTRj6/grpc/tools/run_tests/xds_k8s_test_driver/venv/lib/python3.10/site-packages/tenacity/__init__.py", line 423, in __call__
    do = self.iter(retry_state=retry_state)
  File "/tmp/tmp.6gukgbTRj6/grpc/tools/run_tests/xds_k8s_test_driver/venv/lib/python3.10/site-packages/tenacity/__init__.py", line 369, in iter
    return self.retry_error_callback(retry_state=retry_state)
  File "/tmp/tmp.6gukgbTRj6/grpc/tools/run_tests/xds_k8s_test_driver/framework/helpers/retryers.py", line 141, in error_handler
    raise RetryError(
framework.helpers.retryers.RetryError: Retry error calling framework.infrastructure.k8s.KubernetesNamespace.get_pod: timeout 0:03:00 (h:mm:ss) exceeded. Check result callback returned False.

@sergiitk
Copy link
Member

sergiitk commented Jul 26, 2023

Target log provided extra info:

init_container_statuses:
- container_id: containerd://8ca568563b76cd48371ebbd040e2e467303a0cf19286dea46b2a88277796d2ad
  image: [gcr.io/grpc-testing/td-grpc-bootstrap:8765051ef3b742bc5cd20f16de078ae7547f2ba2](https://www.google.com/url?q=http://gcr.io/grpc-testing/td-grpc-bootstrap:8765051ef3b742bc5cd20f16de078ae7547f2ba2&sa=D)
  image_id: [gcr.io/grpc-testing/td-grpc-bootstrap@sha256:ea80ec66017c7bc2a661e2403d01e6689b9c0ef6110a892dfaa3a405ecdb3344](https://www.google.com/url?q=http://gcr.io/grpc-testing/td-grpc-bootstrap@sha256:ea80ec66017c7bc2a661e2403d01e6689b9c0ef6110a892dfaa3a405ecdb3344&sa=D)
  last_state:
    running: null
    terminated:
      container_id: containerd://8ca568563b76cd48371ebbd040e2e467303a0cf19286dea46b2a88277796d2ad
      exit_code: 2
      finished_at: 2023-07-25 23:54:05+00:00
      message: null
      reason: Error
      signal: null
      started_at: 2023-07-25 23:54:05+00:00
    waiting: null
  name: grpc-td-init
  ready: false
  restart_count: 5
  started: null
  state:
    running: null
    terminated: null
    waiting:
      message: back-off 2m40s restarting failed container=grpc-td-init pod=psm-grpc-server-d8d484ffd-vz9wr_psm-interop-server-20230725-2339-0d55u(84cdf144-9128-4feb-a66d-10a306b67d47)
      reason: CrashLoopBackOff

Image gcr.io/grpc-testing/td-grpc-bootstrap:8765051ef3b742bc5cd20f16de078ae7547f2ba2 failed.

@sergiitk
Copy link
Member

And here's the reason: https://cloudlogging.app.goo.gl/KiZ7U2zjhD1anVAP8

ERROR 2023-07-25T23:51:08.071335398Z flag provided but not defined: -node-metadata

@zasweq
Copy link
Contributor Author

zasweq commented Jul 26, 2023

It failing for server v.0.12.0 and v.0.11.0 locally (me and Richard found that error too), and also failed client v.0.14.0 (which might be a real bootstrap generator failure) 1/3 times locally with ErrorStartingTestClient, which Richard mentioned if the bootstrap generator fails than you fail that.

@easwars
Copy link
Contributor

easwars commented Jul 26, 2023

It failing for server v.0.12.0 and v.0.11.0 locally

The -node-metadata flag was added in v0.13.0 here. So, that failure is not surprising, but failing in v0.14.0 is mildly bothering.

@dfawley dfawley modified the milestones: 1.57 Release, 1.58 Release Jul 26, 2023
@zasweq
Copy link
Contributor Author

zasweq commented Jul 26, 2023

Failing due to that flag, test isn't cleaning up resources properly (url map) and a worrysome client failure on 14 that might be the bootstrap generator.

@sergiitk
Copy link
Member

@easwars easwars assigned zasweq and unassigned sergiitk Aug 1, 2023
@zasweq zasweq added fixit and removed fixit labels Aug 1, 2023
@zasweq zasweq closed this Aug 1, 2023
@zasweq zasweq reopened this Aug 1, 2023
@zasweq zasweq merged commit 8f496b2 into grpc:master Aug 1, 2023
1 check passed
yashykt added a commit to grpc/grpc that referenced this pull request Aug 7, 2023
Based on grpc/grpc-go#6463

<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants