Skip to content
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

Implement /sdk/v2/flags API call and LoadStoreCache for flag configurations #31

Merged
merged 63 commits into from
Sep 25, 2023

Conversation

tyiuhc
Copy link
Collaborator

@tyiuhc tyiuhc commented Sep 15, 2023

No description provided.

@tyiuhc tyiuhc reopened this Sep 15, 2023
@tyiuhc tyiuhc requested a review from bgiori September 19, 2023 21:51
@tyiuhc tyiuhc marked this pull request as ready for review September 19, 2023 21:51
Base automatically changed from update-expclient-with-storage-and-variant to local-evaluation September 20, 2023 16:41
@tyiuhc tyiuhc closed this Sep 20, 2023
@tyiuhc tyiuhc reopened this Sep 20, 2023
@tyiuhc tyiuhc closed this Sep 20, 2023
@tyiuhc tyiuhc reopened this Sep 20, 2023
Copy link
Collaborator

@bgiori bgiori left a comment

Choose a reason for hiding this comment

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

can you rename the evaluation-core directory evaluation, very uncommon to have - characters in java package names.

@tyiuhc tyiuhc requested a review from bgiori September 22, 2023 21:47
Copy link
Collaborator

@bgiori bgiori left a comment

Choose a reason for hiding this comment

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

Great! One last change.

Comment on lines 57 to 63
val jsonArray = JSONArray(body)
val flags = mutableMapOf<String, EvaluationFlag>()
(0 until jsonArray.length()).forEach {
val jsonString = jsonArray.getJSONObject(it).toString()
val flag = json.decodeFromString<EvaluationFlag>(jsonString)
flags[flag.key] = flag
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
val jsonArray = JSONArray(body)
val flags = mutableMapOf<String, EvaluationFlag>()
(0 until jsonArray.length()).forEach {
val jsonString = jsonArray.getJSONObject(it).toString()
val flag = json.decodeFromString<EvaluationFlag>(jsonString)
flags[flag.key] = flag
}
val flags = json.decodeFromString<List<EvaluationFlag>>(body)
.associateBy { it.key }

@tyiuhc tyiuhc merged commit bfd53d6 into local-evaluation Sep 25, 2023
@tyiuhc tyiuhc deleted the update-expclient-with-storage-and-flag branch September 25, 2023 17:59
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.

2 participants