Skip to content

feat: skip E2E tests for dependency update commits#710

Merged
eliasecchig merged 1 commit intomainfrom
feat/skip-e2e-for-dependabot
Jan 19, 2026
Merged

feat: skip E2E tests for dependency update commits#710
eliasecchig merged 1 commit intomainfrom
feat/skip-e2e-for-dependabot

Conversation

@eliasecchig
Copy link
Collaborator

Summary

  • Skip E2E and Gemini Enterprise tests when commit message starts with build(deps)
  • Uses Cloud Build payload binding to pass commit message as substitution variable
  • Reduces unnecessary CI costs for Dependabot PRs

Changes

  • Add _COMMIT_MESSAGE = "$(push.head_commit.message)" substitution to E2E triggers
  • Update test_e2e.yaml to check commit message and skip if dependency update
  • Update test_gemini_enterprise.yaml with same skip logic

- Add _COMMIT_MESSAGE substitution to E2E triggers using payload binding
- Skip E2E and Gemini Enterprise tests when commit starts with build(deps)
- Reduces unnecessary CI costs for Dependabot PRs
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @eliasecchig, 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 an efficiency improvement to the CI/CD pipeline by enabling conditional skipping of End-to-End (E2E) and Gemini Enterprise tests. Specifically, if a commit message begins with 'build(deps)', indicating an automated dependency update, the associated test stages will be bypassed. This optimization is achieved by integrating the commit message as a build substitution variable and implementing skip logic within the Cloud Build configurations, ultimately leading to reduced CI costs and faster feedback cycles for relevant changes.

Highlights

  • Conditional Test Skipping: Implemented logic to skip End-to-End (E2E) and Gemini Enterprise tests for commits with messages starting with 'build(deps)', primarily targeting automated dependency updates from tools like Dependabot.
  • Commit Message Integration: Utilized Cloud Build's payload binding to pass the commit message as a substitution variable (_COMMIT_MESSAGE) into the build steps, enabling dynamic conditional execution.
  • CI Cost Optimization: The primary goal of these changes is to reduce unnecessary CI execution costs and improve pipeline efficiency by avoiding full test runs for non-functional dependency updates.
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.

@eliasecchig eliasecchig merged commit 5c8917c into main Jan 19, 2026
34 checks passed
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 a useful optimization to skip E2E and Gemini Enterprise tests for dependency update commits, which will help reduce CI costs. The implementation correctly uses Cloud Build payload bindings to get the commit message and a sentinel file to control step execution. The changes are logical and well-implemented. I have one suggestion to improve the maintainability of one of the Cloud Build configuration files by reducing code duplication.

Comment on lines +38 to +41
if [ -f /workspace/.skip-e2e ]; then
echo "Skipping - dependency update commit"
exit 0
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This skip logic is repeated in two other steps within this file (lines 51-54 and 64-67). This duplication can make the configuration harder to maintain in the long run.

To improve this, you could use a YAML anchor to define the script block once and then reuse it in each step. This follows the DRY (Don't Repeat Yourself) principle.

For example, you could define an anchor at the top of the file:

x-skip-check: &skip-check |
  if [ -f /workspace/.skip-e2e ]; then
    echo "Skipping step due to dependency update commit."
    exit 0
  fi

And then apply it in each relevant step:

- name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
  id: set-gcloud-project
  entrypoint: /bin/bash
  args:
    - "-c"
    - |
      <<: *skip-check
      gcloud config set project ${_E2E_DEV_PROJECT}

enriquekalven pushed a commit to enriquekalven/agent-starter-pack that referenced this pull request Feb 7, 2026
…rm#710)

- Add _COMMIT_MESSAGE substitution to E2E triggers using payload binding
- Skip E2E and Gemini Enterprise tests when commit starts with build(deps)
- Reduces unnecessary CI costs for Dependabot PRs
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.

1 participant