Skip to content

Commit

Permalink
prepare 1.6.0 release (#62)
Browse files Browse the repository at this point in the history
* [ch65671] Mass rename from eld to ldclient (#49)

* Alpha => beta (#50)

* Changed package name and description (#51)

* Added event_format to ldclient_user, formatted all events, and added first and last name unit tests (#52)

* [ch76955] Fix dates in tests to be rfc3339 compliant (#53)

* [ch76953] Add Erlang/OTP 23 to circle tests (#54)

* [ch76961] Fix dialyzer warning for missing offline key in options type spec (#55)

* [ch77043] Workaround for fixing shotgun SSE parsing bug (#56)

* [ch82755] Add SSE tests and fix for network timeout on initial connection (#57)

* [ch83275] Handle socket closing in handle_cast (#58)

* Added additional case for socket closing in handle_cast ldclient_event_process_server

* Detect error upon sending events and allow retry

* Split http_request processing into separate function, properly handle error type

* Fixed is_http_error_recoverable return type, added error type to send return type

* [ch85404] Initialize updaters asynchronously, restart updates after crash (#60)

* [ch85404] Fix updater initialization state bugs (#61)

Fixed updater initialization status check, and added cleanup of that status when instance is stopped.
Also added an assertion that confirms expected evaluation result when updater hasn't yet made the initial connection.

* [ch68359] Undo quick fix for shotgun SSE event parsing (#63)

* Upgraded shotgun to 0.5.0, updated CHANGELOG for 1.0.0-beta4 (#62)

* Update version to beta4

* [ch89280] Ignore path in streaming put events (#64)

This fixes a bug that would cause streaming updater to crash with `function_clause` when connected to the relay proxy.

* [ch89932] Fix the events URL path from /api/events/bulk to /bulk (#65)

The old path was legacy and is not supported in relay proxy.

* Clean up generated documentation (#67)

* Added @Private annotation to private modules, added overview.edoc

* Remove version from overview.edoc

* [ch30413] Reload flag data when storage server fails (#68)

* Added flag reload to ets and map init if server fails

* Added storage server state

* Added reload check to ets and map

* Added storage server failure check to poll and stream server process response

* Reload flag data when in-memory storage servers are terminated

* Fixed insert_new bug by moving storage state init above storage init, moved storage state back into update processor state, tests pass

* Removed unnecessary export from ldclient_instance

* [ch55223] Fully parse flags and segments before storing them (#69)

* Parse flags before storage

* Fixed no flags being parsed in update processor

* Fixed 2 unit tests

* Fixed 2 more storage tests

* Added segment parsing, all tests for segments pass

* Fixed 8 unit tests

* Fixed 2 unit tests

* Fixed last failing unit test

* Fixed patch flag and segment parsing, updated unit tests (#70)

* Changed app.launchdarkly to sdk.launchdarkly, changed initial stream reconnect to 1s (#72)

* Cleaned up patch parsing code, segments now pass integration tests (#71)

* Cleaned up patch parsing code

* Pass function instead of atom for patch parsing

* Added unit test for specifying custom user values as custom map instead of as individual keys (#75)

* Added LDD Mode (#76)

* [ch59635] Feature Store: Redis (#74)

* Added eredis dep, changed StorageBackend to FeatureStore, changed put to upsert, added delete

* Mostly done redis prototype, still need to fix config loading and prefixes

* Fixed some build errors, partially passed Tag to redis

* Added prefix to buckets, unit test prototype

* Fixed concatenating prefixes and buckets, changed some eredis return checks

* Fix small test errors

* First 2 redis unit tests pass

* Partially fixed type translation for upsert

* All unit tests pass

* Add remote docker to CircleCI

* Fix spacing in config.yml

* Added circle-tests for circle docker redis

* Remove unnecessary circle docker step

* changed flags to features, added back redis_prefix

* Changed ldclient_settings to ldclient_config

* Changed term_to_binary to jsx:encode

* Fixed redis unit tests by always returning a map instead of term in key value tuple for get

* changed redis_host to redis_url

* Change redis_url back to redis_host

* Change default redis host from localhost to 127.0.0.1

* Added Docker to CONTRIBUTING.md, fixed unit test using old function name

* Removed eredis from app.src, changed FlagStoreServer to FeatureStoreServer, added eredis:stop to terminate

* Fix Dialyzer warning for create_bucket redis type spec

* Added buckets list to redis server state to prevent checking redis to see if a bucket exists

* Added Makefile comment for circle-tests, simplified list prepend

* Simplify bucket_exists

* Fixed unit tests, fixed broken delete stream test

* Added bucket_name func

* Redis Cache (#73)

* Added eredis dep, changed StorageBackend to FeatureStore, changed put to upsert, added delete

* Mostly done redis prototype, still need to fix config loading and prefixes

* Fixed some build errors, partially passed Tag to redis

* Added prefix to buckets, unit test prototype

* Fixed concatenating prefixes and buckets, changed some eredis return checks

* Fix small test errors

* First 2 redis unit tests pass

* Partially fixed type translation for upsert

* All unit tests pass

* Add remote docker to CircleCI

* Fix spacing in config.yml

* Added circle-tests for circle docker redis

* Remove unnecessary circle docker step

* changed flags to features, added back redis_prefix

* Changed ldclient_settings to ldclient_config

* Changed term_to_binary to jsx:encode

* Fixed redis unit tests by always returning a map instead of term in key value tuple for get

* changed redis_host to redis_url

* Change redis_url back to redis_host

* Change default redis host from localhost to 127.0.0.1

* Added Docker to CONTRIBUTING.md, fixed unit test using old function name

* Removed eredis from app.src, changed FlagStoreServer to FeatureStoreServer, added eredis:stop to terminate

* Fix Dialyzer warning for create_bucket redis type spec

* Added buckets list to redis server state to prevent checking redis to see if a bucket exists

* Added Makefile comment for circle-tests, simplified list prepend

* Simplify bucket_exists

* persistent storage caching layer

* Fixed some minor runtime bugs with Tag

* debugging

* Removed debugging prints, cache unit tests pass

* Fixed redis tests

* Added jsx encode/decode to cache, checked for empty map

* Fix unit tests after merge

* Fix lookup_key function spec

* Added unit test for cache ttl expiration

* [ch99672] Add new deleted flag if it doesn't already exist (#77)

* Add new deleted flag if it doesn't already exist

* Add NewVersion to deleted flag

* Changed list to all in eval (#78)

* [ch99670] Add Redis storage check to SDK initialization check (#79)

* Add Redis storage check to sdk initialization check

* Changed reload to false on redis server terminate

* Removed the guides link

* Fixed Redis Parsing (#80)


* Don't parse flags and segments before storing in Redis

* eredis to app.src

* Fix cache and patch

* Changed flag to camel case

* Changed rules and segments to camel case

* Converted clause to camel case

* Rename track_with_metric to track_metric (#81)

* Removing the beta banner (#82)

* Make internal storage files private from generated doc (#83)

* typechecking errors

* make dialyzer happy

* add missing handling for adding alias events

* add tests for alias events

* add second alias method

* remove unused imports and simplify alias function

* add otp 24 to circleci test coverage (#86)

* add opt 24 and elixir tests

* update dependencies to newer versions (#87)

* update deps

* [ch121494] Send header keys as binary for HTTP2 client compatibility (#88)

We were sending header keys as lists (strings) which worked for HTTP1, but failed for the HTTP2 protocol implementation in gun. Changing the keys to binary works for both.

* [ch122091] Force HTTP1 mode (#89)

The shotgun library doesn't support async streaming over HTTP2; force HTTP1 only.

* [ch122248] Add try/catch expressions during evaluation and SSE (#90)

Add try/catch expressions during evaluation and SSE processing to avoid undesired crashes.

* Updating from the deprecated elixir circleci image to a newer one (#91)

* ch123363 Update to not add a default variation of 0 to rules. Pass malformed reason all the way through. (#92)

* ch123363 Update to not add a default variation of 0 to rules. Pass malformed reason all the way through.

* ch123363 Remove CT from eval.

* ch123363 Revert flag change.

* ch123363 Re-work to not change exception behavior.

* ch123363 Cleanup.

* ch123363 Correct error message for case where rule is missing variation or rollout.

* ch123363 Correct case where the falthrough is malformed to support the default value.

* ch64830 Updates to improve the release process for erlang. (#93)

* ch64830 Initial pass at changes to the release process.

* ch64830 Add secrets configuration and update scripts.

* ch64830 Change prepare script to be more concise.

* ch64830 Unspecified image version.

* ch64830 Update prepare script. Add version back to docker image.

* ch64830 Update releaser config version.

* ch64830 Change capitalization gitHubPages.

* ch64830 Add zip.

* ch64830 Put the docs where releaser expects them.

* ch64830 Test publishing.

* ch64830 Test publishing.

* ch64830 Create directory for hex config.

* ch64830 Fix formatting of hex.config.

* ch64830 Add hex plugin to rebar.

* ch64830 Change executable permissions.

* ch64830 Remove testing code.

* ch64830 Add newline to end of file.

* ch108414 Implement support for experiment traffic allocation v2. (#95)

* ch99138 Add ability to use flags from files. (#94)

* sc-120173 Add support for http options. (#96)

Co-authored-by: zurab-darkly <[email protected]>

* Remove backticks from comments.

* sc-130423 Fix option typings and update dialyzer to allow analyzing t… (#97)

* Local filesystem monitor fix (#52)

* add single instance note

* #1 Initial implementation of the test service. (#99)

Co-authored-by: zurab-darkly <[email protected]>

* Test data source (#104)

* Handle null items in configuartion and commands. (#105)

* Pin hex plugin version. (#107)

* Rename master to main. (#108)

* [sc-157515] [sc-123638] Fix for use with OTP-25. Update shotgun to resolve issue with rebar3 compatibility with hex. Update certifi to latest version. (#109)

* Update parameter name. (#110)

* [sc-175162] Correctly handle deleted flags and segments. (#111)

* Implement backoff/jitter and temporary/permanent failure for streams. (#112)

* Implement support for server time. (#113)

* Account for bookishspork sometimes producing correct dates. (#116)

* Allow null for track data. (#121)

* feat: Add support for application id and application version configuration. (#130)

In addition to support for application id and version this PR also refactors how headers are handled. It centralizes the definition of the default headers where previously it was duplicated in a few places.

This also adds the generic logic for tags beyond application id and version. Allowing sorting and generation of header strings for any number of tags and values.

* chore: Add support for the polling capability. (#131)

* build(deps): Bump lru version to 2.4.0 (#132)

* Fix docs for 1.6 release. Add docs to CI. (#133)

---------

Co-authored-by: zurab-darkly <[email protected]>
Co-authored-by: Ben Woskow <[email protected]>
Co-authored-by: Joe Cieslik <[email protected]>
Co-authored-by: Zurab Davitiani <[email protected]>
Co-authored-by: LaunchDarklyCI <[email protected]>
Co-authored-by: elliot <[email protected]>
Co-authored-by: elliot <https://[email protected]>
Co-authored-by: Elliot <[email protected]>
Co-authored-by: Ben Woskow <[email protected]>
Co-authored-by: LaunchDarklyReleaseBot <[email protected]>
Co-authored-by: Ryan Lamb <[email protected]>
Co-authored-by: Matt Glover <[email protected]>
Co-authored-by: Molly <[email protected]>
Co-authored-by: Ben Levy <[email protected]>
  • Loading branch information
15 people authored Jan 30, 2023
1 parent 91a0764 commit 5148ab1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ erlang-docker-template: &erlang-docker-template
name: run tests
command: make circle-tests
working_directory: ~/ldclient
- run:
name: Build documentation
command: make doc
working_directory: ~/ldclient
- run:
name: run dialyzer
command: make dialyze
Expand Down
2 changes: 1 addition & 1 deletion src/ldclient_config.erl
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ parse_application_info(ApplicationInfoMap) ->
set_valid_tag(id, Id, undefined)).

-spec set_valid_tag(Key :: atom(), Value :: binary() | undefined, MapOrUndefined :: map() | undefined) -> app_info() | undefined.
set_valid_tag(Key, _Value = undefined, MapOrUndefined) -> MapOrUndefined;
set_valid_tag(_Key, _Value = undefined, MapOrUndefined) -> MapOrUndefined;
set_valid_tag(Key, Value, MapOrUndefined) ->
case validate_tag_value(Value) of
true ->
Expand Down
3 changes: 2 additions & 1 deletion src/ldclient_headers.erl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ get_tags(Tag) ->
%% @doc Combine all the tags into the format for application tags.
%%
%% Formatted tags are of the format `tag/value' a tag can have multiple values
%% in that case it will be represented by space delimited pairs `tagA/valueA tagA/ValueB`.
%% in that case it will be represented by space delimited pairs `tagA/valueA tagA/ValueB'.
%% @end
-spec combine_tags(Tags :: [{binary(), [binary()]}]) -> binary().
combine_tags(Tags) -> combine_tags(Tags, <<>>).
Expand Down Expand Up @@ -117,6 +117,7 @@ add_version_tag(_Info, InList) -> InList.
%% {<<"b">>, [<<"1">>, <<"2">>, <<"3">>]},
%% {<<"c">>, [<<"1">>, <<"4">>, <<"5">>]}
%% ]
%% '''
%% @end
-spec sort_tags(Tags :: [{binary(), [binary()]}]) -> SortedTags :: [{binary(), [binary()]}].
sort_tags(Tags) ->
Expand Down
2 changes: 1 addition & 1 deletion src/ldclient_update_requestor_httpc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
%%===================================================================

-spec init(Tag :: atom(), SdkKey :: string()) -> state().
init(Tag, SdkKey) ->
init(Tag, _SdkKey) ->
Options = ldclient_config:get_value(Tag, http_options),
HttpOptions = ldclient_http_options:httpc_parse_http_options(Options),
DefaultHeaders = ldclient_headers:get_default_headers(Tag, string_pairs),
Expand Down

0 comments on commit 5148ab1

Please sign in to comment.