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

v2v in gaprindashvili #3963

Closed
27 tasks done
himdel opened this issue May 20, 2018 · 35 comments
Closed
27 tasks done

v2v in gaprindashvili #3963

himdel opened this issue May 20, 2018 · 35 comments

Comments

@himdel
Copy link
Contributor

himdel commented May 20, 2018

Creating an issue just to track all the relevant bits.

Cc @martinpovolny @dclarizio @ohadlevy @simaishi


WIP work visible in:

Random TODO:


So far, I'm thinking we can backport (reasonably quickly) all the changes except for the ones related to:

  • updating all rails engines
  • handling duplicate JS dependencies
  • moving dependencies from bower to npm
  • possibly patternfly?

There, current gaprindashvili might or might not install any v2v npm dependencies, might or might not pick up the plugin during webpack (will if config/webpack/paths.json is right), will include -common packs (if it picks up the plugin), but may include them in the wrong order. There is no vendor pack in gaprindashvili.

@himdel
Copy link
Contributor Author

himdel commented May 20, 2018

Menu changes work with just #3347, #3683 and #3726 backported (including active item when accessing /migration).

EDIT: third PR added

@himdel
Copy link
Contributor Author

himdel commented May 21, 2018

Layout changes so that v2v uses ops ui layouts:

#3965
#3970
ManageIQ/manageiq-v2v#331

@himdel
Copy link
Contributor Author

himdel commented May 21, 2018

Webpacker loader changes:

backport #3506 and #3828 (TODO: prepare gapri PRs - not backportable)
and remove ts* support (no ts in gapri), and add react support (preset)

@AllenBW
Copy link
Member

AllenBW commented May 30, 2018

Just gonna tack observations here, this'll be the first of a few...
screen shot 2018-05-30 at 10 24 41 am

you'll notice, bottom of the modal the 5 per page looks a lil odd, a divergence from master, caused by align-items: baseline on class .content-view-pf-pagination .form-group of uicomponents

same thing happens here:
screen shot 2018-05-30 at 11 13 05 am

@himdel
Copy link
Contributor Author

himdel commented May 30, 2018

API & http changes - gaprindashvili specific PR

#4005

@AllenBW
Copy link
Member

AllenBW commented May 30, 2018

An issue with downloading logs 😢

throw "error";
$("#center_div").html("\u003cdiv id='content' style='overflow: scroll; height: 100%; padding-left: 50px;'\u003e\n\u003ch1 style='color: #c90813'\u003e\nUnexpected error encountered\n\u003c/h1\u003e\n\u003cbr\u003e\n\u003ch2\u003e\nErrors in Management Engine can be caused by:\n\u003c/h2\u003e\n\u003cbr\u003e\n\u003cfieldset\u003e\n\u003cfont style='font-size: 116%;color: black'\u003e\u0026#x2460;\u003c/font\u003e\nAccessing Management Engine from multiple tabs or windows of the same browser on a single machine.\nClose any duplicate browser sessions, then select an option from the menu.\n\u003c/fieldset\u003e\n\u003cfieldset\u003e\n\u003cfont style='font-size: 116%;color: black'\u003e\u0026#x2461;\u003c/font\u003e\nPressing the back button during a session.\n\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\nClose any duplicate browser sessions, then select an option from the menu.\n\u003c/fieldset\u003e\n\u003cfieldset\u003e\n\u003cfont style='font-size: 116%;color: black'\u003e\u0026#x2462;\u003c/font\u003e\nAn internal system error.\n\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\nPlease contact your administrator for assistance.\n\u003c/fieldset\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\u003ch2\u003e\nError text:\n\u003c/h2\u003e\n\u003cbr\u003e\n\u003ch3\u003e\nundefined method `transformation_log_queue\u0026#39; for #\u0026lt;ServiceTemplateTransformationPlanTask:0x00007fa72d8541f8\u0026gt; [migration_log/download_migration_log]\n\u003c/h3\u003e\n\u003c/div\u003e\n");
miqSparkle(false);
if (miqDomElementExists('adv_searchbox_div')) $('#adv_searchbox_div').hide();

