Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from

Conversation

neha-p6
Copy link

@neha-p6 neha-p6 commented Aug 9, 2024

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • If Gemfile.lock has changed, I have used --conservative to do it and included the full output in the Description above.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

…ption when parsing invalid xml. Without the ping latest gem gets pulled in.

Signed-off-by: Neha Pansare <[email protected]>
@neha-p6 neha-p6 requested review from a team as code owners August 9, 2024 15:21
This was referenced Aug 9, 2024
@tpowell-progress
Copy link
Contributor

Superseded by #529

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants