SSWConsulting / SSW.Rules.Functions

https://www.ssw.com.au/rules
2 stars 0 forks source link

🗑️ Removed latest rules widget functions and entity context for Cosmos DB #83

Closed babakamyljanovssw closed 1 month ago

babakamyljanovssw commented 2 months ago

Relates: https://github.com/SSWConsulting/SSW.Rules/issues/1438

As we have made changes to Latest Rules widget to use history.json and commits.json as it's data source, we are no longer need the functions and entity context used by widget previously.

Changes:

  1. Deleted GetLatestRules and UpdateLatestRules functions
  2. Deleted the LatestRules entity from RulesDbContext
  3. Deleted docs/Functions/Functions.http located in root folder as it is duplicate with docs/Functions/Functions.http inside SSW.Rules.AzFuncs project

image Figure: UpdateLatestRules was called last time 19th September

image Figure: GetLatestRules was called last time 21st September

babakamyljanovssw commented 2 months ago

cc: @JackDevAU @bradystroud

I will be checking invocation list of these functions on Friday, and if there are no any new calls, then I proceed with merge.

babakamyljanovssw commented 2 months ago

@bradystroud @tkapa @JackDevAU

Update

The UpdateLatestRules functions wasn't being used after last time I checked which is good and can be removed safely, but the GetLatestRules function was called a few times.

image Figure: A few calls made to function after last check

Not sure where it is being called from, this function was being used in widget, but we have updated widget to new version to use history.json.

I checked the request logs for this function before widget upgrade and after widget upgrade for the 7 day period:

Currently investigating where these calls are made from

babakamyljanovssw commented 1 month ago

Hi @bradystroud,

While investigating Azure Functions I checked GetLatestRules and UpdateLatestRules functions usage, both of them weren't used for the last 7 days. If there is nothing else I will proceed with merging this PR.

image Figure: Application Insights logs returned empty resulted for these functions