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

Hard integrate UI stories #9220

Merged
merged 7 commits into from
Sep 4, 2024
Merged

Conversation

Etheryte
Copy link
Member

@Etheryte Etheryte commented Aug 27, 2024

What does this PR change?

Background

This change set requires some historic context. A long time ago we used to use Storybook for frontend stories to aid in UI development. Storybook worked fine when it did work, but it had two major issues: Dependabot and breaking changes.

Since Storybook has a very large dependency tree, it would give us a lot of security issues in Dependabot. While these are development dependencies, we have customers who scan the whole repo and their compliance department is unhappy with those flags. Since all of these issues are far detached form us, keeping things clean at all times proved to be an overwhelming amount of work.

The other side is breaking changes. With every major release, Storybook changed some api or some config, which again gave us more busywork without much upside. At the same time, we needed to keep up with the updates since we needed to cross out Dependabot issues.

In short, a lot of extra work that did not give us much upside. This led us to try React Styleguidist, but this approach had roughly all the same problems than the previous approach. Not much doing on this particular occasion.

What is this pull request

This pull request ditches the latter and adds a simple page which renders our already existing stories. This has a number of benefits:

  • no extra dependencies
  • we don't need a separate frontend build pipeline which we need to keep working (both Storybook and Styleguidist require this)
  • Typescript support in stories
  • whenever the product builds, stories also build

The downsides:

  • not feature rich
  • makes our single frontend build a bit more complex, but nothing crazy

This aims to deliver two core things, one to considerably reduce maintenance overhead to keep stories working, and two to ensure stories are always up to date with the rest of the product. While we lose features that Storybook and the like provide, this way we can at least have it working, which is better than the option that it's fancy, but doesn't work.

If there is additional functionality we need, it's mostly straightforward to add ourselves.

How to review this PR

Please note that the target branch for this PR is not master, but is instead the Bootstrap migration feature branch, since it relies on changes from that branch.

The change set is big, but nearly all of it is just automatic refactoring changes. To make reviewing easier, I've split it up into commits that are reasonable to look at separately.

For Java:

  • a0c9ac8 adds a new bare bones controller for the UI stories page

For frontend:

  • 053d67c adds build time tooling to gather and inject all stories as imports to the stories page
  • 3f09a46 adds the page that renders the stories
  • eee57d4 restructures directories and moves all story files to the new format, nearly everything here is just the same change across many many files

GUI diff

Adds a new hidden page not accessible by the menu, see e.g. /rhn/manager/storybook#messages

Screenshot 2024-08-28 at 01 25 05 Screenshot 2024-08-28 at 01 28 51
  • DONE

Documentation

  • No documentation needed: internal use only

  • DONE

Test coverage

ℹ️ If a major new functionality is added, it is strongly recommended that tests for the new functionality are added to the Cucumber test suite

  • No tests: already covered

  • DONE

Links

A precursor for working on https://github.com/SUSE/spacewalk/issues/24242

  • DONE

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/9220/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/9220/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

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

@Etheryte Etheryte changed the title WIP: Hard integrate UI stories Hard integrate UI stories Aug 27, 2024
@Etheryte Etheryte marked this pull request as ready for review August 27, 2024 22:20
@Etheryte Etheryte requested review from a team as code owners August 27, 2024 22:20
@Etheryte Etheryte requested review from rjpmestre, cbbayburt and bisht-richa and removed request for a team August 27, 2024 22:20
@Etheryte Etheryte mentioned this pull request Aug 28, 2024
12 tasks
Copy link
Contributor

@bisht-richa bisht-richa left a comment

Choose a reason for hiding this comment

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

LGTM

@Etheryte Etheryte merged commit acac89c into uyuni-project:master-bootstrap Sep 4, 2024
25 checks passed
Etheryte added a commit that referenced this pull request Sep 5, 2024
* Add ui debug page controller

* Add build time tooling to bundle stories

* Add ui debug page frontend

* Add missing types

* Migrate all stories, refactor directory structure

* Fix lint

* Add changes
deneb-alpha pushed a commit that referenced this pull request Sep 6, 2024
* Fix custom column classes in the updated theme
* Fix missing leading slash in search pathname
* Fix alert layout in formula catalog in the updated theme
* Fix layout mismatch in patches management
* Improved viewport size check
* Refactor deployment to remove code duplication and support multiple deployment modes
* Fixed stretched button issue
* Fix input addon sizing
* Refactor deployment to remove code duplication and support multiple deployment modes
* Migrate HTTP proxy, fix setup wizard layout issues (#9162)
* Fix setup wizard alignment issues
* Fix http proxy setup page
* Fix image alignment
* Initial migration work for CLM pages
* Fix form group offset
* Hard integrate UI stories (#9220)
* Add ui debug page controller
* Add build time tooling to bundle stories
* Add ui debug page frontend
* Add missing types
---------

Co-authored-by: Thomas Florio <thomas.florio@suse.com>
Co-authored-by: Richa <richa.bisht@suse.com>
cbbayburt pushed a commit to cbbayburt/uyuni that referenced this pull request Sep 26, 2024
* Fix custom column classes in the updated theme
* Fix missing leading slash in search pathname
* Fix alert layout in formula catalog in the updated theme
* Fix layout mismatch in patches management
* Improved viewport size check
* Refactor deployment to remove code duplication and support multiple deployment modes
* Fixed stretched button issue
* Fix input addon sizing
* Refactor deployment to remove code duplication and support multiple deployment modes
* Migrate HTTP proxy, fix setup wizard layout issues (uyuni-project#9162)
* Fix setup wizard alignment issues
* Fix http proxy setup page
* Fix image alignment
* Initial migration work for CLM pages
* Fix form group offset
* Hard integrate UI stories (uyuni-project#9220)
* Add ui debug page controller
* Add build time tooling to bundle stories
* Add ui debug page frontend
* Add missing types
---------

Co-authored-by: Thomas Florio <thomas.florio@suse.com>
Co-authored-by: Richa <richa.bisht@suse.com>
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.

3 participants