ManageIQ / inventory_refresh

Apache License 2.0
1 stars 23 forks source link

Add back support for non-concurrent_safe_batch saving #101

Closed agrare closed 2 years ago

agrare commented 2 years ago

This adds back support for the save modes other than concurrent_safe batch (required by ManageIQ) and deletion other than mark&sweep (also required by ManageIQ).

Master (now v0.3.z) was always intended to maintain compatibility with ManageIQ but along the way it diverged too far in what was required by the application's database (unique constraints, foreign-key cascade delete triggers, etc...) to be able to be used by MIQ.

As MIQ moves closer to the reference architecture that topological-inventory set we can pull these back from the v0.3.z branch where possible.

This also allows us to add support for newer versions of active_record going forward, 6.0 support already was added to v0.2.z and we're looking at supporting 6.1 and 7.0 in the future

agrare commented 2 years ago

cc @jrafanie @kbrock for rails 6.1 upgrade

miq-bot commented 2 years ago

Checked commits https://github.com/agrare/inventory_refresh/compare/cdea6f3e6daa6d225243cadfc290877628f7ff1e~...4bf5c6748fd97d4e55bf4bf0967470102db6c2dd with ruby 2.6.3, rubocop 1.13.0, haml-lint 0.35.0, and yamllint 78 files checked, 250 offenses detected

lib/inventory_refresh/application_record_iterator.rb

lib/inventory_refresh/inventory_collection.rb

lib/inventory_refresh/inventory_collection/builder.rb

lib/inventory_refresh/inventory_collection/helpers/initialize_helper.rb

lib/inventory_refresh/inventory_collection/helpers/questions_helper.rb

lib/inventory_refresh/inventory_collection/index/proxy.rb

lib/inventory_refresh/inventory_collection/scanner.rb

lib/inventory_refresh/inventory_object.rb

lib/inventory_refresh/save_collection/saver/base.rb

lib/inventory_refresh/save_collection/saver/concurrent_safe_batch.rb

lib/inventory_refresh/save_collection/saver/retention_helper.rb

lib/inventory_refresh/save_collection/saver/sql_helper.rb

lib/inventory_refresh/save_collection/saver/sql_helper_update.rb

lib/inventory_refresh/save_collection/saver/sql_helper_upsert.rb

lib/inventory_refresh/save_collection/sweeper.rb

lib/inventory_refresh/target_collection.rb

spec/helpers/spec_parsed_data.rb

spec/helpers/test_builder/cloud_manager.rb

spec/helpers/test_builder/shared.rb

spec/helpers/test_persister.rb

spec/models/authentication.rb

spec/models/manageiq/providers/cloud_manager.rb

spec/models/manageiq/providers/cloud_manager/vm.rb

spec/models/vm_or_template.rb

spec/persister/local_db_finders_spec.rb

spec/persister/parallel_saving_spec.rb

spec/persister/persister_spec.rb

spec/persister/retention_strategies_spec.rb

spec/save_inventory/acyclic_graph_of_inventory_collections_spec.rb

spec/save_inventory/build_parent_inventory_collections_spec.rb

spec/save_inventory/graph_of_inventory_collections_targeted_refresh_spec.rb

miq-bot commented 2 years ago

...continued

spec/save_inventory/saver_strategies_spec.rb

spec/save_inventory/single_inventory_collection_spec.rb

spec/save_inventory/strategies_and_references_spec.rb

spec/schema.rb

spec/target_collection_spec.rb

spec/target_spec.rb

Fryguy commented 2 years ago

@agrare Will this then be cut as a 1.0 release?

agrare commented 2 years ago

@Fryguy yes I figure once we get the rest of the rails 6.1 changes in I'd cut a v1.0.0

agrare commented 2 years ago

Think a rubocop -A might be in the cards as well :laughing:

agrare commented 2 years ago

Cross repo tests with all MIQ providers: https://github.com/ManageIQ/manageiq-cross_repo-tests/pull/580

Fryguy commented 2 years ago

spec/schema.rb is like a huge chunk of those ...can probably ignore that file since it's autogenerated

agrare commented 2 years ago

Okay cross-repo is green