Skip to content

feat: basic object flags - #141

Merged
beeme1mr merged 31 commits into
open-feature:mainfrom
bbland1:feat/basic-object-flags
Jun 22, 2025
Merged

feat: basic object flags#141
beeme1mr merged 31 commits into
open-feature:mainfrom
bbland1:feat/basic-object-flags

Conversation

@bbland1

@bbland1 bbland1 commented Jun 14, 2025

Copy link
Copy Markdown
Member

This PR

  • all generators now support basic object flags
    • object parsing for each language from go map[string]any to the language specific version added
    • success_”lang”.golden files were updated to include object flags
  • current integration tests (go, nodes, csharp) updated to include the object flag
  • UnsupportedFlagType updated: still passed to each generator but empty to allow for object flags and keep the filtering logic originally established available for the possibility of any flag creation later on
  • make generate-docs was ran

Related Issues

Fixes #101

Notes

Follow-up Tasks

  • adding any validation & additional type safety
  • remove the UnsupportedFlagType as a passed parameter for creating new generator to encourage to usage of all the flags

How to test

  1. Pull branch & build or go run to see new file made and manually confirm themeCustomization flag is there
go run ./cmd/openfeature generate go --manifest sample/sample_manifest.json
  1. Run all unit tests
go test ./...
  1. Run all integration tests
make test-integration

bbland1 added 2 commits June 14, 2025 02:16
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
…p literal

Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
@bbland1 bbland1 changed the title Feat/basic object flags feat: basic object flags Jun 14, 2025
bbland1 added 6 commits June 14, 2025 15:47
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Comment thread internal/generators/golang/golang.go
bbland1 added 7 commits June 15, 2025 02:52
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Comment thread internal/generators/golang/golang.go Outdated
bbland1 added 8 commits June 17, 2025 00:38
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
This reverts commit dfddf88.

Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
@bbland1
bbland1 force-pushed the feat/basic-object-flags branch from 562c269 to 6591812 Compare June 17, 2025 05:51
bbland1 added 3 commits June 17, 2025 01:55
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
bbland1 added 3 commits June 19, 2025 02:05
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
…alue

Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
@bbland1
bbland1 marked this pull request as ready for review June 19, 2025 07:43
Comment thread internal/generators/csharp/csharp.go

@kriscoleman kriscoleman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks for the contribution @bbland1 , it's really great to see this feature go live.

I appreciate your engagement to tackle this and solve the nuances with c#!

:shipit:

@beeme1mr beeme1mr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wow, thanks! This is a great change. I left some minor feedback but it looks good to me.

From a Go perspective, would @sahidvelji and/or @erka you mind taking a look?
From a Python perspective, could @gruebel and/or @aepfli please take a look?

Comment thread internal/cmd/testdata/success_nestjs.golden
Comment thread internal/cmd/testdata/success_nodejs.golden Outdated
Comment thread internal/generators/csharp/csharp.go

@erka erka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

great work!

Comment thread internal/generators/golang/golang.go Outdated
bbland1 added 2 commits June 20, 2025 12:26
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>
Signed-off-by: bbland1 <104288486+bbland1@users.noreply.github.com>

@gruebel gruebel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice work 🍻 I added one comment, but this is more a heads up and doesn't need immediate attention.

self,
evaluation_context: Optional[EvaluationContext] = None,
flag_evaluation_options: Optional[FlagEvaluationOptions] = None,
) -> object:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

with the next version (0.8.2) of the Python SDK this can be refined to

Suggested change
) -> object:
) -> typing.Union[Sequence[FlagValueType], typing.Mapping[str, FlagValueType]]:

@beeme1mr
beeme1mr merged commit 288023c into open-feature:main Jun 22, 2025
@bbland1
bbland1 deleted the feat/basic-object-flags branch June 24, 2025 22:06
This was referenced Feb 6, 2026
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.

Basic support for object flags

6 participants