screen shot 2018-05-30 at 11 26 38 am

@AllenBW
Copy link
Member

AllenBW commented May 30, 2018

Here's another oddish one...

Create and execute a migration plan, it fails cuz, well thats not the point... (Locally they will all fail, 's all notional)

Batters up, create another one, same infrastructure mapping, same Choose from a list of VMs discovered in the selected infrastructure mapping setting and I get this error...

{"error":{"kind":"internal_server_error","message":"uninitialized constant ServiceResource::STATUS_COMPLETED","klass":"NameError"}}

screen shot 2018-05-30 at 12 00 37 pm

Now here's the doozy, if we create a new migration, identical, works just fine, but attempt to duplicate that new infrastructure mapping? Same as above occurs.

@himdel
Copy link
Contributor Author

himdel commented May 30, 2018

@AllenBW So.. the last one - ServiceResource::STATUS_COMPLETED - we need ManageIQ/manageiq#17027 + ManageIQ/manageiq#17256 .. added to the branch.

@himdel
Copy link
Contributor Author

himdel commented May 30, 2018

@AllenBW the one before that - undefined method transformation_log_queue - we need ManageIQ/manageiq#17333, added to the branch :)

@himdel
Copy link
Contributor Author

himdel commented May 30, 2018

The issue before that - misaligned "per page" is still TODO...

The style was introduced in ManageIQ/ui-components#103 and never changed since - so it is shared between gaprindashvili and master.

So this is a patternfly difference ...

https://github.com/patternfly/patternfly/blob/0e2b545335a3761da334de7cf963facba48ebb73/src/sass/converted/patternfly/_pagination.scss#L91-L99

is the style that fixes this in patternfly 3.46...

That comes from patternfly/patternfly#910.

I'm thinking adding this style to the gaprindashvili version, with an extra v2v clas so that this doesn't affect any other dropdowns.

@AllenBW
Copy link
Member

AllenBW commented May 30, 2018

Welll we got that outer most div with id="reactRoot" could be a good differentiator, work in both the modal table and the details page table thing

@himdel
Copy link
Contributor Author

himdel commented May 31, 2018

Except that any dialogs are created outside of that root :( Oh well, they still exist inside %body :)

=> ManageIQ/manageiq-v2v#362

@AllenBW
Copy link
Member

AllenBW commented May 31, 2018

Got a new one for the list, though this one is a little unfair because it was JUST merged into v2v... but for the record...

{"error":{"kind":"bad_request","message":"Unsupported Action delete for the transformation_mappings resource specified","klass":"Api::BadRequestError"}}

when POST {"action": "delete"} tohttp://localhost:3000/api/transformation_mappings/1

Deleting transformation mappings...
screen shot 2018-05-31 at 10 27 10 am

@himdel
Copy link
Contributor Author

himdel commented May 31, 2018

@AllenBW yup, looks like from now on, you must be using my g-v2v branch even in v2v.

According to @AparnaKarve that change does not go in gaprindashvili.

@AllenBW
Copy link
Member

AllenBW commented May 31, 2018

OH SNAP! @himdel is that feature cut off listed anywhere?

@AparnaKarve
Copy link
Contributor

Wait, is this about deleting the transformation mappings feature?

I do not know atm if this needs to be included in G or not.
(tbh, I don't see why not)

@AllenBW
Copy link
Member

AllenBW commented May 31, 2018

☝️ @AparnaKarve yeah it is, do yah know if we have a feature cut off for what is to be backported?

@himdel
Copy link
Contributor Author

himdel commented May 31, 2018

OK, if it turns out it should be, we just need to add gaprindashvili/yes to ManageIQ/manageiq-v2v#356 and ManageIQ/manageiq-api#383 :)

@AparnaKarve
Copy link
Contributor

@himdel @AllenBW I think it would be preferable if we kept master and gaprindashvili identical to each other in terms of functionalities until 5.9.4 is released.

@himdel
Copy link
Contributor Author

himdel commented Jun 1, 2018

Agreed :)

So.. g-v2v branch update,

EDIT:

Thanks to Satoe, nobody should need any of my branches now.
I will continue to make changes in my ui-classic branch but those should only affect the build.

@simaishi
Copy link
Contributor

simaishi commented Jun 1, 2018

@himdel I can get ManageIQ/manageiq-api#316 backported as soon as I know what to do with ManageIQ/manageiq#17023 (comment)!!

@himdel
Copy link
Contributor Author

himdel commented Jun 1, 2018

Thanks, just replied there, sorry, bad ordering :)

@simaishi
Copy link
Contributor

simaishi commented Jun 1, 2018

@himdel I got everything backported/merged that had gaprindashvili/yes and transformation, with exception of #3564. Please confirm this is also needed, as this wasn't on your list.

@himdel
Copy link
Contributor Author

himdel commented Jun 1, 2018

@simaishi As far as I'm aware, #3564 can't possibly affect v2v the plugin - the PR deals with reports, and v2v is not using our GTL code in any way.

I'm also not seeing any :hidden actually used in any col_options under product/views in manageiq, so I'm not sure the feature ended up being used.

Maybe @gtanzillo knows more?

(I don't think it would break anything though.)

@himdel
Copy link
Contributor Author

himdel commented Jun 1, 2018

Also, thanks for backporting everything!

As far as I'm aware, that means the only remaining issues are build issues, working on that today.

@simaishi
Copy link
Contributor

simaishi commented Jun 1, 2018

@bzwei ping, since you added transformation label to #3564 😄

@AparnaKarve
Copy link
Contributor

@simaishi I can confirm that we do need #3564 for v2v
(it's required for the CSV step in the Plan Wizard)

@simaishi
Copy link
Contributor

simaishi commented Jun 1, 2018

@AparnaKarve ok, thank you!

@AllenBW
Copy link
Member

AllenBW commented Jun 1, 2018

Running the g-v2v for cui and g for both v2v and api, hitting this error when bin/update

[Webpacker] Compilation Failed
yarn run v1.6.0
$ /Users/awight/Desktop/Projects/manageiq/plugins/manageiq-ui-classic/node_modules/.bin/webpack --config /Users/awight/Desktop/Projects/manageiq/plugins/manageiq-ui-classic/config/webpack/development.js
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

** override_gem: manageiq-ui-classic, [{:path=>"/Users/awight/Desktop/Projects/manageiq/plugins/manageiq-ui-classic"}], caller: /Users/awight/Desktop/Projects/manageiq/bundler.d/Gemfile.dev.rb
** override_gem: manageiq-api, [{:path=>"/Users/awight/Desktop/Projects/manageiq/plugins/manageiq-api"}], caller: /Users/awight/Desktop/Projects/manageiq/bundler.d/Gemfile.dev.rb
warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts.
/Users/awight/Desktop/Projects/manageiq/plugins/manageiq-ui-classic/config/webpack/loaders/babel.js:4
  query: {
  ^^^^^
SyntaxError: Unexpected identifier
    at Object.exports.runInThisContext (vm.js:76:16)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at module.exports.module.rules.sync.map.loader (/Users/awight/Desktop/Projects/manageiq/plugins/manageiq-ui-classic/config/webpack/shared.js:42:57)
    at Array.map (native)
error Command failed with exit code 1.


== Command ["bundle exec rake update:ui"] failed in /Users/awight/Desktop/Projects/manageiq ==
awight-osx:manageiq awight$ ** Using session_store: ActionDispatch::Session::MemCacheStore
rails aborted!
SupportsFeatureMixin::UnknownFeatureError: Feature ':reconfigure_disksize' is unknown to SupportsFeatureMixin.
/Users/awight/Desktop/Projects/manageiq/app/models/mixins/supports_feature_mixin.rb:156:in `guard_queryable_feature'
/Users/awight/Desktop/Projects/manageiq/app/models/mixins/supports_feature_mixin.rb:200:in `supports'
/Users/awight/Desktop/Projects/manageiq/lib/extensions/require_nested.rb:11:in `require_nested'
/Users/awight/Desktop/Projects/manageiq/lib/extensions/descendant_loader.rb:235:in `load_subclasses'
/Users/awight/Desktop/Projects/manageiq/lib/extensions/descendant_loader.rb:255:in `descendants'
/Users/awight/Desktop/Projects/manageiq/app/models/blacklisted_event.rb:26:in `seed'
/Users/awight/Desktop/Projects/manageiq/lib/evm_database.rb:80:in `block (2 levels) in seed'
/Users/awight/Desktop/Projects/manageiq/lib/evm_database.rb:69:in `each'
/Users/awight/Desktop/Projects/manageiq/lib/evm_database.rb:69:in `block in seed'
/Users/awight/Desktop/Projects/manageiq/lib/extensions/ar_table_lock.rb:21:in `block (2 levels) in with_lock'
/Users/awight/Desktop/Projects/manageiq/lib/extensions/ar_table_lock.rb:21:in `block in with_lock'
/Users/awight/Desktop/Projects/manageiq/lib/extensions/ar_table_lock.rb:15:in `with_lock'
/Users/awight/Desktop/Projects/manageiq/lib/evm_database.rb:68:in `seed'
/Users/awight/Desktop/Projects/manageiq/db/seeds.rb:8:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => db:seed

Working on figuring it out presently...

@himdel
Copy link
Contributor Author

himdel commented Jun 1, 2018

Sorry about that @AllenBW ... the first is a missing comma, fixed..

As for reconfigure_disksize that looks like you updated your repos in the middle of a backport or something like that... try if it disappears too now - rebased :) If not, try updating manageiq?

@AllenBW
Copy link
Member

AllenBW commented Jun 1, 2018

Thanks @himdel !! comma solved... as for the other... @d-m-u pointed me to https://gitter.im/ManageIQ/manageiq?at=5a8c99f0e4ff28713aa4ba40

Looks like we might need to backport ManageIQ/manageiq#16700

@himdel
Copy link
Contributor Author

himdel commented Jun 7, 2018

So... closing this, I believe we have everything needed to build gaprindashvili with v2v.

Feel free to reopen for bugs :)

@himdel himdel closed this as completed Jun 7, 2018
@himdel
Copy link
Contributor Author

himdel commented Jun 7, 2018

Just a resume of the changes:

The Gaprindashvili JS build process is essentially the same as on master now - webpacker:compile need to run in ui-classic, webpack:paths in Rails.root.

Caveats for gaprindashvili:

  • we lost typescript support (mostly because it was not used and would take a few more PRs to backport, it can still be done if needed)
  • not all developer-only changes were backported (webpack-dev-server may not behave exactly as in master, not sure), no jest either
  • patternfly is fixed at 3.23.*, so anything that v2v needs from newer patternfly has to be added in the v2v gapridnashvili branch (with appropriate wrapping - the .miq-v2v class is guaranteed to be on body when in v2v code in gaprindashvili - [GAPRINDASHVILI] Fix "<select> per page" styling in patternfly 3.25 manageiq-v2v#362 - so that this doesn't break other parts of the UI)
  • technically, this means gaprindashvili supports multiple plugins, but the catch is - when multiple plugins depend on the same package in different versions, directly or indirectly, a random version will get used (this is not a problem now since the ui itself only depends on 3 packages via npm, so v2v is mostly free to do whatever, but would become a problem with more plugins)

@martinpovolny
Copy link
Member

Thanks, @himdel !

@AllenBW
Copy link
Member

AllenBW commented Jun 7, 2018

Can confirm, dev server does noooooooooooot function as master 😢 's ok though 🤗

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

No branches or pull requests

5 participants