Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: V2 UI flags #3881

Merged
merged 4 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions internal/server/metadata/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ func (s *Server) RegisterGRPC(server *grpc.Server) {
meta.RegisterMetadataServiceServer(server, s)
}

// GetConfiguration returns a HttpBody instance containing the Flipt instance's
// configuration structure marshalled as JSON.
func (s *Server) GetConfiguration(ctx context.Context, _ *emptypb.Empty) (*httpbody.HttpBody, error) {
return response(ctx, s.cfg)
}

// GetInfo returns a HttpBody instance containing the Flipt instance's
// runtime information marshalled as JSON.
func (s *Server) GetInfo(ctx context.Context, _ *emptypb.Empty) (*httpbody.HttpBody, error) {
Expand Down
8 changes: 8 additions & 0 deletions internal/storage/environments/fs/flipt/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,13 @@ func payloadFromFlag(flag *ext.Flag) (_ *anypb.Any, err error) {
Enabled: flag.Enabled,
}

if flag.Metadata != nil {
dst.Metadata, err = structpb.NewStruct(flag.Metadata)
if err != nil {
return nil, err
}
}

for _, variant := range flag.Variants {
var attach *structpb.Value
if variant.Attachment != nil {
Expand Down Expand Up @@ -344,6 +351,7 @@ func resourceToFlag(r *rpcenvironments.Resource) (*ext.Flag, error) {
Name: f.Name,
Description: f.Description,
Enabled: f.Enabled,
Metadata: f.Metadata.AsMap(),
}

for _, variant := range f.Variants {
Expand Down
14 changes: 7 additions & 7 deletions rpc/flipt/analytics/analytics.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions rpc/flipt/audit/event.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions rpc/flipt/auth/auth.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading