Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stop upload if Satellite setting is disconnected #312

Merged
merged 1 commit into from Aug 19, 2020

Conversation

Ron-Lavi
Copy link
Member

No description provided.

Open3.popen2e(hash_to_s(env), *preprocess_command(command)) do |_stdin, stdout_stderr, wait_thread|
progress_output.status = "Running in pid #{wait_thread.pid}"
progress_output_for(instance_label) do |progress_output|
Open3.popen2e(hash_to_s(env), *preprocess_command(command)) do |stdin, stdout_stderr, wait_thread|
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Open3.popen2e(hash_to_s(env), *preprocess_command(command)) do |stdin, stdout_stderr, wait_thread|
Open3.popen2e(hash_to_s(env), *preprocess_command(command)) do |_stdin, stdout_stderr, wait_thread|

we do not use stdin parameter.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting why rubocop didn't catch it either

@Ron-Lavi
Copy link
Member Author

Thanks @ShimShtein, updated

label = UploadReportJob.output_label(organization_id)
if Setting[:content_disconnected]
progress_output_for(label) do |progress_output|
progress_output.write_line('Upload was stopped since this disconnected setting is enabled')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
progress_output.write_line('Upload was stopped since this disconnected setting is enabled')
progress_output.write_line('Upload was stopped since disconnected mode setting is enabled for content on this instance.')

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks it sounds better 👍

@ShimShtein ShimShtein merged commit 8aea2ce into theforeman:master Aug 19, 2020
Ron-Lavi added a commit to Ron-Lavi/foreman_rh_cloud that referenced this pull request Aug 20, 2020
(cherry picked from commit 8aea2ce)

Conflicts:
	lib/foreman_inventory_upload/async/shell_process.rb
Ron-Lavi added a commit to Ron-Lavi/foreman_rh_cloud that referenced this pull request Aug 20, 2020
(cherry picked from commit 8aea2ce)

Conflicts:	lib/foreman_inventory_upload/async/shell_process.rb
Ron-Lavi added a commit to Ron-Lavi/foreman_rh_cloud that referenced this pull request Aug 20, 2020
(cherry picked from commit 8aea2ce)

Conflicts:	lib/foreman_inventory_upload/async/shell_process.rb
(cherry picked from commit b31f13c)
ShimShtein pushed a commit that referenced this pull request Aug 20, 2020
(cherry picked from commit 8aea2ce)

Conflicts:	lib/foreman_inventory_upload/async/shell_process.rb
ShimShtein pushed a commit that referenced this pull request Aug 20, 2020
(cherry picked from commit 8aea2ce)

Conflicts:	lib/foreman_inventory_upload/async/shell_process.rb
(cherry picked from commit b31f13c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants