-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
✅ 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 |
There was a problem hiding this comment.
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
evaluation/evaluator.go
Outdated
@@ -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 { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
…change, update tests, code where needed to respect new version gen code
13c00da
to
ab33da4
Compare
* Update Kin and OpenAPI versions, add yaml config for openAPI version change, update tests, code where needed to respect new version gen code
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