Bug #60318

Task #60284: Finishing after Gerrit and Redmine migration

Gerrit doesn't update forge issues

Added by Steffen Gebert over 7 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Must have
Target version:
-
Start date:
2014-07-15
Due date:
2014-07-23
% Done:

100%

Estimated time:

Description

If a new changeset is pushed to Gerrit, the issue on forge is not updated.

#1

Updated by Steffen Gebert over 7 years ago

Error in the logs:

Processing ApplicationController#index (for ::ffff:77.0.75.69 at 2014-07-15 00:58:24) [PUT]
  Parameters: {"_method"=>"put", "authenticity_token"=>"....", "issue"=>{"is_private"=>"0", "project_id"=>"27", "tracker_id"=>"1", "subject"=>"Final cleanup of TCA Overrides", "description"=>"Some of the
files still miss the die statement\nin the first line. To be consistent, add it to\nevery file.\n\nOn file had a check for TYPO3_MODE === BE which\nis wrong in these files because the result is cached.\n\nIf the first hit with empty cache is do
ne in a FE\nrequest, a wrong result would be cached.\n", "status_id"=>"1", "priority_id"=>"3", "assigned_to_id"=>"", "category_id"=>"", "fixed_version_id"=>"", "parent_issue_id"=>"", "start_date"=>"2014-07-15", "due_date"=>"", "estimated_hours" 
=>"", "done_ratio"=>"0", "custom_field_values"=>{"4"=>"6.2", "5"=>"", "8"=>"", "15"=>"0"}, "lock_version"=>"0"}, "time_entry"=>{"hours"=>"", "activity_id"=>"", "comments"=>""}, "notes"=>"", "attachments"=>{"1"=>{"description"=>""}}, "last_journ
al_id"=>"", "commit"=>"Submit", "issue_id"=>"60317"}

ActionController::MethodNotAllowed (Only post and delete requests are allowed.):
  vendor/bundle/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/routing/recognition_optimisation.rb:64:in `recognize_path'
  vendor/bundle/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/routing/route_set.rb:442:in `recognize'
  vendor/bundle/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/routing/route_set.rb:437:in `call'
  vendor/bundle/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/dispatcher.rb:87:in `dispatch'
  vendor/bundle/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/dispatcher.rb:121:in `_call'
  vendor/bundle/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/dispatcher.rb:130:in `block in build_middleware_stack'
  vendor/bundle/ruby/1.9.1/gems/activerecord-2.3.18/lib/active_record/query_cache.rb:29:in `call'
  vendor/bundle/ruby/1.9.1/gems/activerecord-2.3.18/lib/active_record/query_cache.rb:29:in `block in call'
  vendor/bundle/ruby/1.9.1/gems/activerecord-2.3.18/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
  vendor/bundle/ruby/1.9.1/gems/activerecord-2.3.18/lib/active_record/query_cache.rb:9:in `cache'
  vendor/bundle/ruby/1.9.1/gems/activerecord-2.3.18/lib/active_record/query_cache.rb:28:in `call'
  vendor/bundle/ruby/1.9.1/gems/activerecord-2.3.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
  vendor/bundle/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/string_coercion.rb:25:in `call'
  vendor/bundle/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/params_parser.rb:15:in `call'
  vendor/bundle/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/session/cookie_store.rb:99:in `call'
  vendor/bundle/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/failsafe.rb:26:in `call'
  <internal:prelude>:10:in `synchronize'
  vendor/bundle/ruby/1.9.1/gems/actionpack-2.3.18/lib/action_controller/dispatcher.rb:106:in `call'
  vendor/bundle/ruby/1.9.1/gems/thin-1.6.2/lib/thin/connection.rb:86:in `block in pre_process'
  vendor/bundle/ruby/1.9.1/gems/thin-1.6.2/lib/thin/connection.rb:84:in `catch'
#2

Updated by Steffen Gebert over 7 years ago

Output of bundle exec rake routes:

issue GET           /issues/:id(.:format)                                         {:controller=>"issues", :action=>"show"}
      PUT           /issues/:id(.:format)                                         {:controller=>"issues", :action=>"update"}

So no clue, why this is happening.

#3

Updated by Steffen Gebert over 7 years ago

One thing that I've already tried is to replace the http:// URLs in /var/gerrit/review/hooks/patchset-created.d/update-forge-issue.php with https (resp. port 443 for the fsockopen call).

We probably need this as we're now redirecting http calls to https on forge.

#4

Updated by Michael Stucki over 7 years ago

Steffen Gebert wrote:

One thing that I've already tried is to replace the http:// URLs in /var/gerrit/review/hooks/patchset-created.d/update-forge-issue.php with https (resp. port 443 for the fsockopen call).

We probably need this as we're now redirecting http calls to https on forge.

That's right. Had to do the same to fix some RSS feeds which are displayed on typo3.org.

#5

Updated by Michael Stucki over 7 years ago

  • Due date set to 2014-07-23
  • Assignee set to Peter Niederlag
#6

Updated by Stefan Neufeind over 7 years ago

For some reason Gerrit at least can mark a ticket as "resolved" somehow, it seems. Maybe that helps to debug things? Example where gerrit automatically set it as resolved and gave a note in what changeset this was applied: https://forge.typo3.org/issues/60401

#7

Updated by Peter Niederlag over 7 years ago

Resolved is handled by a different mechnismen ;)

  • gerrit/hook/patchset-created |-- triggers -- > update forge ticket to add pointer to gerrit review
  • forge repositories are synched (tags/branches)
    • lines with Resolves|Fixes: #XXXX shows up in refs/heads/* will close corresponding ticket

Steffen did some investigations and we rolled out t3-gerrit 0.4.8 which should hopefully solve this matter (using tls:// and port 443 for connection from gerrit hook to forge)

#8

Updated by Peter Niederlag over 7 years ago

  • Status changed from Accepted to Under Review
#9

Updated by Peter Niederlag over 7 years ago

  • Status changed from Under Review to Resolved

seems to be working again: https://forge.typo3.org/issues/60436 :)

Please report here if you still spot it failing somewhere.

#10

Updated by Stefan Neufeind over 7 years ago

I can confirm it seems to work. Pushing a changeset here http://forge.typo3.org/issues/60327 worked fine as well.

#11

Updated by Michael Stucki over 7 years ago

  • % Done changed from 0 to 100
#12

Updated by Steffen Gebert over 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF