Project

General

Profile

Actions

Bug #31334

closed

transient test fails wrt to outdated VCR cassettes for export tests

Added by James Jeffers about 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
Tests
Target version:
Fixed in Releases:
Found in Releases:

Description

See https://ci.theforeman.org/blue/organizations/jenkins/katello-pr-test/detail/katello-pr-test/5516/pipeline/

Example:

ForemanTasks::TaskError: Task 2977c15f-b601-41f2-996d-048091a6c167: VCR::Errors::UnhandledHTTPRequestError: ...
Stacktrace
ForemanTasks::TaskError: Task 2977c15f-b601-41f2-996d-048091a6c167: VCR::Errors::UnhandledHTTPRequestError: 
================================================================================
An HTTP request has been made that VCR does not know how to handle:
  POST https://node02.jenkins.osuosl.theforeman.org/pulp/api/v3/exporters/core/pulp/
VCR is currently using the following cassette:
  - /home/jenkins/workspace/katello-pr-test/test/fixtures/vcr_cassettes/actions/pulp3/content_view/export/destroy_exporter.yml
    - :record => :none
    - :match_requests_on => [:method, :path, :params, :body_json]
Under the current configuration VCR can not find a suitable HTTP interaction
to replay and is prevented from recording new requests. There are a few ways
you can deal with this:
  * If you're surprised VCR is raising this error
    and want insight about how VCR attempted to handle the request,
    you can use the debug_logger configuration option to log more details [1].
  * You can use the :new_episodes record mode to allow VCR to
    record this new request to the existing cassette [2].
  * If you want VCR to ignore this request (and others like it), you can
    set an `ignore_request` callback [3].
  * The current record mode (:none) does not allow requests to be recorded. You
    can temporarily change the record mode to :once, delete the cassette file 
    and re-run your tests to allow the cassette to be recorded with this request [4].
  * The cassette contains 11 HTTP interactions that have not been
    played back. If your request is non-deterministic, you may need to
    change your :match_requests_on cassette option to be more lenient
    or use a custom request matcher to allow it to match [5].
[1] https://www.relishapp.com/vcr/vcr/v/3-0-3/docs/configuration/debug-logging
[2] https://www.relishapp.com/vcr/vcr/v/3-0-3/docs/record-modes/new-episodes
[3] https://www.relishapp.com/vcr/vcr/v/3-0-3/docs/configuration/ignore-request
[4] https://www.relishapp.com/vcr/vcr/v/3-0-3/docs/record-modes/none
[5] https://www.relishapp.com/vcr/vcr/v/3-0-3/docs/request-matching
================================================================================
    foreman-tasks (3.0.2) lib/foreman_tasks.rb:59:in `block in sync_task'
    foreman-tasks (3.0.2) lib/foreman_tasks.rb:58:in `tap'
    foreman-tasks (3.0.2) lib/foreman_tasks.rb:58:in `sync_task'
    /home/jenkins/workspace/katello-pr-test/test/actions/pulp3/content_view_version/export_test.rb:23:in `create_exporter'
    /home/jenkins/workspace/katello-pr-test/test/actions/pulp3/content_view_version/export_test.rb:47:in `test_destroy_exporter'
    /home/jenkins/workspace/katello-pr-test/test/support/vcr.rb:27:in `block in run'
    /home/jenkins/workspace/katello-pr-test/test/support/vcr.rb:26:in `run' (ForemanTasks::TaskError)
/usr/local/rvm/gems/ruby-2.5.1@jenkins-katello-pr-test-5516-1/gems/foreman-tasks-3.0.2/lib/foreman_tasks.rb:59

Actions #1

Updated by Justin Sherrill about 4 years ago

  • Category set to Tests
  • Target version set to Katello 3.18.0
  • Triaged changed from No to Yes
Actions #2

Updated by The Foreman Bot about 4 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Justin Sherrill
  • Pull request https://github.com/Katello/katello/pull/9047 added
Actions #3

Updated by The Foreman Bot almost 4 years ago

  • Fixed in Releases Katello 4.0.0 added
Actions #4

Updated by Justin Sherrill almost 4 years ago

  • Status changed from Ready For Testing to Closed
Actions #5

Updated by The Foreman Bot almost 4 years ago

  • Pull request https://github.com/Katello/katello/pull/9142 added
Actions #6

Updated by The Foreman Bot over 3 years ago

  • Pull request https://github.com/Katello/katello/pull/9199 added
Actions

Also available in: Atom PDF