-
Notifications
You must be signed in to change notification settings - Fork 222
Description
Issue overview
Measures with min_compatible > current CLI version should be be gotten from BCL
Current Behavior
The release of 3.8.0 broke a lot of measures, most notably the openstudio_results measure, because the openstudio-extension-gem's ruby methods were removed from the CLI, and replaced with equivalent C++ methods, but in a non-backward compatible way.
As a result, these measures were adjusted and recently released with new versions that have "min_compatible" = 3.8.0.
RemoteBCL does not check that one bit, neither in searchComponentLibrary + getMeasure nor in measuresWithUpdates.
This is problematic because it means every user of the CLI < 3.8.0 would get the newest version which is not compatible with their current CLI.
NatLabRockies/openstudio-common-measures-gem#169 (comment)
Expected Behavior
RemoteBCL should check min_compatible/max_compatible.
I would expect that:
- A measure with min_compatible > current cli version should NOT be in the results
- A measure with max_compatible < current cli version should NOT be in the results
- The newest compatible version of a measure should be in the results
- If a measure has a reivision1 that is compatible with the current CLI, but the revision2 (latest) isn't, revision1 should be suggested
Steps to Reproduce
test_bcl.rb
remoteBCL = OpenStudio::RemoteBCL.new
openstudio_results_uid = "a25386cd-60e4-46bc-8b11-c755f379d916"
responses = remoteBCL.searchMeasureLibrary(openstudio_results_uid, 980)
raise "More than 1 responses" unless responses.size == 1
response = responses.first
if response.respond_to?(:versionModified)
puts "#{response.name} - versionId=#{response.versionId}, versionModified=#{response.versionModified.get.to_s}"
else
puts "#{response.name} - versionId=#{response.versionId}"
end$ /usr/local/openstudio-3.8.0/bin/openstudio test_bcl.rb
Openstudio results - versionId=5b4d387a-f537-4693-a9eb-6192957b6c1b, versionModified=2024-Jul-11 14:31:57
$ /usr/local/openstudio-3.7.0/bin/openstudio test_bcl.rb
Openstudio results - versionId=5b4d387a-f537-4693-a9eb-6192957b6c1bPossible Solution
Update RemoteBCL code, and expand BCLSearchResult to include min/max compatible. Might need a server change on the BCL side itself.
Details
Environment
Some additional details about your environment for this issue (if relevant):
- Platform (Operating system, version): all
- Version of OpenStudio (if using an intermediate build, include SHA): 3.8.0
Context
Found because the OpenStudio Application 1.7.1 which uses OS SDK 3.7.0 has this issue since July 11.