NREL / OpenStudio

OpenStudio is a cross-platform collection of software tools to support whole building energy modeling using EnergyPlus and advanced daylight analysis using Radiance.
https://www.openstudio.net/
Other
484 stars 185 forks source link

RemoteBCL updateMeasures does not reliably remove old version #5128

Closed macumber closed 3 months ago

macumber commented 3 months ago

Issue overview

RemoteBCL updateMeasures is supposed to remove the old version of the measures that are updated.

Current Behavior

Currently, the updateMeasures gets the measure after download by uid only, meaning there is a 50/50 chance that it won't remove the old version.

Expected Behavior

RemoteBCL updateMeasures should remove old measure by version id and uid

Steps to Reproduce

Possible Solution

https://github.com/NREL/OpenStudio/pull/5127/files

Details

Environment

Some additional details about your environment for this issue (if relevant):

Context

RemoteBCL updateMeasures is leaving old measures behind

jmarrec commented 3 months ago

https://www.sqlite.org/lang_select.html

  1. The ORDER BY clause

If a SELECT statement that returns more than one row does not have an ORDER BY clause, the order in which the rows are returned is undefined. Or, if a SELECT statement does have an ORDER BY clause, then the list of expressions attached to the ORDER BY determine the order in which rows are returned to the user.

https://github.com/NREL/OpenStudio/blob/f916fc13ef0f90bf42b100e2050455f75c404667/src/utilities/bcl/LocalBCL.cpp#L685