Skip to content

Conversation

@cobalt-github-releaser-bot
Copy link
Collaborator

Refer to the original PR: #8701

CI: Add Smoke Tests for Raspberry Pi and RDK

This change enables the execution of smoke tests for Raspberry Pi (raspi) and RDK platforms. It integrates these tests into the existing internal_tests GitHub Action workflow. Configuration for these platforms has been updated in the respective JSON files. The on_device_tests_gateway_client.py script has been modified to support these tests.

Bug: 470180018

CI: Add Smoke Tests for Raspberry Pi and RDK

This change enables the execution of smoke tests for Raspberry Pi
(raspi) and RDK platforms. It integrates these tests into the existing
internal_tests GitHub Action workflow. Configuration for these platforms
has been updated in the respective JSON files. The
on_device_tests_gateway_client.py script has been modified to support
these tests.

Bug: 470180018

---------

Co-authored-by: Eric Zhang <ericquinzhang@google.com>
(cherry picked from commit fa9672c)
@cobalt-github-releaser-bot
Copy link
Collaborator Author

MERGE CONFLICT CAT

Caution

There were merge conflicts while cherry picking! Check out cherry-pick-26.eap-8701 and fix the conflicts before proceeding. Check the log at https://github.com/youtube/cobalt/actions/runs/21836044105 for details.

@github-actions
Copy link

🤖 Gemini Suggested Commit Message


ci: Enable smoke tests for Raspberry Pi and RDK

Integrate smoke tests for Raspberry Pi (raspi) and RDK platforms
into the existing internal_tests GitHub Action workflow.

This change updates the respective platform configuration JSON files
(.github/config/*.json) to define E2E smoke test targets for these
devices. It also modifies the on_device_tests_gateway_client.py script
to correctly handle artifact paths and device family parameters for
these new on-device test executions.

The goal is to extend continuous integration coverage to these critical
platforms, ensuring basic application stability.

Bug: 470180018

💡 Pro Tips for a Better Commit Message:

  1. Influence the Result: Want to change the output? You can write custom prompts or instructions directly in the Pull Request description. The model uses that text to generate the message.
  2. Re-run the Generator: Post a comment with: /generate-commit-message

@isarkis isarkis marked this pull request as ready for review February 10, 2026 18:37
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request cherry-picks changes to add smoke tests for Raspberry Pi and RDK platforms, involving updates to GitHub Actions workflows, platform configurations, and the test gateway client script. A critical security concern has been identified: a potential command injection vulnerability in the .github/actions/e2e_tests/action.yaml file. This vulnerability arises from the direct interpolation of GitHub Actions expressions into a bash script within a run block, and recommendations have been provided to mitigate this by using environment variables. Additionally, two significant functional issues require attention: a critical issue in on_device_tests_gateway_client.py where the new artifact path construction logic is likely to break existing E2E tests for all platforms other than RDK and Raspberry Pi, and a high severity issue in the Raspberry Pi configuration (evergreen-arm-hardfp-raspi.json) where E2E tests appear to be disabled, which contradicts the PR's objective.

Comment on lines +259 to +261
else:
bigstore_path = f'/bigstore/{args.cobalt_path}/{args.artifact_name}'
files.append(f'cobalt_path={bigstore_path}')
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

The logic for constructing bigstore_path for non-raspi/rdk platforms appears to be incorrect due to a related change in .github/actions/e2e_tests/action.yaml.

The GCS_ARTIFACTS_PATH environment variable is now set to .../${{ matrix.platform }}/${{ matrix.platform }}_qa. This code then constructs bigstore_path as /bigstore/{args.cobalt_path}/{args.artifact_name}, resulting in a path with an extra /${{ matrix.platform }}_qa segment: /bigstore/.../${{ matrix.platform }}/${{ matrix.platform }}_qa/${args.artifact_name}.

This will likely break E2E tests for all existing platforms (e.g., Android) as the artifact path will be incorrect. The original path was /bigstore/.../${{ matrix.platform }}/${args.artifact_name}.

Please revise the path construction logic to ensure it works for all platforms.

Comment on lines +82 to +83
--artifact_name '${{ inputs.artifact_name }}' \
--device_family '${{ inputs.test_device_family }}' \
Copy link
Contributor

Choose a reason for hiding this comment

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

security-high high

Using GitHub Actions expressions ${{ ... }} directly in a run block is a security risk. If the input contains shell metacharacters (like single quotes or semicolons), it can lead to command injection. To remediate this, pass the inputs as environment variables to the step and use the environment variables in the shell script.

Note: You should also add these variables to the env section of this step:

        ARTIFACT_NAME: ${{ inputs.artifact_name }}
        DEVICE_FAMILY: ${{ inputs.test_device_family }}
          --artifact_name "$ARTIFACT_NAME" \
          --device_family "$DEVICE_FAMILY" \

- name: Run Tests on ${{ matrix.platform }} Platform
env:
GCS_ARTIFACTS_PATH: /bigstore/${{ env.PROJECT_NAME }}-test-artifacts/${{ github.workflow }}/${{ github.run_number }}/${{ matrix.platform }}/${{ inputs.artifact_name }}
GCS_ARTIFACTS_PATH: ${{ env.PROJECT_NAME }}-test-artifacts/${{ github.workflow }}/${{ github.run_number }}/${{ matrix.platform }}/${{ matrix.platform }}_qa
Copy link
Contributor

Choose a reason for hiding this comment

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

security-high high

To safely handle the new inputs in the run block and prevent command injection, they should be mapped to environment variables here.

        GCS_ARTIFACTS_PATH: ${{ env.PROJECT_NAME }}-test-artifacts/${{ github.workflow }}/${{ github.run_number }}/${{ matrix.platform }}/${{ matrix.platform }}_qa
        ARTIFACT_NAME: ${{ inputs.artifact_name }}
        DEVICE_FAMILY: ${{ inputs.test_device_family }}

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