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

Chrobalt on-device test work for Android #728

Open
wants to merge 14 commits into
base: feature/chrobalt_odt
Choose a base branch
from

Conversation

isarkis
Copy link
Member

@isarkis isarkis commented Dec 19, 2024

b/354062546

.github/actions/on_device_tests/action.yaml Show resolved Hide resolved
.github/workflows/main.yaml Show resolved Hide resolved
.github/workflows/main.yaml Show resolved Hide resolved
.github/workflows/main.yaml Show resolved Hide resolved
.github/workflows/main.yaml Show resolved Hide resolved
--token ${GITHUB_TOKEN} \
${DIMENSION:+"--dimension" "$DIMENSION"} \
${ON_DEVICE_TEST_ATTEMPTS:+"--test_attempts" "$ON_DEVICE_TEST_ATTEMPTS"} \
--archive_path "${GCS_PATH}/artifacts.tar" \
Copy link
Collaborator

Choose a reason for hiding this comment

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

This param is not used.

This comment was marked as outdated.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I was referring specifically to archive_path. This parameter is not used by in the ApkTests code path.

Copy link
Member Author

Choose a reason for hiding this comment

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

How are we going to pass GCS path to where APKs are stored? I think the intention is to use archive_path. Maybe @Libzu can confirm?

.github/actions/on_device_tests/action.yaml Outdated Show resolved Hide resolved
.github/actions/on_device_tests/action.yaml Outdated Show resolved Hide resolved
.github/actions/on_device_tests/action.yaml Show resolved Hide resolved
.github/actions/on_device_tests/action.yaml Outdated Show resolved Hide resolved
@Libzu Libzu requested a review from a team as a code owner December 20, 2024 23:37
@Libzu Libzu requested review from briantting and removed request for a team December 20, 2024 23:37
cobalt/testing/android-arm/base_unittests_filter.json Outdated Show resolved Hide resolved
}

// Working directory and command line arguments to be passed to the gateway.
message OnDeviceTestsCommand {
Copy link
Member Author

Choose a reason for hiding this comment

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

Do we want to remove unused parameters from this proto message?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, we're never going to use the client on main to trigger old Cobalt ODTs.

Copy link
Member Author

Choose a reason for hiding this comment

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

FYI @Libzu

]

# All test configs On-Device tests support
_TEST_CONFIGS = [
Copy link
Member Author

Choose a reason for hiding this comment

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

I wonder how this is used, I don't see this being referenced anywhere.

#'on-device-tests-gateway-service.on-device-tests.svc.cluster.local')
'localhost')
#_ON_DEVICE_TESTS_GATEWAY_SERVICE_PORT = '50052'
_ON_DEVICE_TESTS_GATEWAY_SERVICE_PORT = '12345'
Copy link
Member Author

Choose a reason for hiding this comment

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

Is this a left over from the local testing, I think the official port is 50052?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, this line should be reverted and the lines above uncommented.

run: |
echo "Nothing yet"
set -uxe
python3 -u tools/on_device_tests_gateway_client.py \
Copy link
Member Author

Choose a reason for hiding this comment

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

@oxve , I think some of the labels we removed (e.g. change number, pr number, etc.) might still be useful if we add them to each sponge invocation, WDYT?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agreed, we should add those back and handle them appropriately in the odt gateway.

Copy link
Member Author

Choose a reason for hiding this comment

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

