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

Chained container proxies configuration refactor #8658

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rjpmestre
Copy link
Contributor

@rjpmestre rjpmestre commented Apr 24, 2024

What does this PR change?

Introduces the Chain of Responsibility pattern to streamline the creation of a proxy container configuration file. This enhances code readability as we extracted a portion of code from the SystemManager class (which was dedicated to this flow) and relocated it into a dedicated structures with clear and defined steps. Additionally, it also improves testability as each step has a narrow scope.

GUI diff

No difference.

  • DONE

Documentation

  • No documentation needed: we commented each object/step with their purpose

  • DONE

Test coverage

  • No tests: already covered

  • DONE

Links

Related:

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Re-run a test

If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:

  • Re-run test "changelog_test"
  • Re-run test "backend_unittests_pgsql"
  • Re-run test "java_pgsql_tests"
  • Re-run test "schema_migration_test_pgsql"
  • Re-run test "susemanager_unittests"
  • Re-run test "javascript_lint"
  • Re-run test "spacecmd_unittests"

Before you merge

Check How to branch and merge properly!

Copy link
Contributor

👋 Hello! Thanks for contributing to our project.
Acceptance tests will take some time (aprox. 1h), please be patient ☕
You can see the progress at the end of this page and at https://github.com/uyuni-project/uyuni/pull/8658/checks
Once tests finish, if they fail, you can check 👀 the cucumber report. See the link at the output of the action.
You can also check the artifacts section, which contains the logs at https://github.com/uyuni-project/uyuni/pull/8658/checks.

If you are unsure the failing tests are related to your code, you can check the "reference jobs". These are jobs that run on a scheduled time with code from master. If they fail for the same reason as your build, it means the tests or the infrastructure are broken. If they do not fail, but yours do, it means it is related to your code.

Reference tests:

KNOWN ISSUES

Sometimes the build can fail when pulling new jar files from download.opensuse.org . This is a known limitation. Given this happens rarely, when it does, all you need to do is rerun the test. Sorry for the inconvenience.

For more tips on troubleshooting, see the troubleshooting guide.

Happy hacking!
⚠️ You should not merge if acceptance tests fail to pass. ⚠️

Copy link
Contributor

github-actions bot commented Apr 24, 2024

