-
Notifications
You must be signed in to change notification settings - Fork 67
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
feat: support yaml evaluator #206
feat: support yaml evaluator #206
Commits on Jan 3, 2023
-
Signed-off-by: Suraj Banakar <surajrbanakar@gmail.com> feat: wip try replacing json evaluator with a generic file type evaluator - TODO: - still need a way to make the json_evaluator_model more composable - replace instances of `json` with the `MUaler` interface - implement `MUaler` interface for yaml and json Signed-off-by: Suraj Banakar <surajrbanakar@gmail.com> feat: wip pass `yaml` as filetype to `FilePathSync` - check `yaml.Unmarshal` not able to `Unmarshal` to `json.rawMessage` which is just `[]byte` with `MarshalJSON` and `UnmarshalJSON` - `FileTypeEvaluator` didn't turn out to be such a good idea because we are reliant on `gojsonschema` to test json schema - add `example_flags.yaml` file based on `examples_flags.json` refactor: remove traces of `FileTypeEvaluator` Signed-off-by: Suraj Banakar <surajrbanakar@gmail.com> feat: wip try yaml->map->json conversion - the code compiles and the converted json seems to look good but flagd throws error - need to look into this ^ Signed-off-by: Suraj Banakar <surajrbanakar@gmail.com> feat: wip remove yaml annotationt and redundant code - yaml config -> json config -> json.Unmarshal (<- error here) Signed-off-by: Suraj Banakar <surajrbanakar@gmail.com> feat: wip add indentations in the json converted from yaml - because the evaluator transposer function doesn't understand json without indentations well - needs more testing Signed-off-by: Suraj Banakar <surajrbanakar@gmail.com> feat: refactor Signed-off-by: Suraj Banakar <surajrbanakar@gmail.com> feat: add `yaml` and `yml` in evaluator switch case feat: fix go.mod - add json-iterator package Signed-off-by: Suraj Banakar <surajrbanakar@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 2349935 - Browse repository at this point
Copy the full SHA 2349935View commit details -
Signed-off-by: Suraj Banakar <surajrbanakar@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for e1dcd37 - Browse repository at this point
Copy the full SHA e1dcd37View commit details -
fix: re-word code comment around
jsoniter.Marshal
Signed-off-by: Suraj Banakar <surajrbanakar@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 916746b - Browse repository at this point
Copy the full SHA 916746bView commit details -
fix: use yaml.v3 instead of yaml.v2
- yaml.v2 has a bug where the sub-maps are converted to `map[interface]interface{}` instead of `map[string]interface{}` Signed-off-by: Suraj Banakar <surajrbanakar@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4d2e83a - Browse repository at this point
Copy the full SHA 4d2e83aView commit details -
fix: add constants for file types
- update go.mod and go.sum Signed-off-by: Suraj Banakar <surajrbanakar@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 1b0a0a2 - Browse repository at this point
Copy the full SHA 1b0a0a2View commit details -
fix: remove filetype abstraction
- didn't make a lot of sense to me Signed-off-by: Suraj Banakar <surajrbanakar@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 565dd27 - Browse repository at this point
Copy the full SHA 565dd27View commit details -
docs: update info about supported cli flags
Signed-off-by: Suraj Banakar <surajrbanakar@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 15784c1 - Browse repository at this point
Copy the full SHA 15784c1View commit details -
- don't check the file type in when fetching file in filepathsync Signed-off-by: Suraj Banakar <surajrbanakar@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 80159bd - Browse repository at this point
Copy the full SHA 80159bdView commit details -
fix: return
nil
instead oferr
when fetching file via filepathsyncSigned-off-by: Suraj Banakar <surajrbanakar@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a9482f4 - Browse repository at this point
Copy the full SHA a9482f4View commit details -
This reverts commit a2efb06. Signed-off-by: Suraj Banakar <surajrbanakar@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 744b608 - Browse repository at this point
Copy the full SHA 744b608View commit details -
test: add
json
as the defaultFileType
to fix tests- not sure if this is the best way to do this Signed-off-by: Suraj Banakar <surajrbanakar@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 806fbca - Browse repository at this point
Copy the full SHA 806fbcaView commit details -
Signed-off-by: Suraj Banakar <surajrbanakar@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ef4ae28 - Browse repository at this point
Copy the full SHA ef4ae28View commit details -
docs: fix spacing
ifflag
->if flag
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com> Signed-off-by: Suraj Banakar(बानकर) | スラジ <34534103+vadasambar@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 36a715a - Browse repository at this point
Copy the full SHA 36a715aView commit details -
fix: refactor switch case for evaluators
- use case X,Y instead of case X -> fallthrough -> case Y - former is cleaner than latter Signed-off-by: vadasambar <surajrbanakar@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 9e0dff0 - Browse repository at this point
Copy the full SHA 9e0dff0View commit details -
docs: add extra wording around yaml evaluation
Signed-off-by: vadasambar <surajrbanakar@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4b079c3 - Browse repository at this point
Copy the full SHA 4b079c3View commit details -
Signed-off-by: vadasambar <surajrbanakar@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ecd7eff - Browse repository at this point
Copy the full SHA ecd7effView commit details