Project

General

Profile

Bug #21484

Docker Tags auto complete broken

Added by Partha Aji almost 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Container
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

1) Sync a Docker Repo
2) Goto Content -> Docker Tags
3) Type anything in the Filters

Expected:
A list showing the search/auto complete options

Actual:
ISE

"GET https://katello.example.com/katello/api/v2/docker_tags/auto_complete_search?grouped=true&organization_id=1&page=1&paged=true&per_page=20&search=&sort_by=name&sort_order=ASC 500 (Internal Server Error)"

with the server raising a stack trace

2017-10-27T03:14:01 91094dbe [app] [I] Started GET "/katello/api/v2/docker_tags/auto_complete_search?grouped=true&organization_id=1&page=1&paged=true&per_page=20&search=&sort_by=name&sort_order=ASC" for ::1 at 2017-10-27 03:14:01 +0000
2017-10-27T03:14:01 91094dbe [app] [I] Processing by Katello::Api::V2::DockerTagsController#auto_complete_search as JSON
2017-10-27T03:14:01 91094dbe [app] [I]   Parameters: {"grouped"=>"true", "organization_id"=>"1", "page"=>"1", "paged"=>"true", "per_page"=>"20", "search"=>"", "sort_by"=>"name", "sort_order"=>"ASC", "api_version"=>"v2"}
2017-10-27T03:14:01 91094dbe [app] [I] Current user: admin (administrator)
2017-10-27T03:14:01 91094dbe [app] [D] Setting current user thread-local variable to admin
2017-10-27T03:14:01 91094dbe [app] [D] Setting current organization thread-local variable to Default Organization
2017-10-27T03:14:02 91094dbe [app] [E] NoMethodError: undefined method `complete_for' for #<Katello::DockerMetaTag::ActiveRecord_Relation:0x007fc769a7d4a0>
 | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.9/lib/active_record/relation/delegation.rb:136:in `method_missing'
 | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.9/lib/active_record/relation/delegation.rb:99:in `method_missing'
 | /home/vagrant/katello/app/controllers/katello/concerns/filtered_auto_complete_search.rb:11:in `auto_complete_search'
 | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/actionpack-4.2.9/lib/action_controller/metal/implicit_render.rb:4:in `send_action'

Associated revisions

Revision 6bfcb68c (diff)
Added by Partha Aji almost 4 years ago

Fixes #21484 - Auto complete for Docker Meta Tag

This commit adds autocomplete constructs to docker meta tag and removes
the unused ones in docker tag. Idea here is DockerTagsController has now
completely shifted to using the DockerMetaTag model for all data
purposes and hence there is no value in holding auto complete
constructs there.

This commit also includes sensible auto complete values for docker
manifests so that one can search by things like the manifest's digest
name and schema version in the Repository -> Manage Docker Manifests
page.

History

#1 Updated by Partha Aji almost 4 years ago

  • Bugzilla link set to 1506865

#2 Updated by The Foreman Bot almost 4 years ago

  • Assignee set to Partha Aji
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7040 added

#3 Updated by Partha Aji almost 4 years ago

  • Target version set to 225

#4 Updated by Partha Aji almost 4 years ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

#5 Updated by Justin Sherrill almost 4 years ago

  • Legacy Backlogs Release (now unused) set to 250

Also available in: Atom PDF