Skip to content

Commit

Permalink
fix: improve invalid sync URI errror msg (#252)
Browse files Browse the repository at this point in the history
Signed-off-by: Todd Baert <[email protected]>
  • Loading branch information
toddbaert authored Jan 10, 2023
1 parent 2ad206e commit 5939870
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build:
test:
go test -cover ./...
run:
go run main.go start -f config/samples/example_flags.json
go run main.go start -f file:config/samples/example_flags.json
install:
cp systemd/flagd.service /etc/systemd/system/flagd.service
mkdir -p /etc/flagd
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/evaluation_examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- binary:

```shell
flagd start -f example_flags.json
flagd start -f file:example_flags.json
```

- Docker:
Expand Down
3 changes: 2 additions & 1 deletion pkg/runtime/from_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ func (r *Runtime) setSyncImplFromConfig(logger *logger.Logger) error {
})
rtLogger.Debug(fmt.Sprintf("Using remote sync-provider for %q", uri))
default:
return fmt.Errorf("invalid sync uri argument: %s", uri)
return fmt.Errorf("invalid sync uri argument: %s, must start with 'file:', 'http(s)://', or 'core.openfeature.dev'",
uri)
}
}
return nil
Expand Down

1 comment on commit 5939870

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Go Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.30.

Benchmark suite Current: 5939870 Previous: 2ad206e Ratio
BenchmarkResolveBooleanValue/test_targetingBoolFlag 17538 ns/op 4801 B/op 80 allocs/op 11642 ns/op 4801 B/op 80 allocs/op 1.51
BenchmarkResolveBooleanValue/test_staticObjectFlag 1549 ns/op 80 B/op 4 allocs/op 1141 ns/op 80 B/op 4 allocs/op 1.36
BenchmarkResolveBooleanValue/test_missingFlag 1746 ns/op 144 B/op 6 allocs/op 1296 ns/op 144 B/op 6 allocs/op 1.35
BenchmarkResolveBooleanValue/test_disabledFlag 1775 ns/op 144 B/op 6 allocs/op 1303 ns/op 144 B/op 6 allocs/op 1.36
BenchmarkResolveStringValue/test_targetingStringFlag 18060 ns/op 4841 B/op 82 allocs/op 11538 ns/op 4841 B/op 82 allocs/op 1.57
BenchmarkResolveStringValue/test_staticObjectFlag 1594 ns/op 96 B/op 4 allocs/op 1153 ns/op 96 B/op 4 allocs/op 1.38
BenchmarkResolveStringValue/test_missingFlag 1775 ns/op 160 B/op 6 allocs/op 1306 ns/op 160 B/op 6 allocs/op 1.36
BenchmarkResolveStringValue/test_disabledFlag 1758 ns/op 160 B/op 6 allocs/op 1304 ns/op 160 B/op 6 allocs/op 1.35
BenchmarkResolveFloatValue/test_targetingFloatFlag 17041 ns/op 4841 B/op 82 allocs/op 11613 ns/op 4841 B/op 82 allocs/op 1.47
BenchmarkResolveFloatValue/test_staticObjectFlag 1557 ns/op 96 B/op 4 allocs/op 1149 ns/op 96 B/op 4 allocs/op 1.36
BenchmarkResolveFloatValue/test_missingFlag 1744 ns/op 160 B/op 6 allocs/op 1307 ns/op 160 B/op 6 allocs/op 1.33
BenchmarkResolveFloatValue/test_disabledFlag 1771 ns/op 160 B/op 6 allocs/op 1305 ns/op 160 B/op 6 allocs/op 1.36
BenchmarkResolveIntValue/test_targetingNumberFlag 16514 ns/op 4825 B/op 80 allocs/op 10662 ns/op 4825 B/op 80 allocs/op 1.55
BenchmarkResolveIntValue/test_staticObjectFlag 1530 ns/op 96 B/op 4 allocs/op 1155 ns/op 96 B/op 4 allocs/op 1.32
BenchmarkResolveIntValue/test_missingFlag 1747 ns/op 144 B/op 6 allocs/op 1302 ns/op 144 B/op 6 allocs/op 1.34
BenchmarkResolveIntValue/test_disabledFlag 1706 ns/op 160 B/op 6 allocs/op 1302 ns/op 160 B/op 6 allocs/op 1.31
BenchmarkResolveObjectValue/test_staticBoolFlag 1522 ns/op 96 B/op 4 allocs/op 1151 ns/op 96 B/op 4 allocs/op 1.32
BenchmarkResolveObjectValue/test_missingFlag 1719 ns/op 160 B/op 6 allocs/op 1306 ns/op 160 B/op 6 allocs/op 1.32
BenchmarkResolveObjectValue/test_disabledFlag 1754 ns/op 160 B/op 6 allocs/op 1302 ns/op 160 B/op 6 allocs/op 1.35
BenchmarkConnectService_ResolveBoolean/happy_path 3981 ns/op 552 B/op 14 allocs/op 2891 ns/op 552 B/op 14 allocs/op 1.38
BenchmarkConnectService_ResolveString/happy_path 3943 ns/op 584 B/op 15 allocs/op 2950 ns/op 584 B/op 15 allocs/op 1.34
BenchmarkConnectService_ResolveFloat/happy_path 4370 ns/op 624 B/op 15 allocs/op 3288 ns/op 624 B/op 15 allocs/op 1.33
BenchmarkConnectService_ResolveObject/happy_path 6900 ns/op 1856 B/op 34 allocs/op 4746 ns/op 1856 B/op 34 allocs/op 1.45

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.