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

FFM-3703 - Go FF SDK Broken by Kin API Changes #90

Merged
merged 5 commits into from
Jun 24, 2022
Merged

Conversation

stephenmcconkey
Copy link
Contributor

@stephenmcconkey stephenmcconkey commented Jun 22, 2022

What
Update Kin and OpenAPI versions
Update makefile to conform to new call style
Add yaml config for openAPI version change
Update tests, code where needed to respect new version gen code

Used this to generate the config files
oapi-codegen --output-config --old-config-style --package=<package-name> --generate="types" -alias-types <output>.yaml

As per - https://github.com/deepmap/oapi-codegen/releases

FFM-3703

Why
The Go FF SDK is unusable on new projects without hacking Go.mod/go.sum as the Kin project has published a non-semver friendly version.

Testing
Unit tests update where appropriate with small changes in gen code
Manual testing to use this version of sdk to poll featureflags - working with no compilation errors

@swarmia
Copy link

swarmia bot commented Jun 22, 2022

✅  Linked to Bug FFM-3703 · Go FF SDK Broken by Kin API Changes

github.com/getkin/kin-openapi v0.53.0
github.com/golang-jwt/jwt v3.2.1+incompatible
github.com/google/uuid v1.2.0
github.com/deepmap/oapi-codegen v1.11.0
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should be careful when increasing dep versions, this module is used with ff-server so probably it will need some sanity check

@@ -200,7 +200,7 @@ func (e Evaluator) evaluateVariationMap(variationsMap []rest.VariationMap, targe

func (e Evaluator) evaluateFlag(fc rest.FeatureConfig, target *Target) (rest.Variation, error) {
var variation = fc.OffVariation
if fc.State == rest.FeatureState_on {
if fc.State == rest.On {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this changing from FeatureState_on to On something that we can control?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah i've just ran some backwards compatibility stuff i've found and been able to revert this

@stephenmcconkey stephenmcconkey merged commit a1a3397 into main Jun 24, 2022
davejohnston pushed a commit to davejohnston/ff-golang-server-sdk that referenced this pull request Sep 26, 2023
* Update Kin and OpenAPI versions, add yaml config for openAPI version change, update tests, code where needed to respect new version gen code
@erdirowlands erdirowlands deleted the FFM-3703 branch November 3, 2023 17:44
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.

None yet

4 participants