Skip to content

Use get object https url with direct uploder

What does this MR do?

This MR does

  • Fog::Storage::GoogleXML#get_object_https_url instead of Fog::Storage::GoogleXML#get_object_url
  • Fog::Storage::GoogleJSON#get_object_https_url instead of Fog::Storage::GoogleJSON#get_object_url
  • Fog::Storage::AWS#get_object_https_url instead of Fog::Storage::AWS#get_object_url

FYI, get_object_url are equavalant to get_object_https_url

module Fog
  module Storage
    class GoogleJSON
      class Real
        # Get an expiring object url from GCS
        # Deprecated, redirects to get_object_https_url.rb
        def get_object_url(bucket_name, object_name, expires)
          Fog::Logger.deprecation("Fog::Storage::Google => #get_object_url is deprecated, use #get_object_https_url instead[/] [light_black](#{caller(0..0)})")
          get_object_https_url(bucket_name, object_name, expires)
        end
      end
module Fog
  module Storage
    class GoogleXML
      class Real
        # Get an expiring object url from Google Storage
        #
        # ==== Parameters
        # * bucket_name<~String> - Name of bucket containing object
        # * object_name<~String> - Name of object to get expiring url for
        # * expires<~Time> - An expiry time for this url
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~String> - url for object

        def get_object_url(bucket_name, object_name, expires)
          Fog::Logger.deprecation("Fog::Storage::Google => #get_object_url is deprecated, use #get_object_https_url instead[/] [light_black](#{caller(1..1).first})")
          get_object_https_url(bucket_name, object_name, expires)
        end
      end
module Fog
  module Storage
    class AWS
      module GetObjectHttpsUrl
        def get_object_https_url(bucket_name, object_name, expires, options = {})
          get_object_url(bucket_name, object_name, expires, options.merge(:scheme => 'https'))
        end
      end

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

  • Conform by the code review guidelines
    • Has been reviewed by a Database specialist
  • End-to-end tests pass (package-and-qa manual pipeline job)

What are the relevant issue numbers?

closes https://gitlab.com/gitlab-org/gitlab-ce/issues/46684

Edited by Shinya Maeda

Merge request reports