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 #526

Closed neha-p6 closed 1 month ago

neha-p6 commented 1 month 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 17 : https://buildkite.com/chef-oss/chef-chef-chef-17-verify/builds/2776#01912e84-08d1-4526-a869-8549d9e1b0dd/193-1399 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 1 month ago

Superseded by #528