Jira (FACT-3205) Transient failure in integration testing around 'write_to_file' method

4 views
Skip to first unread message

Christopher Thorn (Jira)

unread,
May 23, 2023, 9:19:02 PM5/23/23
to puppe...@googlegroups.com
Christopher Thorn created an issue
 
Facter / Bug FACT-3205
Transient failure in integration testing around 'write_to_file' method
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2023/05/23 6:18 PM
Priority: Normal Normal
Reporter: Christopher Thorn

When running integration spec tests via `bundle exec rake spec_integration`, there is on occasion a transient failure with the method `write_to_file` that is located here.

An example of a failure is in Josh's recent PR where we have it failing with Jruby:

Failures:
 
  1) Facter .value when structured facts are disabled with external fact when has the same name as a structured core fact overrides part of the core fact
     Failure/Error: File.open(file, 'w') { |f| f.print to_write }
 
     Errno::ENOENT:
       No such file or directory - /tmp/external_facts20230506-1937-c1swbx/TPQFNUSF_os_fact.yaml
     # ./spec_integration/facter_spec.rb:13:in `write_to_file'
     # ./spec_integration/facter_spec.rb:217:in `block in <main>'
 
Finished in 1 minute 41.93 seconds (files took 17.65 seconds to load)
132 examples, 1 failure

I've reproduced this locally off of the main branch of Facter using jruby 9.3.7.0, and it failed with the same helper method but on a different block:

Failures:
 
  1) Facter .to_user_output with external facts with array as value does not use non numeric string as index
     Failure/Error: File.open(file, 'w') { |f| f.print to_write }
 
     Errno::ENOENT:
       No such file or directory - /var/folders/51/zzwtq8mx28d2d4xpg26xk3n00000gp/T/external_facts20230523-22303-1m7n44l/JOHNFAPU_os_fact.yaml
     # ./spec_integration/facter_spec.rb:13:in `write_to_file'
     # ./spec_integration/facter_spec.rb:432:in `block in <main>'

This is a pretty sporadic transient failure, I have to re-run the spec integration tests about 5+ times to get it to fail once.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.21#820021-sha1:38274c8)
Atlassian logo

Tony Vu (Jira)

unread,
May 30, 2023, 4:14:02 PM5/30/23
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 1, 2023, 8:05:02 PM6/1/23
to puppe...@googlegroups.com
Josh Cooper commented on Bug FACT-3205
 
Re: Transient failure in integration testing around 'write_to_file' method

Also happening in CI https://github.com/puppetlabs/facter/actions/runs/5135872309/jobs/9241862743

Failures:
 
  1) Facter .fact with external facts with array as value does not use non negative index
     Failure/Error: File.open(file, 'w') { |f| f.print to_write }
 
     Errno::ENOENT:
       No such file or directory - /tmp/external_facts20230531-1859-rbh4rj/VXQQPGXR_os_fact.yaml
     # ./spec_integration/facter_spec.rb:13:in `write_to_file'
     # ./spec_integration/facter_spec.rb:810:in `block in <main>'
 
Finished in 3 minutes 43 seconds (files took 25.16 seconds to load)
133 examples, 1 failure
 
Failed examples:
 
rspec ./spec_integration/facter_spec.rb:827 # Facter .fact with external facts with array as value does not use non negative index
 
Randomized with seed 46317

Reply all
Reply to author
Forward
0 new messages