Skip to content

Conversation

@keelerm84
Copy link
Member

@keelerm84 keelerm84 commented Dec 4, 2025

Previously, we worked to cache the changset -> collections process as it
is used in many different places. There are multiple places where a
changeset is created from a collection. With this change, we take
advantage of this knowledge, and pre-cache the collection that created
the changeset, preventing us from doing the conversion at all.


Note

Introduce NewChangeSetFromCollections and refactor data sources/tests to build and pass collections directly, avoiding redundant conversions.

  • Subsystems:
    • Add NewChangeSetFromCollections to construct a ChangeSet directly from []ldstoretypes.Collection, caching collections and generating changes via collectionsToChanges.
  • Data Sources:
    • FDv1 polling (internal/datasourcev2/fdv1_polling_data_source.go): use NewChangeSetFromCollections with existing collection data instead of ChangeSetBuilder.
    • File data source (ldfiledatav2/file_data_source_impl.go): build flag/segment collections directly (via insertDataIntoCollection) and return a ChangeSet via NewChangeSetFromCollections.
  • Test Helpers:
    • ldtestdatav2: construct full-transfer collections for flags/segments and use NewChangeSetFromCollections to produce the ChangeSet.

Written by Cursor Bugbot for commit 392183b. This will update automatically on new commits. Configure here.

Previously, we worked to cache the changset -> collections process as it
is used in many different places. There are multiple places where a
changeset is created from a collection. With this change, we take
advantage of this knowledge, and pre-cache the collection that created
the changeset, preventing us from doing the conversion at all.
@keelerm84 keelerm84 requested a review from a team as a code owner December 4, 2025 17:51
@keelerm84 keelerm84 merged commit d6fd601 into v7 Dec 5, 2025
27 checks passed
@keelerm84 keelerm84 deleted the mk/sdk-1661/collections-to-changesets branch December 5, 2025 17:49
keelerm84 pushed a commit that referenced this pull request Dec 5, 2025
🤖 I have created a release *beep* *boop*
---


##
[7.14.3](v7.14.2...v7.14.3)
(2025-12-05)


### Bug Fixes

* Optimize creation of changesets from collections
([#335](#335))
([d6fd601](d6fd601))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

3 participants