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

Pact broker sporadically fails while publishing verification results #189

Closed
dhoomakethu opened this issue Feb 9, 2018 · 4 comments
Closed
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@dhoomakethu
Copy link

Hi,

We are sporadically facing this error while publishing the verification results (both from the provider-verifier and also from the HAL browser)

broker docker image -> dius/pact-broker:latest

{
  "message": "undefined method `name' for nil:NilClass",
  "backtrace": [
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/pact_broker-2.13.1/lib/pact_broker/api/decorators/verification_decorator.rb:18:in `block in <class:VerificationDecorator>'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/roar-1.1.0/lib/roar/hypermedia.rb:73:in `instance_exec'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/roar-1.1.0/lib/roar/hypermedia.rb:73:in `run_link_block'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/roar-1.1.0/lib/roar/hypermedia.rb:61:in `block in compile_links_for'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/roar-1.1.0/lib/roar/hypermedia.rb:59:in `collect'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/roar-1.1.0/lib/roar/hypermedia.rb:59:in `compile_links_for'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/roar-1.1.0/lib/roar/hypermedia.rb:55:in `prepare_links!'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/roar-1.1.0/lib/roar/hypermedia.rb:104:in `block in create_links_definition!'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/declarative-option-0.1.0/lib/declarative/option.rb:24:in `instance_exec'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/declarative-option-0.1.0/lib/declarative/option.rb:24:in `block in lambda_for_proc'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/representable-3.0.4/lib/representable/binding.rb:46:in `evaluate_option'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/representable-3.0.4/lib/representable/serializer.rb:3:in `block in <module:Representable>'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/representable-3.0.4/lib/representable/pipeline.rb:18:in `evaluate'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/representable-3.0.4/lib/representable/pipeline.rb:10:in `block in call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/representable-3.0.4/lib/representable/pipeline.rb:9:in `each'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/representable-3.0.4/lib/representable/pipeline.rb:9:in `inject'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/representable-3.0.4/lib/representable/pipeline.rb:9:in `call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/representable-3.0.4/lib/representable/binding.rb:32:in `compile_fragment'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/representable-3.0.4/lib/representable.rb:53:in `block in call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/representable-3.0.4/lib/representable.rb:51:in `each'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/representable-3.0.4/lib/representable.rb:51:in `call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/representable-3.0.4/lib/representable.rb:70:in `representable_map!'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/representable-3.0.4/lib/representable.rb:45:in `create_representation_with'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/representable-3.0.4/lib/representable/hash.rb:34:in `to_hash'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/roar-1.1.0/lib/roar/json/hal.rb:58:in `to_hash'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/representable-3.0.4/lib/representable/json.rb:44:in `to_json'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/pact_broker-2.13.1/lib/pact_broker/api/resources/verifications.rb:47:in `from_json'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/webmachine-1.5.0/lib/webmachine/decision/helpers.rb:65:in `accept_helper'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/webmachine-1.5.0/lib/webmachine/decision/flow.rb:424:in `n11'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/webmachine-1.5.0/lib/webmachine/decision/fsm.rb:31:in `block (2 levels) in run'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/webmachine-1.5.0/lib/webmachine/decision/fsm.rb:51:in `handle_exceptions'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/webmachine-1.5.0/lib/webmachine/decision/fsm.rb:31:in `block in run'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/webmachine-1.5.0/lib/webmachine/decision/fsm.rb:29:in `loop'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/webmachine-1.5.0/lib/webmachine/decision/fsm.rb:29:in `run'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/webmachine-1.5.0/lib/webmachine/dispatcher.rb:46:in `block in dispatch'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/as-notifications-1.0.1/lib/as/notifications.rb:161:in `instrument'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/webmachine-1.5.0/lib/webmachine/events.rb:75:in `instrument'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/webmachine-1.5.0/lib/webmachine/dispatcher.rb:45:in `dispatch'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/webmachine-1.5.0/lib/webmachine/adapters/rack.rb:68:in `call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/pact_broker-2.13.1/lib/rack/pact_broker/database_transaction.rb:35:in `block in call_with_transaction'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/sequel-4.49.0/lib/sequel/database/transactions.rb:224:in `_transaction'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/sequel-4.49.0/lib/sequel/database/transactions.rb:199:in `block in transaction'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/sequel-4.49.0/lib/sequel/database/connecting.rb:301:in `block in synchronize'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/sequel-4.49.0/lib/sequel/connection_pool/threaded.rb:107:in `hold'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/sequel-4.49.0/lib/sequel/database/connecting.rb:301:in `synchronize'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/sequel-4.49.0/lib/sequel/database/transactions.rb:165:in `transaction'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/pact_broker-2.13.1/lib/rack/pact_broker/database_transaction.rb:34:in `call_with_transaction'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/pact_broker-2.13.1/lib/rack/pact_broker/database_transaction.rb:18:in `call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/pact_broker-2.13.1/lib/rack/pact_broker/no_auth.rb:9:in `call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/builder.rb:153:in `call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/cascade.rb:33:in `block in call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/cascade.rb:24:in `each'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/cascade.rb:24:in `call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/urlmap.rb:68:in `block in call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/urlmap.rb:53:in `each'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/urlmap.rb:53:in `call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/static.rb:149:in `call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/pact_broker-2.13.1/lib/rack/hal_browser/redirect.rb:20:in `call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/pact_broker-2.13.1/lib/rack/pact_broker/convert_file_extension_to_accept_header.rb:22:in `call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/static.rb:149:in `call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/static.rb:149:in `call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/pact_broker-2.13.1/lib/rack/pact_broker/add_pact_broker_version_header.rb:14:in `call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/pact_broker-2.13.1/lib/rack/pact_broker/store_base_url.rb:10:in `call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/pact_broker-2.13.1/lib/rack/pact_broker/invalid_uri_protection.rb:16:in `call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/rack-protection-2.0.0/lib/rack/protection/xss_header.rb:18:in `call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/rack-protection-2.0.0/lib/rack/protection/json_csrf.rb:26:in `call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/rack-protection-2.0.0/lib/rack/protection/base.rb:50:in `call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/rack-protection-2.0.0/lib/rack/protection/frame_options.rb:31:in `call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/builder.rb:153:in `call'",
    "/home/app/pact_broker/vendor/bundle/ruby/2.4.0/gems/pact_broker-2.13.1/lib/pact_broker/app.rb:55:in `call'",
    "/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:97:in `process_request'",
    "/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:160:in `accept_and_process_next_request'",
    "/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:113:in `main_loop'",
    "/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:416:in `block (3 levels) in start_threads'",
    "/usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'"
  ]
}
@bethesque bethesque added the bug Indicates an unexpected problem or unintended behavior label Feb 11, 2018
@bethesque
Copy link
Member

I believe this is the same bug I came across the other day. It needs to be fixed anyway, but I believe it surfaces when you are re-publishing a pact with the same consumer version. Can you confirm if this is what you are doing?

@bethesque
Copy link
Member

I've just pushed 2.14.0-1 to the docker repo. Let me know how it goes.

@dhoomakethu
Copy link
Author

It is still being built, I will update once I get hold of the latest image. Thanks.

@dhoomakethu
Copy link
Author

Looks good, I did not see the error again. Thanks

YOU54F pushed a commit to YOU54F/pact_broker that referenced this issue Jul 31, 2024
…act-foundation#189)

* update specification to take care of Arazzo (Tapestry) name change.

* chore: remove `prerelease` from examples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants