feat: Add migrations-functional-testing agent skill for Dataflow pipeline testing#3883
feat: Add migrations-functional-testing agent skill for Dataflow pipeline testing#3883aasthabharill wants to merge 6 commits into
migrations-functional-testing agent skill for Dataflow pipeline testing#3883Conversation
migrations-functional-testing agent skill for Dataflow pipeline testing
Summary of ChangesHello, 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 adds a new functional testing skill for the AI agent, designed to streamline the validation of Dataflow migration templates. By automating the provisioning of ephemeral GCP resources and integrating verification steps, the skill reduces manual overhead while maintaining strict safety and approval requirements for infrastructure changes. Highlights
Using Gemini Code AssistThe 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
Customization To customize the 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 Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces the migrations-functional-testing skill, which provides a modular and gated workflow for functionally testing local Dataflow pipeline changes. It includes the skill definition, test cases, and an updated skills index. The review feedback highlights two main issues: a typo in the directory path for the smt-e2e-dataflow-debugging skill in the index file, and a non-portable shell command used for generating unique run IDs in the skill definition which can fail on macOS/BSD platforms.
| Auto-generated index of available skills. | ||
|
|
||
| ## smt-e2e-dataflow-debugging | ||
| **Directory**: `.agents/skills/smt-e2e-dataflow-debugging` |
There was a problem hiding this comment.
| ## Workflow Phases | ||
|
|
||
| ### Phase 1: Code Analysis & Test Case Generation | ||
| 1. **Sourcing State**: Execute `source .env.testing` in the terminal or load the variables into context. Generate a unique run ID: `export TEST_RUN_ID=$(head /dev/urandom | tr -dc a-z0-9 | head -c 6)`. |
There was a problem hiding this comment.
The command head /dev/urandom | tr -dc a-z0-9 | head -c 6 is not portable and can fail or hang on macOS/BSD platforms. On macOS, head expects lines and can fail with an Illegal byte sequence error when reading raw binary data from /dev/urandom under a UTF-8 locale. A more robust and portable way to generate a random 6-character alphanumeric string across both Linux and macOS is: LC_ALL=C tr -dc 'a-z0-9' < /dev/urandom | head -c 6. Please update the command to: export TEST_RUN_ID=$(LC_ALL=C tr -dc 'a-z0-9' < /dev/urandom | head -c 6)
This PR introduces the
migrations-functional-testingagent skill under.agent/skills/. This skill equips the AI agent with a modular, gated workflow to perform end-to-end functional testing of Dataflow templates against local code changes using GCP resources.IMPORTANT: The skill clearly mentions that it is to be used ONLY for migrations specific pipelines i.e.
sourcedb-to-spanner,spanner-to-sourcedb,datastream-to-spannerandgcs-spanner-dvas it's written only keeping these in mind.Key Features
dlq/andfilteredEvents/GCS folders), and generates a final markdown verification report.Files Added/Modified
[NEW]SKILL.md: The core instruction set defining the orchestrator workflow, safety gates, and automation rules.[NEW]TEST.md: A step-by-step manual test case designed for reviewers to verify the skill using a custom transformation scenario.[NEW]skills_index.md: Added the index references to map to the new skill directory and name.Verification Run
2 tests were done:
sourcedb-to-spannerwithout any new changesgcs-spanner-dv(Github PR)Analysis:
Follow up work
The test cases do require some attention and customization from user. There will be a follow-up effort to add a skill to improve creating edge cases which will be referred to here once its completed.