-
Notifications
You must be signed in to change notification settings - Fork 22
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
Expose new end-point on /getAll on SettingsResource v2 for ETL stuff #893
Comments
@rehammuzzamil from my comment here it seemed that the serverVersions were not getting updated in batches as initially though, but one at a time based on what exactly was changed. So maybe it's possible to have this endpoint filtered and ordered by the serverVersion instead of the metadataVersion? |
I have shared my findings here. |
@bennsimon I am not requesting a change in behaviour, simply an order by serverVersion from this new endpoint, so that it works like all other /getAll endpoints. Just to clarify and to make sure that I am not missing anything
I edited key
Does this make sense? Either this is true, or there is some bug in our test server such that all serverVersions are not changing as expected? I don't mind proceeding with using the metadataVersion to order, I'm just trying to understand the reasoning and why this is not working as expected or if there is something else that I am not seeing |
@Wambere On the app we fetch using endpoints mapping settings to settingsMetadata so we wouldnt have the same scenario mentioned above. Or you can work with |
@Wambere Can you please confirm is this okay for the ETL team to use a new end-point |
It is still not clear to me why this needs to be different. A meeting would be nice to clear things up and make sure we are on the same page |
Hey all setting up a meeting to have us iron out this to be all on the same page, will share an invite to your calendars |
End-point url :
/getAll
Request Params : Same as
/rest/v2/settings/
What is missing in GET
/rest/v2/settings/
end-point?ETL Team wants the data in the monotonic order of
metadata_version
, but the API fetches the data from the database, and from the implementation perspective all the settings metadata are re-arranged in a map of settings configurations where the key is the settings identifier. Here is an example:Why should we create a new end-point?
The idea of exposing the new end-point
getAll
is because it has been the convention on all other Resources/Controllers for ETL stuff. This new end-point will hold a custom implementation in which we won't be clubbing the settings metadata against a particular identifier, rather fetch all the records from thesettings_metadata
table that meets the criteria and then return as is in a list in increasing order ofmetadata_version
.Implementation details
We will add an
isETL
flag in theSettingSearchBean
and set it astrue
in the/getAll
end-point. Repository methodList<SettingConfiguration> findSettings(SettingSearchBean settingQueryBean, int limit, Map<String, TreeNode<String, Location>> treeNodeHashMap)
implementation is modified and handled if isETL flag is found to be true.More details can be found here.
cc : @samkanga @dubdabasoduba @bennsimon @Wambere
The text was updated successfully, but these errors were encountered: