Skip to content

V2 branch 1#4227

Merged
markphelps merged 23 commits into
v2from
v2-branch-1
May 21, 2025
Merged

V2 branch 1#4227
markphelps merged 23 commits into
v2from
v2-branch-1

Conversation

@markphelps

@markphelps markphelps commented May 19, 2025

Copy link
Copy Markdown
Collaborator

This is the first part of implementing the ability to branch and propose changes to environments with pull requests.

Currently its only half implemented as PR creation is not wired up with an authenticated client. Alot of this is based off of how we do it in Flipt Cloud currently, with some cleanup

If you have your environment synced with a remote Git repo you will be able to:

  1. Branch the env via an API request for now (ie: curl --request POST \ --url http://localhost:8080/api/v2/environments/staging/branches)
  2. The new branch will be pushed to the remote on any new writes
  3. Remote branches will be tracked and kept up to date in the existing poll loop

We'll still need to:

  • Wire up auth for creating GitHub PRs
  • Add support for branching existing envs and calling the proposal API from the UI
  • Implement the Proposal server endpoint

Note: I also removed the code generation for the environments SDK as I dont think we need to expose the new proposal/branch stuff

@github-actions

github-actions Bot commented May 19, 2025

Copy link
Copy Markdown
Contributor

The latest Buf updates on your PR. Results from workflow Proto / proto-lint (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMay 21, 2025, 7:13 PM

Signed-off-by: Mark Phelps <[email protected]>
…v2-branch-1

* 'v2-branch-1' of https://github.com/flipt-io/flipt:
  fix(ui/v2): fix the header separator and analytics tooltip on Flags page (#4226)
  refactor(ui): v2 new layout for flags with analytics (#4211)
  chore: run gopls modernize (#4213)
  feat: port over redis cluster and prefix (#4212)
Signed-off-by: Mark Phelps <[email protected]>
@codecov

codecov Bot commented May 19, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 26.91552% with 372 lines in your changes missing coverage. Please review.

Please upload report for BASE (v2@2397f64). Learn more about missing BASE report.

Files with missing lines Patch % Lines
internal/server/environments/environments_mock.go 0.00% 105 Missing ⚠️
internal/storage/environments/git/store.go 60.84% 68 Missing and 15 partials ⚠️
...ernal/enterprise/storage/environments/git/store.go 0.00% 44 Missing ⚠️
internal/server/environments/storage.go 0.00% 40 Missing ⚠️
internal/storage/environments/environments.go 0.00% 23 Missing ⚠️
...terprise/storage/environments/git/github/github.go 0.00% 20 Missing ⚠️
internal/server/environments/server.go 0.00% 20 Missing ⚠️
internal/storage/fs/config.go 15.00% 17 Missing ⚠️
internal/storage/git/repository.go 18.75% 13 Missing ⚠️
...ernal/storage/environments/evaluation/publisher.go 0.00% 4 Missing ⚠️
... and 2 more
Additional details and impacted files
@@          Coverage Diff          @@
##             v2    #4227   +/-   ##
=====================================
  Coverage      ?   50.97%           
=====================================
  Files         ?      121           
  Lines         ?    12759           
  Branches      ?        0           
=====================================
  Hits          ?     6504           
  Misses        ?     5728           
  Partials      ?      527           
Flag Coverage Δ
unittests 50.97% <26.91%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
@markphelps
markphelps marked this pull request as ready for review May 20, 2025 12:03
@markphelps
markphelps requested a review from a team as a code owner May 20, 2025 12:03
@dosubot dosubot Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label May 20, 2025
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
* v2:
  ci(v2): migrate to go tool (#4228)
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
@markphelps markphelps mentioned this pull request May 20, 2025
* feat: branch picker start

Signed-off-by: Mark Phelps <[email protected]>

* feat: make branch switcher work

Signed-off-by: Mark Phelps <[email protected]>

* chore: more branch work

Signed-off-by: Mark Phelps <[email protected]>

* feat: switch to newly created branch after branching

Signed-off-by: Mark Phelps <[email protected]>

* chore: styles

Signed-off-by: Mark Phelps <[email protected]>

* chore: regen mocks

Signed-off-by: Mark Phelps <[email protected]>

* chore: fix test

Signed-off-by: Mark Phelps <[email protected]>

---------

Signed-off-by: Mark Phelps <[email protected]>
@markphelps
markphelps merged commit 15eaade into v2 May 21, 2025
@markphelps
markphelps deleted the v2-branch-1 branch May 21, 2025 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant