Skip to content

[FD-5510] feat: Adding payload version and ID in the project table#699

Merged
hkotian merged 4 commits intomainfrom
hkotian/FD-5510/adding-payload-id-version-dev-server
Apr 28, 2026
Merged

[FD-5510] feat: Adding payload version and ID in the project table#699
hkotian merged 4 commits intomainfrom
hkotian/FD-5510/adding-payload-id-version-dev-server

Conversation

@hkotian
Copy link
Copy Markdown
Contributor

@hkotian hkotian commented Apr 24, 2026

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

Provide links to any issues in this repository or elsewhere relating to this pull request.

Describe the solution you've provided

We are preparing the dev server to support the FDv2 protocol. The V2 protocol assigns payload IDs and versions to the environment payloads, since the SDK is now stateful.
In this PR we are adding foundational support to assign a payload version to the project table that will be bumped on every upsert and deletes.

Describe alternatives you've considered

Provide a clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context about the pull request here.


Note

Medium Risk
Introduces a new persisted payload_version field and increments it on project syncs and override mutations, which changes database schema and write paths. Risk is mainly around SQLite migration/compatibility and ensuring all payload-changing operations correctly bump the version.

Overview
Adds payload version tracking to dev-server projects by persisting payload_version in the projects SQLite table (defaulting to 1) and migrating existing databases via ALTER TABLE.

Introduces Store.IncrementProjectPayloadVersion (implemented in sqlite.go) and wires it into project updates (UpdateProject) and override upsert/deactivation (UpsertOverride/DeleteOverride) so version increments on payload-affecting changes; constructors/import paths initialize new projects with PayloadVersion: 1, and tests/mocks are updated accordingly.

Reviewed by Cursor Bugbot for commit e0722c6. Bugbot is set up for automated code reviews on this repo. Configure here.


Related Jira issue: FD-5510: Implement poll server side endpoint handling in Launchdarkly dev server

@launchdarkly-upra launchdarkly-upra Bot changed the title Adding payload version and ID in the project table [FD-5510] Adding payload version and ID in the project table Apr 24, 2026
Comment thread internal/dev_server/db/sqlite.go
@hkotian hkotian changed the title [FD-5510] Adding payload version and ID in the project table [FD-5510] feat: Adding payload version and ID in the project table Apr 24, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit af36eb1. Configure here.

Comment thread internal/dev_server/db/sqlite_test.go
@hkotian hkotian requested review from a team, mattthewong and svenkatesan-ld and removed request for a team April 24, 2026 21:48
@hkotian hkotian requested a review from kinyoklion April 27, 2026 15:27
@hkotian hkotian merged commit f701893 into main Apr 28, 2026
9 of 12 checks passed
@hkotian hkotian deleted the hkotian/FD-5510/adding-payload-id-version-dev-server branch April 28, 2026 21:59
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.

4 participants