Project

General

Profile

Actions

Bug #34817

closed

hammer repo update fails on when providing docker info

Added by Partha Aji over 2 years ago. Updated over 2 years ago.

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

Description

hammer  repository update  --id=6 --docker-tag=fooo --docker-digest fooo
Failed to upload tag 'fooo' to repository.

Problem here is that checksum andname were marked as a required attribute for uploading tags (https://github.com/Katello/katello/commit/2d288ff1a6ae471119d6810c9abe9ce555f97971#diff-eb6d422595ae4985453cfc250a62dee0cc00e7c88c5717928940130d0ffe8b80R423-R424)

However the hammer bindings have not gotten updated to work with this update https://github.com/Katello/hammer-cli-katello/blob/master/lib/hammer_cli_katello/repository.rb#L273-L279

Additional info

 INFO 2022-04-25T21:17:14 API] POST /katello/api/repositories/6/content_uploads
[DEBUG 2022-04-25T21:17:14 API] Params: {
    :size => 0
}
[DEBUG 2022-04-25T21:17:14 API] Headers: {}
[DEBUG 2022-04-25T21:17:14 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[DEBUG 2022-04-25T21:17:14 API] Response: {
    "upload_id" => "e201385c-7325-469b-b45e-f8abb9a2c4b1" 
}
[DEBUG 2022-04-25T21:17:14 API] Response headers: {
                      :foreman_version => "3.3.0-develop",
                  :foreman_api_version => "2",
         :foreman_current_organization => "; ANY",
             :foreman_current_location => "; ANY",
                         :content_type => "application/json; charset=utf-8",
                      :apipie_checksum => "b519f913c8b91974080679e35e3fef2f1a4812a5",
                                 :etag => "W/\"3103195692be7e6409a4bb90ffbbfe45\"",
                        :cache_control => "max-age=0, private, must-revalidate",
                           :set_cookie => [
        [0] "_session_id=4053a1519d822c4f7695fa4ba855748f; path=/; HttpOnly; SameSite=Lax" 
    ],
                         :x_request_id => "3302f41e-0792-4380-af88-74ff2da7c1c5",
                            :x_runtime => "0.283366",
                      :x_frame_options => "sameorigin",
               :x_content_type_options => "nosniff",
                     :x_xss_protection => "1; mode=block",
                   :x_download_options => "noopen",
    :x_permitted_cross_domain_policies => "none",
              :content_security_policy => "default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data:; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'",
                    :transfer_encoding => "chunked" 
}
[ERROR 2022-04-25T21:17:14 HammerCLIKatello::Repository::UpdateCommand] <ApipieBindings::MissingArgumentsError> ApipieBindings::MissingArgumentsError: uploads[0][checksum]
    /home/vagrant/.gem/ruby/gems/apipie-bindings-0.4.0/lib/apipie_bindings/action.rb:63:in `validate!'
    /home/vagrant/.gem/ruby/gems/apipie-bindings-0.4.0/lib/apipie_bindings/api.rb:182:in `call'
    /home/vagrant/.gem/ruby/gems/apipie-bindings-0.4.0/lib/apipie_bindings/resource.rb:21:in `call'
    /home/vagrant/git/hammer-cli-katello/lib/hammer_cli_katello/repository.rb:307:in `import_uploads'
    /home/vagrant/git/hammer-cli-katello/lib/hammer_cli_katello/repository.rb:273:in `upload_tag'
    /home/vagrant/git/hammer-cli-katello/lib/hammer_cli_katello/repository.rb:259:in `execute'
    /home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /home/vagrant/.gem/ruby/gems/hammer_cli-3.2.0/lib/hammer_cli/abstract.rb:103:in `run'
    /home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /home/vagrant/.gem/ruby/gems/hammer_cli-3.2.0/lib/hammer_cli/abstract.rb:103:in `run'
    /home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /home/vagrant/.gem/ruby/gems/hammer_cli-3.2.0/lib/hammer_cli/abstract.rb:103:in `run'
    /home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
    /home/vagrant/.gem/ruby/gems/hammer_cli-3.2.0/bin/hammer:147:in `<top (required)>'
    /home/vagrant/.gem/ruby/bin/hammer:23:in `load'

Need to update the hammer bindings accordingly.

Actions #1

Updated by Chris Roberts over 2 years ago

  • Target version set to Katello 4.5.0
  • Triaged changed from No to Yes
Actions #2

Updated by The Foreman Bot over 2 years ago

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

Updated by The Foreman Bot over 2 years ago

  • Fixed in Releases Katello 4.5.0 added
Actions #4

Updated by Lucy Fu over 2 years ago

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

Updated by The Foreman Bot over 2 years ago

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

Also available in: Atom PDF