Skip to content

Commit

Permalink
Fixes #38150 - Switch the log level of 2 messages to debug level (#11287
Browse files Browse the repository at this point in the history
)
  • Loading branch information
hao-yu authored Jan 27, 2025
1 parent a30fb41 commit 882b257
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/services/katello/pulp3/task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ def self.version_href(tasks)
tasks = [tasks] unless tasks.is_a?(Array)
version_hrefs = tasks.map { |task| task[:created_resources] }.flatten
version_hrefs = version_hrefs.select { |href| ::Katello::Pulp3::Repository.version_href?(href) }
Rails.logger.error("Got multiple version_hrefs for pulp task: #{tasks}") if version_hrefs.length > 2
Rails.logger.debug("Got multiple version_hrefs for pulp task: #{tasks}") if version_hrefs.length > 2
version_hrefs.last
end

def self.publication_href(tasks)
tasks = [tasks] unless tasks.is_a?(Array)
publication_hrefs = tasks.map { |task| task[:created_resources] }.flatten
publication_hrefs = publication_hrefs.select { |href| ::Katello::Pulp3::Repository.publication_href?(href) }
Rails.logger.error("Got multiple publication hrefs for pulp task: #{tasks}") if publication_hrefs.length > 2
Rails.logger.debug("Got multiple publication hrefs for pulp task: #{tasks}") if publication_hrefs.length > 2
publication_hrefs.last #return the last href to workaround https://pulp.plan.io/issues/9098
end

Expand Down

0 comments on commit 882b257

Please sign in to comment.