-
Notifications
You must be signed in to change notification settings - Fork 50
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
FOGL-6719 - Deprecate asset record handling in Rest API #753
Conversation
…only for sqlite engine Signed-off-by: ashish-jabble <ashish@dianomic.com>
… new column in GET track entry Signed-off-by: ashish-jabble <ashish@dianomic.com>
Signed-off-by: ashish-jabble <ashish@dianomic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me - thanks for getting this down quickly.
Signed-off-by: ashish-jabble <ashish@dianomic.com>
Signed-off-by: ashish-jabble <ashish@dianomic.com>
Signed-off-by: ashish-jabble <ashish@dianomic.com>
Signed-off-by: ashish-jabble <ashish@dianomic.com>
@ashish-jabble What is the need of select query before update? we should see affected rows from storage result; otherwise this will slow down. Also I observed, we can deprecate an already deprecated asset again. I think once deprecated, it should not change any more.
Now if we will run the PUT request again, it will execute successfully and update the |
This cannot be appear once FOGL-6740 is done. As there is no |
Signed-off-by: ashish-jabble <ashish@dianomic.com>
Signed-off-by: ashish-jabble <ashish@dianomic.com>
Signed-off-by: ashish-jabble <ashish@dianomic.com>
… is null Signed-off-by: ashish-jabble <ashish@dianomic.com>
Signed-off-by: ashish-jabble <ashish@dianomic.com>
Signed-off-by: ashish-jabble <ashish@dianomic.com>
Signed-off-by: ashish-jabble <ashish@dianomic.com>
Signed-off-by: ashish-jabble <ashish@dianomic.com>
…ord exists; this is a limitation on storage service side, once FOGL-6749 is done we will remove this Signed-off-by: ashish-jabble <ashish@dianomic.com>
Signed-off-by: ashish-jabble <ashish@dianomic.com>
@ashish-jabble seeing one issue
|
@mshariq-nerd - I am not sure if that's an issue or its by design with the current implementation of deprecated asset record entry. So @MarkRiddoch can better confirm this. AFAIK, Once an asset_track entry is deprecated (given the combination of plugin+ service + event + asset as by this we treat it as a unique record for an asset record) you will be no longer available to see the entry in south service API if that combination of asset tracker record appears again in the system. As we have changed the south API query by excluding the assets if deprecated_ts isnull or empty And this is as per JIRA requirements. See
|
@ashish-jabble Not sure but I am not deprecating anything here. steps are simple add service, delete service and again add service with same name and asset. Now asset no longer appearing in service. |
@mshariq-nerd As per JIRA have implemented the updation of deprecated_ts internally while deleting a service, task and filter. Also we have used for the extra SELECT query inside it, so FOGL-6749 is created for workarounds. i.e On REST API endpoint like deleting a service or task or filter - we have internally updated the deprecated_ts for an asset record if exists. |
There is a more simple repro:
Issue: Now asset no longer appearing in service. |
FOGL-6721: initial implementation of un-deprecate assets deprecated assets are un-deprecated only at service start. Current change is for "sqlite" storage plugin
Compilation fix
Removed debug code
Addition of NULL support in update for Postgres and sqlitelb
FOGL-6742: isnull and not null added to sqlitelb and postgres
Asset tracking records are un-deprecated at run-time
Added m_lastAsset member variable
String representation fixed
FOGL-6721: un-deprecate asset tracking records
Signed-off-by: Mark Riddoch <mark@dianomic.com>
Items
curl -sX PUT http://localhost:8081/fledge/track/service/XXX/asset/XXX/event/XXXX
Seems like there is no support available in Storage layer for is NULL, Therefore pending task. SEE FOGL-6740 and FOGL-6741