@oxve , I went ahead and pushed d6d7c0a (#728). Can you see if that looks complete?

@Libzu , once argument list is finalized, we'll need to update odt gateway client.

.github/workflows/main.yaml Show resolved Hide resolved
platform_json_file_data = _read_json_config(platform_json_file)
gtest_device = platform_json_file_data["gtest_device"]
gtest_lab = platform_json_file_data["gtest_lab"]
gtest_blaze_target = "//experimental/cobalt/chrobalt_poc:custom_chrobalt_unit_tests_" + gtest_device
Copy link
Member Author

Choose a reason for hiding this comment

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

We would have to change that, see cl/708442211

Copy link

Choose a reason for hiding this comment

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

will do once cl/708442211 is submitted

gtest_device = platform_json_file_data["gtest_device"]
gtest_lab = platform_json_file_data["gtest_lab"]
gtest_blaze_target = "//experimental/cobalt/chrobalt_poc:custom_chrobalt_unit_tests_" + gtest_device
default_gtest_filters = "GURL*"
Copy link
Member Author

Choose a reason for hiding this comment

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

I think default should be * or we shouldn't set filter at all.

.github/actions/on_device_tests/action.yaml Outdated Show resolved Hide resolved
if failing_tests_string:
gtest_filters += ":-" + failing_tests_string
#print(f" gtest_filters = {gtest_filters}");
apk_test["apk_path"] = "/bigstore/yt-temp/" + gtest_target + "-debug.apk"
Copy link
Member Author

Choose a reason for hiding this comment

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

apk_path should be set from --archive_path.

Copy link

Choose a reason for hiding this comment

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

How would apk_path look for the following?:
--archive_path gs://cobalt-actions-prod-test-artifacts/android_25.lts.1+/1622/android-arm_devel/artifacts.tar

Copy link
Member Author

Choose a reason for hiding this comment

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

--archive_path /bigstore/cobalt-actions-prod-test-artifacts/android_25.lts.1+/1622/android-arm_devel/

shell: bash
- name: Run ${{ env.SHARD_NAME }} Tests on ${{ matrix.platform }} Platform

This comment was marked as resolved.

tools/on_device_tests_gateway_pb2.py Outdated Show resolved Hide resolved
tools/on_device_tests_gateway_pb2_grpc.py Outdated Show resolved Hide resolved
--token ${GITHUB_TOKEN} \
${DIMENSION:+"--dimension" "$DIMENSION"} \
${ON_DEVICE_TEST_ATTEMPTS:+"--test_attempts" "$ON_DEVICE_TEST_ATTEMPTS"} \
--archive_path "${GCS_PATH}/artifacts.tar" \

This comment was marked as outdated.

.github/actions/on_device_tests/action.yaml Show resolved Hide resolved
trigger \
shell: bash
- name: Download ${{ matrix.platform }} Test Results
if: always() && env.TEST_TYPE == 'unit_test'

This comment was marked as resolved.

--token ${GITHUB_TOKEN} \
${DIMENSION:+"--dimension" "$DIMENSION"} \
${ON_DEVICE_TEST_ATTEMPTS:+"--test_attempts" "$ON_DEVICE_TEST_ATTEMPTS"} \
--archive_path "${GCS_PATH}/artifacts.tar" \

This comment was marked as resolved.

}

// Working directory and command line arguments to be passed to the gateway.
message OnDeviceTestsCommand {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you remove the fields we're not going to use for chrobalt. Just keep the numbers on the fields we are using the same.

Copy link
Member Author

Choose a reason for hiding this comment

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

FYI @Libzu

_WORK_DIR = '/on_device_tests_gateway'
_ON_DEVICE_TESTS_GATEWAY_SERVICE_HOST = (
#'on-device-tests-gateway-service.on-device-tests.svc.cluster.local')
'localhost')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Revert

This comment was marked as resolved.

This comment was marked as resolved.

.github/workflows/main.yaml Show resolved Hide resolved
.github/workflows/main.yaml Show resolved Hide resolved
}

// Working directory and command line arguments to be passed to the gateway.
message OnDeviceTestsCommand {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, we're never going to use the client on main to trigger old Cobalt ODTs.

failing_tests_string = ":".join(failing_tests_list)
#passing_tests_string = ":".join(passing_tests_list)
#if passing_tests_string:
# gtest_filters += ":" + passing_tests_string
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove commented out code?

print(f" gtest_filters = {gtest_filters}");

#apk_test["apk_path"] = "/bigstore/yt-temp/" + gtest_target + "-debug.apk"
apk_test["apk_path"] = "/bigstore/yt-temp/base_unittests-debug.apk"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add a TODO?

tools/on_device_tests_gateway_client.py Outdated Show resolved Hide resolved
shell: bash
- name: Generate gRPC files
run: |
python -m grpc_tools.protoc -Itools/ --python_out=cobalt/tools/ --grpc_python_out=cobalt/tools/ cobalt/tools/on_device_tests_gateway.proto
Copy link
Member Author

Choose a reason for hiding this comment

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

I am not sure if this relative path is correct, the absolute path is ${GITHUB_WORKSPACE}/src/cobalt/tools

Copy link
Collaborator

Choose a reason for hiding this comment

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

+1 to using absolute path here

@@ -21,6 +21,8 @@
"sql_unittests",
"url_unittests"
],
"gtest_device": "sabrina",
"gtest_lab": "maneki",
Copy link
Collaborator

Choose a reason for hiding this comment

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

These should be nested under a test_dimensions key.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added test_dimension key, @Libzu please make a note of it.

.github/workflows/main.yaml Show resolved Hide resolved
@isarkis isarkis force-pushed the feature/chrobalt_odt branch from 456d4de to 8824e29 Compare January 10, 2025 00:03
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.

3 participants