Skip to content

Enables E2E testing#39

Merged
jeffcarp merged 8 commits intomainfrom
test/e2e
Feb 24, 2026
Merged

Enables E2E testing#39
jeffcarp merged 8 commits intomainfrom
test/e2e

Conversation

@JyotinderSingh
Copy link
Collaborator

@JyotinderSingh JyotinderSingh commented Feb 23, 2026

Fixes: #4
This PR introduces an end-to-end testing workflow using GitHub Actions, adds a CPU execution test suite, and improves how remote execution errors are propagated back to the user.

Details

  • Adds an E2E testing workflow (e2e-tests.yaml): Automates tests against real GCP infrastructure. It runs on workflow_dispatch or when a PR is labeled with run-e2e (which is automatically removed after triggering).
  • Improves remote error handling (execution.py): The backend now attempts to download the result payload even if a remote job fails. This ensures that user-raised exceptions captured by the runner are bubbled up to the local client, rather than being masked by generic infrastructure errors.
  • Adds CPU E2E tests (cpu_execution_test.py): Introduces a test suite to validate core functionality on CPU accelerators, covering basic execution, complex return types, exception propagation, and environment variable capture.
  • Cleans up utilities (e2e_utils.py): Removes the unused get_gcp_project helper function.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @JyotinderSingh, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new suite of end-to-end tests designed to verify the functionality of remote function execution using CPU accelerators. These tests ensure that keras_remote functions behave as expected across different scenarios, including data serialization, error propagation, and environment variable handling, thereby improving the reliability of the remote execution framework.

Highlights

  • New E2E Test Suite: Introduced a new end-to-end test file, cpu_execution_test.py, to validate remote function execution on CPU accelerators. This suite covers various scenarios including simple function calls, complex return types, remote exception handling, environment variable propagation, and functions with diverse arguments.
  • Remote Execution Validation: The new tests specifically verify the keras_remote.run decorator's behavior when targeting CPU accelerators, ensuring correct serialization, deserialization, and execution of functions and their results in a remote environment.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • tests/e2e/cpu_execution_test.py
    • Added a new E2E test file for CPU remote execution.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/e2e-tests.yaml
Activity
  • No specific activity or comments have been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@JyotinderSingh JyotinderSingh added run-e2e Runs End-to-End tests on Internal Cluster. and removed run-e2e Runs End-to-End tests on Internal Cluster. labels Feb 23, 2026
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 introduces end-to-end tests for remote execution on CPU accelerators. The tests cover several key scenarios, including simple function execution, handling of complex return types, exception propagation, environment variable forwarding, and argument passing. The code is well-structured and provides good coverage for the basic CPU execution workflow. I have one minor suggestion to improve code clarity by removing an unused variable.

@JyotinderSingh JyotinderSingh added run-e2e Runs End-to-End tests on Internal Cluster. and removed run-e2e Runs End-to-End tests on Internal Cluster. labels Feb 23, 2026
E2E tests verify full remote execution on a real GKE cluster:
- Simple function, complex return types, exception propagation
- Env var capture, args/kwargs passthrough
- Skipped unless E2E_TESTS=1 is set

Workflow triggers on workflow_dispatch or 'run-e2e' PR label,
authenticates via Workload Identity Federation.
@JyotinderSingh JyotinderSingh added run-e2e Runs End-to-End tests on Internal Cluster. and removed run-e2e Runs End-to-End tests on Internal Cluster. labels Feb 23, 2026
@github-actions github-actions bot removed the run-e2e Runs End-to-End tests on Internal Cluster. label Feb 23, 2026
@JyotinderSingh JyotinderSingh marked this pull request as ready for review February 23, 2026 19:58
@divyashreepathihalli divyashreepathihalli added the run-e2e Runs End-to-End tests on Internal Cluster. label Feb 24, 2026
@github-actions github-actions bot removed the run-e2e Runs End-to-End tests on Internal Cluster. label Feb 24, 2026
@jeffcarp jeffcarp merged commit 18aebdb into main Feb 24, 2026
6 checks passed
@JyotinderSingh JyotinderSingh deleted the test/e2e branch February 25, 2026 06:30
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.

Add an e2e test

3 participants