Closed brianlball closed 7 months ago
Can you please make sure these aren't leftovers from previous versions? Because I can't reproduce on Ubuntu with 3.7.0 or even down to 3.5.1.
Can you try this one liner test please? RUnning at root of this repo, otherwise just change the path pointing to an .xml schema (schematron)
dir=$(/usr/local/openstudio-3.7.0/bin/openstudio -e 'v = OpenStudio::XMLValidator.new("resources/utilities/xml/schema/HPXMLvalidator.xml"); tmp_dir = v.schemaPath.parent_path.to_s; files = Dir.glob("#{tmp_dir}/*"); puts tmp_dir; STDERR.puts "files: #{files}"'); [ -d "$dir" ] && echo "NOT OK: $dir is not deleted" || echo "OK, $dir is deleted"
3.5.0 and below did have the issue:
$ dir=$(/usr/local/openstudio-3.5.0/bin/openstudio -e 'v = OpenStudio::XMLValidator.new("resources/utilities/xml/schema/HPXMLvalidator.xml"); tmp_dir = v.schemaPath.parent_path.to_s; files = Dir.glob("#{tmp_dir}/*"); puts tmp_dir; STDERR.puts "files: #{files}"'); ls $dir && echo "NOT OK: $dir is not deleted" || echo "OK, $dir is deleted"
files: ["/tmp/xmlvalidation-1705307359-0/iso_svrl_for_xslt1.xsl", "/tmp/xmlvalidation-1705307359-0/HPXMLvalidator_stylesheet.xslt", "/tmp/xmlvalidation-1705307359-0/iso_schematron_skeleton_for_xslt1.xsl"]
HPXMLvalidator_stylesheet.xslt iso_schematron_skeleton_for_xslt1.xsl iso_svrl_for_xslt1.xsl
NOT OK: /tmp/xmlvalidation-1705307359-0 is not deleted
Ok got it... It's BCLXML that calls XMLValidator::bclXMLValidator which creates a tmp dir and never cleans it
Same issue for gbxmlValidator
Udpated one-liner test, which does fail:
dir=$(openstudio -e 'v = OpenStudio::XMLValidator::bclXMLValidator(OpenStudio::BCLXMLType.new("MeasureXML"), OpenStudio::VersionString.new("3.1")); tmp_dir = v.schemaPath.parent_path.to_s; files = Dir.glob("#{tmp_dir}/*"); puts tmp_dir; STDERR.puts "files: #{files}"'); [ -d "$dir" ] && echo "NOT OK: $dir is not deleted" || echo "OK, $dir is deleted"
Issue overview
Ubuntu; /tmp is getting filled up with xmlvalidation directories
Current Behavior
/tmp/xmlvalidation directories and measure_v3.0.xsd files are not getting cleaned up
Expected Behavior
would like those files to get deleted.
Steps to Reproduce
This occurs in large quantities in OSAF runs, but I think any CLI run will reproduce.
Environment
Ubuntu 22, OS 3.6.1
Context
OSAF runs