Skip to content

feat: file extension detection - #257

Merged
james-milligan merged 8 commits into
open-feature:mainfrom
james-milligan:file-extension-detection
Jan 12, 2023
Merged

james-milligan merged 8 commits into
open-feature:mainfrom
james-milligan:file-extension-detection

Conversation

@james-milligan

@james-milligan james-milligan commented Jan 10, 2023 •

Copy link
Copy Markdown
Contributor

Signed-off-by: James Milligan james@omnant.co.uk

This PR

  • file type is detected via the file extension, it is now possible to mix and match json and yaml files as flag configuration sources
start -f file:./config/samples/example_flags.yaml -f file:./config/samples/example_flags.json

Related Issues

#240

Notes

Follow-up Tasks

It is my opinion that the -e or --evaluator flag is now a little misleading / confusing, as only the json_evaluator is used internally, and changing the flag value has no effect internally. Open to opinions on how this should be handled, if at all.

How to test

Signed-off-by: James Milligan <james@omnant.co.uk>
@toddbaert

Copy link
Copy Markdown
Member

It is my opinion that the -e or --evaluator flag is not a little misleading / confusing, as only the json_evaluator is used internally, and changing the flag value has no effect internally. Open to opinions on how this should be handled, if at all.

I agree with this, but I'm not sure what the best approach is.

@Kavindu-Dodan

Copy link
Copy Markdown
Contributor

It is my opinion that the -e or --evaluator flag is not a little misleading / confusing, as only the json_evaluator is used internally, and changing the flag value has no effect internally. Open to opinions on how this should be handled, if at all.

I agree with this, but I'm not sure what the best approach is.

We only have one evaluator type and that's JSON (shared with yaml handling). So if we do not have any intention to introduce another evaluator, we can remove this option.

@beeme1mr

Copy link
Copy Markdown
Member

We only have one evaluator type and that's JSON (shared with yaml handling). So if we do not have any intention to introduce another evaluator, we can remove this option.

Can we think of any future scenario where we would want this? If not, I think it makes sense to deprecate this option.

@james-milligan

Copy link
Copy Markdown
Contributor Author

We only have one evaluator type and that's JSON (shared with yaml handling). So if we do not have any intention to introduce another evaluator, we can remove this option.

Can we think of any future scenario where we would want this? If not, I think it makes sense to deprecate this option.

Ive just pushed the changes to deprecate the -e/--evaluator flag, a warning is logged when it is used

@james-milligan
james-milligan merged commit ca22541 into open-feature:main Jan 12, 2023
@james-milligan
james-milligan deleted the file-extension-detection branch January 12, 2023 09:50
james-milligan pushed a commit that referenced this pull request Jan 12, 2023
🤖 I have created a release *beep* *boop*
---


##
[0.3.1](v0.3.0...v0.3.1)
(2023-01-12)


### Features

* file extension detection
([#257](#257))
([ca22541](ca22541))
* ResolveAll endpoint for bulk evaluation
([#239](#239))
([6437c43](6437c43))


### Bug Fixes

* **deps:** update module github.com/bufbuild/connect-go to v1.4.1
([#268](#268))
([712d7dd](712d7dd))
* **deps:** update module github.com/mattn/go-colorable to v0.1.13
([#260](#260))
([5b11504](5b11504))
* **deps:** update module github.com/open-feature/open-feature-operator
to v0.2.23 ([#261](#261))
([a1dd3b9](a1dd3b9))
* **deps:** update module github.com/rs/cors to v1.8.3
([#264](#264))
([0e6f2f3](0e6f2f3))
* **deps:** update module github.com/stretchr/testify to v1.8.1
([#265](#265))
([2ec61c6](2ec61c6))
* improve invalid sync URI errror msg
([#252](#252))
([5939870](5939870))
* replace character slice with regex replace
([#250](#250))
([c92d101](c92d101))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@beeme1mr beeme1mr linked an issue Jan 13, 2023 that may be closed by this pull request
raphael-wigoutschnigg-dt pushed a commit to open-feature-forking/flagd that referenced this pull request Mar 11, 2025
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.

[FEATURE] Detect flag configuration format from file extension

5 participants