chef / knife-windows

Plugin for Chef's knife tool for working with Windows nodes
Apache License 2.0
152 stars 110 forks source link

Add dependency to pin rexml at <= 3.3.1 as latest versions throw exception… #527

Closed neha-p6 closed 3 months ago

neha-p6 commented 3 months ago

Description

The specs currently throw following error


Failure/Error: doc = REXML::Document.new(response.body)
--
  |  
  | REXML::ParseException:
  | Malformed XML: Content at the start of the document (got 'I am invalid')
  | Line: 1
  | Position: 12
  | Last 80 unconsumed characters:
  | # /usr/local/bundle/gems/rexml-3.3.4/lib/rexml/parsers/baseparser.rb:488:in `pull_event'
  | # /usr/local/bundle/gems/rexml-3.3.4/lib/rexml/parsers/baseparser.rb:219:in `pull'
  | # /usr/local/bundle/gems/rexml-3.3.4/lib/rexml/parsers/treeparser.rb:22:in `parse'
  | # /usr/local/bundle/gems/rexml-3.3.4/lib/rexml/document.rb:448:in `build'
  | # /usr/local/bundle/gems/rexml-3.3.4/lib/rexml/document.rb:101:in `initialize'
  | # ./lib/chef/knife/wsman_test.rb:101:in `new'
  | # ./lib/chef/knife/wsman_test.rb:101:in `parse_response'
  | # ./lib/chef/knife/wsman_test.rb:59:in `block in verify_wsman_accessiblity_for_nodes'
  | # ./lib/chef/knife/wsman_test.rb:49:in `each'
  | # ./lib/chef/knife/wsman_test.rb:49:in `verify_wsman_accessiblity_for_nodes'
  | # ./lib/chef/knife/wsman_test.rb:42:in `run'
  | # ./spec/unit/knife/wsman_test_spec.rb:67:in `block (5 levels) in <top (required)>'
  | # ./spec/spec_helper.rb:38:in `block (2 levels) in <top (required)>'

This is seen at verify pipeline at chef/chef (Could have been seen here as well but apparently the verify pipeline here isn't getting triggered since ages, need to fix that) Chef main pipeline: https://buildkite.com/chef-oss/chef-chef-main-verify/builds/17813#0191322e-0e5c-4c1e-b906-8e2087139b48/139-1073 This started happening since rexml 3.3.2 onward. The earlier rexml versions did not throw malformed xml error if a string is passed (i.e non xml value is passed). So we put a pin to not pull that in since the gem uses rexml parsing on strings as well.

Related Issue

Types of changes

Checklist:

tpowell-progress commented 3 months ago

Superseded by #529