Suggested tests to cover this Pull Request
  • minssh_bootstrap_api
  • srv_channels_add
  • min_rhlike_monitoring
  • min_deblike_remote_command
  • srv_power_management
  • srv_power_management_api
  • srv_logfile
  • min_action_chain
  • min_project_lotus
  • minssh_move_from_and_to_proxy
  • min_deblike_openscap_audit
  • proxy_retail_pxeboot_and_mass_import
  • srv_check_sync_source_packages
  • min_salt_minions_page
  • allcli_sanity
  • allcli_overview_systems_details
  • proxy_cobbler_pxeboot
  • min_bootstrap_reactivation
  • allcli_config_channel
  • minkvm_guests
  • min_salt_formulas
  • min_ansible_control_node
  • srv_patches_page
  • min_salt_formulas_advanced
  • srv_payg_ssh_connection
  • srv_handle_software_channels_with_ISS_v2
  • proxy_register_as_minion_with_script
  • srv_datepicker
  • min_salt_openscap_audit
  • minssh_ansible_control_node
  • min_salt_install_package
  • srv_user_configuration_salt_states
  • allcli_system_group
  • srv_group_union_intersection
  • min_check_patches_install
  • srv_change_password
  • srv_users
  • allcli_action_chain
  • srv_power_management_redfish
  • srv_user_preferences
  • min_recurring_action
  • min_monitoring
  • srv_dist_channel_mapping
  • min_salt_pkgset_beacon
  • minssh_salt_install_package
  • buildhost_osimage_build_image
  • srv_check_channels_page
  • srv_disable_local_repos_off
  • proxy_branch_network
  • min_activationkey
  • min_deblike_ssh
  • srv_clone_channel_npn
  • min_salt_user_states
  • srv_virtual_host_manager
  • allcli_reboot
  • srv_notifications
  • min_config_state_channel_subscriptions
  • min_custom_pkg_download_endpoint
  • sle_minion
  • sle_ssh_minion
  • srv_reportdb
  • min_rhlike_ssh
  • srv_docker_advanced_content_management
  • srv_change_task_schedule
  • min_virthost
  • srv_mainpage
  • min_rhlike_remote_command
  • min_salt_minion_details
  • srv_salt_download_endpoint
  • srv_check_reposync
  • srv_wait_for_reposync
  • min_salt_software_states
  • min_salt_migration
  • min_cve_audit
  • srv_activationkey_api
  • min_config_state_channel
  • min_deblike_monitoring
  • srv_content_lifecycle
  • srv_cobbler_sync
  • srv_manage_channels_page
  • srv_create_activationkey
  • min_rhlike_salt_install_package_and_patch
  • min_move_from_and_to_proxy
  • srv_organization_credentials
  • srv_first_settings
  • srv_cobbler_distro
  • srv_push_package
  • buildhost_docker_auth_registry
  • min_bootstrap_ssh_key
  • srv_add_rocky8_repositories
  • min_bootstrap_api
  • srv_channel_api
  • min_salt_mgrcompat_state
  • min_timezone
  • srv_delete_channel_from_ui
  • srv_salt
  • min_rhlike_openscap_audit
  • min_config_state_channel_api
  • min_deblike_salt
  • buildhost_docker_build_image
  • srv_docker_cve_audit
  • allcli_software_channels_dependencies
  • srv_cobbler_buildiso
  • srv_rename_hostname
  • min_empty_system_profiles
  • min_deblike_salt_install_package
  • srv_custom_system_info
  • min_retracted_patches
  • min_bootstrap_script
  • proxy_as_pod_basic_tests
  • allcli_update_activationkeys
  • min_deblike_salt_install_with_staging
  • min_ssh_tunnel
  • srv_handle_config_channels_with_ISS_v2
  • srv_delete_channel_with_tool
  • min_docker_api
  • srv_distro_cobbler
  • srv_cobbler_profile
  • srv_restart
  • min_salt_install_with_staging
  • srv_sync_channels
  • srv_scc_user_credentials
  • srv_task_status_engine
  • srv_maintenance_windows
  • min_salt_lock_packages
  • min_bootstrap_negative
  • min_change_software_channel
  • srv_osimage
  • srv_monitoring
  • buildhost_bootstrap
  • srv_enable_sync_products
  • min_cve_id_new_syntax
  • allcli_software_channels
  • min_rhlike_salt
  • srv_create_repository
  • minssh_action_chain
  • srv_menu
  • srv_advanced_search

@rjpmestre rjpmestre force-pushed the um_chained-container-proxies-configuration-refactor branch 2 times, most recently from b43e928 to d945e30 Compare April 24, 2024 19:31
@rjpmestre rjpmestre marked this pull request as ready for review April 24, 2024 20:22
@rjpmestre rjpmestre requested a review from a team as a code owner April 24, 2024 20:22
@rjpmestre rjpmestre requested review from nadvornik and removed request for a team April 24, 2024 20:22
nadvornik
nadvornik previously approved these changes Apr 30, 2024
Copy link
Contributor

@nadvornik nadvornik left a comment

Choose a reason for hiding this comment

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

LGTM

@rjpmestre rjpmestre self-assigned this May 6, 2024
@admd admd requested a review from rjmateus May 27, 2024 08:48
@rjpmestre rjpmestre force-pushed the um_chained-container-proxies-configuration-refactor branch from d945e30 to fb03d2f Compare May 27, 2024 13:34
@@ -0,0 +1,2 @@
Chained proxy configuration create refactoring
Copy link
Member

Choose a reason for hiding this comment

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

I think what you need here is:

Suggested change
Chained proxy configuration create refactoring
- Chained proxy configuration create refactoring

And the second line is probably not needed...

Am I right @deneb-alpha / @raulillo82? Maybe I am getting a bit rusty :-D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants