Skip to content

Skip yarn for plugins with no dependencies#9999

Open
asirvadAbrahamVarghese wants to merge 1 commit into
ManageIQ:masterfrom
asirvadAbrahamVarghese:enhance-ui-setup-task
Open

Skip yarn for plugins with no dependencies#9999
asirvadAbrahamVarghese wants to merge 1 commit into
ManageIQ:masterfrom
asirvadAbrahamVarghese:enhance-ui-setup-task

Conversation

@asirvadAbrahamVarghese
Copy link
Copy Markdown
Contributor

PR to skip yarn step for plugins with no dependencies or devDependencies. In such cases, running Yarn doesn’t serve any purpose. As a follow-up, we can also remove yarn and engines from those plugins, reducing maintenance overhead and avoiding repeated upgrade PRs.

@asirvadAbrahamVarghese asirvadAbrahamVarghese requested a review from a team as a code owner April 22, 2026 11:45
Comment thread lib/tasks/manageiq/ui_tasks.rake
@asirvadAbrahamVarghese
Copy link
Copy Markdown
Contributor Author

Seems to have worked fine:

== Updating UI assets ==
== ManageIQ::Providers::CiscoIntersight::Engine ==
   Skipping: No dependencies in package.json
== ManageIQ::Providers::IbmCloud::Engine ==
   Skipping: No dependencies in package.json
== ManageIQ::Providers::IbmPowerVc::Engine ==
   Skipping: No dependencies in package.json
== ManageIQ::Providers::Lenovo::Engine ==
   Skipping: No dependencies in package.json
== ManageIQ::Providers::Nsxt::Engine ==
   Yarn version: 4.14.1
➤ YN0000: Yarn detected that the current workflow is executed from a public pull request. For safety the hardened mode has been enabled.
➤ YN0000: It will prevent malicious lockfile manipulations, in exchange for a slower install time. You can opt-out if necessary; check our documentation for more details.

➤ YN0000: · Yarn 4.14.1
➤ YN0000: ┌ Resolution step
Resolution step
➤ YN0000: └ Completed in 1s 499ms
➤ YN0000: ┌ Fetch step
Fetch step
➤ YN0000: └ Completed in 0s 957ms
➤ YN0000: ┌ Link step
Link step
➤ YN0000: └ Completed in 2s 120ms
➤ YN0000: · Done in 4s 632ms
== ManageIQ::Providers::Redfish::Engine ==
   Skipping: No dependencies in package.json
== ManageIQ::UI::Classic::Engine ==
   Yarn version: 4.14.1
➤ YN0000: Yarn detected that the current workflow is executed from a public pull request. For safety the hardened mode has been enabled.
➤ YN0000: It will prevent malicious lockfile manipulations, in exchange for a slower install time. You can opt-out if necessary; check our documentation for more details.

➤ YN0000: · Yarn 4.14.1
➤ YN0000: ┌ Resolution step
Resolution step
➤ YN0000: └ Completed in 7s 631ms
➤ YN0000: ┌ Post-resolution validation
Post-resolution validation
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
Fetch step
➤ YN0000: └ Completed in 1s 470ms
➤ YN0000: ┌ Link step
Link step
➤ YN0000: └ Completed in 43s 377ms
➤ YN0000: · Done with warnings in 53s 175ms
Skipping webpack:compile on travis spec:jest

JS plugins:
  ManageIQ::Providers::CiscoIntersight::Engine:
    namespace: manageiq-providers-cisco_intersight
    path: /home/runner/work/manageiq-ui-classic/manageiq-ui-classic/vendor/bundle/ruby/3.3.0/bundler/gems/manageiq-providers-cisco_intersight-1d5fa8496e59
  ManageIQ::Providers::IbmCloud::Engine:
    namespace: manageiq-providers-ibm_cloud
    path: /home/runner/work/manageiq-ui-classic/manageiq-ui-classic/vendor/bundle/ruby/3.3.0/bundler/gems/manageiq-providers-ibm_cloud-9e7e2c445e15
  ManageIQ::Providers::IbmPowerVc::Engine:
    namespace: manageiq-providers-ibm_power_vc
    path: /home/runner/work/manageiq-ui-classic/manageiq-ui-classic/vendor/bundle/ruby/3.3.0/bundler/gems/manageiq-providers-ibm_power_vc-9c5306b76994
  ManageIQ::Providers::Lenovo::Engine:
    namespace: manageiq-providers-lenovo
    path: /home/runner/work/manageiq-ui-classic/manageiq-ui-classic/vendor/bundle/ruby/3.3.0/bundler/gems/manageiq-providers-lenovo-2883ae0b30f7
  ManageIQ::Providers::Nsxt::Engine:
    namespace: manageiq-providers-nsxt
    path: /home/runner/work/manageiq-ui-classic/manageiq-ui-classic/vendor/bundle/ruby/3.3.0/bundler/gems/manageiq-providers-nsxt-71a79c736f2d
  ManageIQ::Providers::Redfish::Engine:
    namespace: manageiq-providers-redfish
    path: /home/runner/work/manageiq-ui-classic/manageiq-ui-classic/vendor/bundle/ruby/3.3.0/bundler/gems/manageiq-providers-redfish-3541f3cd593c
  ManageIQ::UI::Classic::Engine:
    namespace: manageiq-ui-classic
    path: /home/runner/work/manageiq-ui-classic/manageiq-ui-classic

Comment thread lib/tasks/manageiq/ui_tasks.rake Outdated
Comment on lines +20 to +23
# Log yarn version being used
yarn_version = `yarn --version`.strip
puts " Yarn version: #{yarn_version}"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This part is actually not necessary, because Yarn itself will emit it's version when we run it.

@Fryguy
Copy link
Copy Markdown
Member

Fryguy commented Apr 22, 2026

What does this actually save us, now that I think about it. Unless we remove yarn/yarn.lock/package.json, then all this does is really trim down the amount of text, right?

@asirvadAbrahamVarghese
Copy link
Copy Markdown
Contributor Author

Yeah, it might look like that, but we don’t need to remove .yarnrc.yml, .yarn/, etc. just to skip Yarn at the plugin level. Right now the idea is only: if there are no plugin-level packages, don’t try to install anything.

But like I said, if we’re planning to add test/lint packages or anything at plugin level soon, then there’s probably no point in doing this now.

@Fryguy Fryguy self-assigned this Apr 22, 2026
@miq-bot
Copy link
Copy Markdown
Member

miq-bot commented Apr 23, 2026

Some comments on commit asirvadAbrahamVarghese@85cf386

lib/tasks/manageiq/ui_tasks.rake

  • ⚠️ - 16 - Detected puts. Remove all debugging statements.

@miq-bot
Copy link
Copy Markdown
Member

miq-bot commented Apr 23, 2026

Checked commit asirvadAbrahamVarghese@85cf386 with ruby 3.3.10, rubocop 1.86.0, haml-lint 0.73.0, and yamllint 1.37.1
1 file checked, 0 offenses detected
Everything looks fine. ⭐

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