Skip to content

Commit

Permalink
Fixes #36083 - Remove remote_execution_by_default setting
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylenz committed Aug 9, 2023
1 parent b291abc commit 4993bb5
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ def incremental_update
validate_content(params[:add_content])
resolve_dependencies = params.fetch(:resolve_dependencies, true)
task = async_task(::Actions::Katello::ContentView::IncrementalUpdates, @content_view_version_environments, @composite_version_environments,
params[:add_content], resolve_dependencies, hosts, params[:description],
Setting[:remote_execution_by_default] && ::Katello.with_remote_execution?)
params[:add_content], resolve_dependencies, hosts, params[:description])
respond_for_async :resource => task
end

Expand Down
4 changes: 2 additions & 2 deletions app/lib/actions/katello/content_view/incremental_updates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ module ContentView
class IncrementalUpdates < Actions::EntryAction
include Helpers::Presenter

def plan(version_environments, composite_version_environments, content, dep_solve, hosts, description,
use_remote_execution = false)
def plan(version_environments, composite_version_environments, content, dep_solve, hosts, description) # rubocop:disable Metrics/MethodLength
use_remote_execution = true # TODO: remove this when we remove katello-agent dynflow actions
old_new_version_map = {}
output_for_version_ids = []

Expand Down
4 changes: 0 additions & 4 deletions app/views/katello/api/v2/content_facet/show.json.rabl
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ child :content_facet => :content_facet_attributes do
Katello.with_katello_agent?
end

node :remote_execution_by_default do
Katello.remote_execution_by_default?
end

user = User.current # current_user is not available here
child :permissions do
node(:view_lifecycle_environments) { user.can?("view_lifecycle_environments") }
Expand Down
2 changes: 1 addition & 1 deletion lib/katello/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def self.with_katello_agent?
end

def self.remote_execution_by_default?
self.with_katello_agent? ? Setting['remote_execution_by_default'] : true
true
end

def self.with_ansible?
Expand Down
6 changes: 0 additions & 6 deletions lib/katello/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -575,12 +575,6 @@ def katello_template_setting_values(name)
full_name: N_('Sync Sock Read Timeout'),
description: N_("The maximum number of seconds that Pulp can take to download a file, not counting connection time.")

setting 'remote_execution_by_default',
type: :boolean,
default: false,
full_name: N_('Use remote execution by default'),
description: N_("If this is enabled, remote execution is used instead of katello-agent for remote actions")

setting 'unregister_delete_host',
type: :boolean,
default: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def test_incremental_update
errata_id = Katello::Erratum.first.pulp_id
@controller.expects(:async_task).with(::Actions::Katello::ContentView::IncrementalUpdates,
[{:content_view_version => version, :environments => [@beta]}], [],
{'errata_ids' => [errata_id]}, true, [], nil, false).returns({})
{'errata_ids' => [errata_id]}, true, [], nil).returns({})

put :incremental_update, params: { :content_view_version_environments => [{:content_view_version_id => version.id, :environment_ids => [@beta.id]}], :add_content => {:errata_ids => [errata_id]}, :resolve_dependencies => true }

Expand All @@ -276,7 +276,7 @@ def test_incremental_update_with_deb
deb_id = Katello::Deb.first.id
@controller.expects(:async_task).with(::Actions::Katello::ContentView::IncrementalUpdates,
[{:content_view_version => version, :environments => [@beta]}], [],
{'errata_ids' => [errata_id], 'deb_ids' => [deb_id]}, true, [], nil, false).returns({})
{'errata_ids' => [errata_id], 'deb_ids' => [deb_id]}, true, [], nil).returns({})

put :incremental_update, params: { :content_view_version_environments => [{:content_view_version_id => version.id, :environment_ids => [@beta.id]}], :add_content => {:errata_ids => [errata_id], :deb_ids => [deb_id]}, :resolve_dependencies => true }

Expand All @@ -288,7 +288,7 @@ def test_incremental_update_without_env
errata_id = Katello::Erratum.first.pulp_id
@controller.expects(:async_task).with(::Actions::Katello::ContentView::IncrementalUpdates,
[{:content_view_version => version, :environments => []}], [],
{'errata_ids' => [errata_id]}, true, [], nil, false).returns({})
{'errata_ids' => [errata_id]}, true, [], nil).returns({})

put :incremental_update, params: { :content_view_version_environments => [{:content_view_version_id => version.id, :environment_ids => []}], :update_hosts => {:included => {:search => ''}}, :add_content => {:errata_ids => [errata_id]}, :resolve_dependencies => true }

Expand Down

0 comments on commit 4993bb5

Please sign in to comment.