Skip to content

Getting UI components updates backported to Gaprindashvili

Martin Hradil edited this page Jun 28, 2018 · 4 revisions

(copy of http://talk.manageiq.org/t/getting-ui-components-updates-backported-to-gaprindashvili/2858)

The gaprindashvili release is using ManageIQ/ui-components contrained to ~1.0.0. The release uses lockfiles to lock to specific version, so simply releasing a new version will not automatically affect the release.

Therefore, to get ui-components changes to ui-classic, one needs to:

  • create a ui-components PR with the actual changes
  • make a release of a 1.0.* version happen, using the npm+bower process
  • create a ui-classic [GAPRINDASHVILI] PR which actually updates the version used

Releasing ui-components is described in https://github.com/ManageIQ/ui-components/wiki/Releasing-a-new-version, do take care to release the bower version correctly.

Creating the ui-classic PR should simply be a matter of:

# having run bin/update after switching the branch (or rm -rf vendor/assets/bower_components ; bower install ; yarn)
yarn run bower-locker unlock
bower install manageiq-ui-components
# check the right version got installed, check git diff looks sane
yarn run bower-locker lock

# at this point you want to `git add -Ap` and just add the changes to your particular library, and lastUpdated

# please also make sure all manageiq-ui-components references in both bower.json and bower-locker.bower.json are up to date and fix manually if they aren't

(after https://github.com/ManageIQ/manageiq-ui-classic/pull/2624 is merged).


There's also a script for this (gaprindashvili):

backport-ui-comonents

(run backport-ui-components 1.2.3 to create gaprindashvili PRs for ops & sui which update to version 1.2.3)

This one usually works but needs handholding, make sure to check all the output! There's also 2 manual steps and it makes several assumptions about your environment:

  • there is $HOME/manageiq-gaprindashvili, containing plugins/manageiq-ui-service and plugins/manageiq-ui-classic
  • there's a remote called upstream which points to the upstream repo and origin which points to your fork - for both the SUI and Ops repos
  • all the repos are using a master branch which inherits fromupstream/gaprindashvili, not upstream/master.
  • git up updates the master branch to upstream/gaprindashvili (this will work)
  • bower is installed
  • yarn is installed
  • hub is installed (this one) and configured with the right github credentials

The manual steps:

  • when hub is being run (twice - once for each repo), it will open an editor with title="Update ui-compoents to 1.2.3 for gaprindashvili" and body="" or body="..template..". But the title needs to start with [GAPRINDASHVILI] , and the body needs to be the list of ui-components PRs in that particular ui-components version.
  • when bower install in ops ui has run, you have to pick only the relevant changes - bower actually updates all the packages, and the script just runs git add -Ap to let you pick just the lines related to ui-components (and the lastUpdated date)