Skip to content

Agent Skills for CF3 V1-V2 Migration#60

Draft
shettyvarun268 wants to merge 3 commits intofirebase:mainfrom
shettyvarun268:feature/v1-v2-migration-skill
Draft

Agent Skills for CF3 V1-V2 Migration#60
shettyvarun268 wants to merge 3 commits intofirebase:mainfrom
shettyvarun268:feature/v1-v2-migration-skill

Conversation

@shettyvarun268
Copy link
Copy Markdown

This PR introduces a new skill for AI agents to safely migrate Firebase Functions from V1 to V2 using the v1-v2 compat layer(destructuring). It provides step-by-step guidance for migrating function signatures without rewriting internal business logic, and includes checks for configurations(if functions.config() has been migrated from) and unit test signature mismatches.

It also adds reference documentation containing a comprehensive V1-to-V2 function parity table and an deep dive into the compat layer itself. This is to ensure that the agent has enough context and reference to understand how the signature has changed from v1 to v2 and also understand what the compat layer intends to do.

@shettyvarun268 shettyvarun268 marked this pull request as ready for review March 31, 2026 22:40
Copy link
Copy Markdown
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 new skill for migrating Firebase Functions from V1 to V2 using a destructuring compatibility shim, including architectural documentation and a function mapping reference. Feedback suggests clarifying that the context shim is unavailable for https.onCall functions and noting that test mock keys must match the specific trigger type, such as 'data' for Firestore or 'message' for PubSub, to ensure correct test updates.

@shettyvarun268 shettyvarun268 marked this pull request as draft March 31, 2026 22:41
Copy link
Copy Markdown
Member

@inlined inlined left a comment

Choose a reason for hiding this comment

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

Looks mostly good:

  1. We should possibly get my params rewrite code into main instead of a staging branch so you can reference it
  2. We should add instructions on how to convert runWith into either a global setGlobalOptions or per-function options objects
  3. We can maybe explain the value of concurrency and ask if they want to pay for more CPU if they want concurrency or set CPU to "gcfv1" to restore the old CPU?
  4. As a smoke/integration test can you run this against our samples repo and post a git commit to the description for code reviewing the output?

@shettyvarun268
Copy link
Copy Markdown
Author

Addressing the Comments by inlined:

  1. Noted. Will link the params rewrite reference into this once its pushed to main
  2. Added configuration-migration.md showing how to map .runWith to both setGlobalOptions and per-function configs.
  3. Updated SKILL.md with a Costing warning explaining how to use cpu: "gcf_gen1" to keep V1 fractional CPU pricing.
  4. Looking into the smoke testing now

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.

2 participants