Skip to content

feat(dataconnect): restructure existing transport code into new file structure#9603

Merged
stephenarosaj merged 3 commits intopasta/mainfrom
pasta/antipasto
Feb 27, 2026
Merged

feat(dataconnect): restructure existing transport code into new file structure#9603
stephenarosaj merged 3 commits intopasta/mainfrom
pasta/antipasto

Conversation

@stephenarosaj
Copy link
Copy Markdown
Contributor

@stephenarosaj stephenarosaj commented Feb 27, 2026

✨ This PR prepares the codebase for the upcoming introduction of the new transport architecture by reorganizing the existing network transport files. There are no functional changes in this pull request.

Changes:

  • Moved the existing REST logic into a dedicated network/rest/ directory.
  • Relocated rest.ts and fetch.ts to their new paths under network/rest/.
  • Updated all import paths across the SDK and test files to reflect the new structure.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 27, 2026

⚠️ No Changeset found

Latest commit: cb83988

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@gemini-code-assist
Copy link
Copy Markdown
Contributor

gemini-code-assist Bot commented Feb 27, 2026

Summary of Changes

Hello, 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 reorganizes the existing network transport code within the Data Connect SDK. The primary goal is to establish a clear and modular file structure, specifically by consolidating REST-related components into a dedicated network/rest/ directory. This foundational refactoring prepares the codebase for the future integration of a new transport architecture without introducing any functional changes to the current behavior, though a new response interface was added to the API definition.

Highlights

  • Codebase Restructuring: Restructured network transport files by moving existing REST logic into a new network/rest/ directory to prepare for a new transport architecture.
  • File Renaming and Relocation: Renamed network/transport/index.ts to network/DataConnectTransport.ts, network/transport/rest.ts to network/rest/RestTransport.ts, and network/fetch.ts to network/rest/fetch.ts.
  • Import Path Updates: Updated all relevant import paths across the SDK and test files to reflect the new file structure.
  • API Definition Addition: Introduced a new DataConnectResponse<T> interface in the data-connect.api.md file, defining the structure for data, errors, and extensions in responses.

🧠 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
  • common/api-review/data-connect.api.md
    • Added the DataConnectResponse interface definition.
  • packages/data-connect/src/api/DataConnect.ts
    • Updated the import path for RESTTransport.
  • packages/data-connect/src/api/Mutation.ts
    • Updated the import path for DataConnectTransport.
  • packages/data-connect/src/api/query.ts
    • Updated the import path for DataConnectExtensionWithMaxAge.
  • packages/data-connect/src/core/query/QueryManager.ts
    • Updated import statements for network-related types to reflect the new structure.
  • packages/data-connect/src/index.node.ts
    • Updated the import path for initializeFetch.
  • packages/data-connect/src/network/DataConnectTransport.ts
    • Renamed from network/transport/index.ts and adjusted internal import paths.
  • packages/data-connect/src/network/index.ts
    • Modified the export statement to re-export all from DataConnectTransport.
  • packages/data-connect/src/network/rest/RestTransport.ts
    • Renamed from network/transport/rest.ts and adjusted internal import paths.
  • packages/data-connect/src/network/rest/fetch.ts
    • Renamed from network/fetch.ts and adjusted internal import paths.
  • packages/data-connect/src/network/rest/index.ts
    • Added a new index file to export fetch and RestTransport.
  • packages/data-connect/test/unit/caching.test.ts
    • Updated the import path for initializeFetch.
  • packages/data-connect/test/unit/fetch.test.ts
    • Updated import paths for network types and functions.
  • packages/data-connect/test/unit/gmpid.test.ts
    • Updated the import path for initializeFetch.
  • packages/data-connect/test/unit/queries.test.ts
    • Updated import paths for initializeFetch and RESTTransport.
  • packages/data-connect/test/unit/userAgent.test.ts
    • Updated the import path for initializeFetch.
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.

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 successfully reorganizes the existing network transport files into a new network/rest/ directory, preparing the codebase for future transport implementations. All import paths have been updated correctly to reflect the new structure, and no functional changes were introduced, aligning with the pull request's stated objective. The changes are clean and well-executed for a refactoring task.

Comment thread common/api-review/data-connect.api.md Outdated
@stephenarosaj stephenarosaj changed the base branch from main to pasta/main February 27, 2026 07:35
@stephenarosaj stephenarosaj marked this pull request as ready for review February 27, 2026 07:37
Copy link
Copy Markdown
Contributor

@dconeybe dconeybe left a comment

Choose a reason for hiding this comment

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

LGTM. Just one very minor nit.

Comment thread packages/data-connect/src/network/rest/index.ts Outdated
@stephenarosaj stephenarosaj merged commit 4f5d905 into pasta/main Feb 27, 2026
24 checks passed
@stephenarosaj stephenarosaj deleted the pasta/antipasto branch February 27, 2026 18:34
@firebase firebase locked and limited conversation to collaborators Mar 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants