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

mobile: Fix the flaky SendDataTest Kotlin test #33230

Merged
merged 2 commits into from
Apr 1, 2024

Conversation

abeyad
Copy link
Contributor

@abeyad abeyad commented Mar 30, 2024

The test failed when adding the native Assertion filter, with an error from loadFromYaml:

INVALID_ARGUMENT: could not find @type 'type.googleapis.com/envoymobile.extensions.filters.http.assertion.Assertion

The failure was reproduced locally with:

./bazelw test --cache_test_results=no --test_output=streamed --config=mobile-test-android //test/kotlin/integration:send_data_test 

After running git bisect, it turns out the bad commit came from #33169. That PR introduces HttpTestServer to the SendDataTest.kt, which causes the required proto types to not get loaded.

In this commit, the test is fixed by using a TestRemoteResponse filter, similar to the other Kotlin tests (e.g. SendTrailersTest). However, we need to figure out why the config filter protos aren't loading when creating the HttpTestServer.

The test failed when adding the native Assertion filter, with an error
from loadFromYaml: INVALID_ARGUMENT: could not find @type
'type.googleapis.com/envoymobile.extensions.filters.http.assertion.Assertion

After running git bisect, it turns out the bad commit came from
envoyproxy#33169. That PR introduces
HttpTestServer to the SendDataTest.kt, which causes the required proto
types to not get loaded.

In this commit, the test is fixed by using a TestRemoteResponse filter,
similar to the other Kotlin tests (e.g. SendTrailersTest). However, we
need to figure out why the config filter protos aren't loading when
creating the HttpTestServer.

Signed-off-by: Ali Beyad <abeyad@google.com>
Signed-off-by: Ali Beyad <abeyad@google.com>
@abeyad abeyad changed the title mobile: Fix the flaky SendDataTest mobile: Fix the flaky SendDataTest Kotlin test Mar 31, 2024
@abeyad abeyad disabled auto-merge March 31, 2024 01:24
@abeyad abeyad enabled auto-merge (squash) March 31, 2024 01:24
@soulxu
Copy link
Member

soulxu commented Apr 1, 2024

/assign @fredyw

@abeyad
Copy link
Contributor Author

abeyad commented Apr 1, 2024

/assign @RyanTheOptimist

@abeyad abeyad merged commit a6d0d5c into envoyproxy:main Apr 1, 2024
35 checks passed
@abeyad abeyad deleted the send_data_test branch April 1, 2024 17:13
fredyw added a commit that referenced this pull request Apr 2, 2024
This PR fixes the JNI test server BUILD files by not depending on //library/jni:envoy_jni_lib but making it depend on //@envoy/test/test_common:test_version_linkstamp that can generate the build_scm_revision and build_scm_status constants.

This PR also fixes the issue raised in #33230 but the fix in #33230 to use TestRemoteResponse is more correct and also more consistent with the other tests, so this PR simply removes the TODO instead of reverting the PR. I tested this by reverting the PR and running ./bazelw test --cache_test_results=no --test_output=streamed --config=mobile-test-android //test/kotlin/integration:send_data_test with and without this fix. Although, I still can't fully figure out why this PR fixes the issue, I suspect it is because it no longer depends on //library/jni:envoy_jni_lib, which indirectly depends on //library/cc:engine_builder_lib.

Risk Level: low
Testing: CI
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Fredy Wijaya <fredyw@google.com>
alyssawilk pushed a commit to alyssawilk/envoy that referenced this pull request Apr 29, 2024
The test failed when adding the native Assertion filter, with an error
from loadFromYaml: INVALID_ARGUMENT: could not find @type
'type.googleapis.com/envoymobile.extensions.filters.http.assertion.Assertion

After running git bisect, it turns out the bad commit came from
envoyproxy#33169. That PR introduces
HttpTestServer to the SendDataTest.kt, which causes the required proto
types to not get loaded.

In this commit, the test is fixed by using a TestRemoteResponse filter,
similar to the other Kotlin tests (e.g. SendTrailersTest). However, we
need to figure out why the config filter protos aren't loading when
creating the HttpTestServer.

Signed-off-by: Ali Beyad <abeyad@google.com>
alyssawilk pushed a commit to alyssawilk/envoy that referenced this pull request Apr 29, 2024
This PR fixes the JNI test server BUILD files by not depending on //library/jni:envoy_jni_lib but making it depend on //@envoy/test/test_common:test_version_linkstamp that can generate the build_scm_revision and build_scm_status constants.

This PR also fixes the issue raised in envoyproxy#33230 but the fix in envoyproxy#33230 to use TestRemoteResponse is more correct and also more consistent with the other tests, so this PR simply removes the TODO instead of reverting the PR. I tested this by reverting the PR and running ./bazelw test --cache_test_results=no --test_output=streamed --config=mobile-test-android //test/kotlin/integration:send_data_test with and without this fix. Although, I still can't fully figure out why this PR fixes the issue, I suspect it is because it no longer depends on //library/jni:envoy_jni_lib, which indirectly depends on //library/cc:engine_builder_lib.

Risk Level: low
Testing: CI
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Fredy Wijaya <fredyw@google.com>
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