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

Broken travis from other repos #4921

Closed
himdel opened this issue Nov 14, 2018 · 81 comments
Closed

Broken travis from other repos #4921

himdel opened this issue Nov 14, 2018 · 81 comments

Comments

@himdel
Copy link
Contributor

himdel commented Nov 14, 2018

With some frequency, ui-classic travis is red because of changes made in other repos.

This issue exists to track those - please mention this issue in any PR which breaks ui-classic travis (or fixes such a break).

(Please do not use for travis failures not caused by other ManageIQ repos.)

(related to discussion in ManageIQ/manageiq#18173)

Spreadsheet: https://docs.google.com/spreadsheets/d/1V_o2vxaBsHlX70E0SOwoeArmXAZIfQQI8V_JBC8dGvE

@Fryguy
Copy link
Member

Fryguy commented Nov 14, 2018

If, possible, I would love to see the following timings:

  • Time when ui-classic went red
  • Time when it was discovered that ui-classic went red (helps us understand TZ complications where it goes red in the middle of your night, and then not discovering that until the morning)
  • Time when it was determined that core caused the red
  • Time when PRs are created to fix it
  • Time when PRs are merged
  • Time when ui-classic goes green

Obviously it may not be possible to get all of that, but the more information we have the better we can solve this together.

@Fryguy Fryguy added the pinned label Nov 14, 2018
@himdel
Copy link
Contributor Author

himdel commented Nov 16, 2018

Red again...
https://travis-ci.org/ManageIQ/manageiq-ui-classic/builds/455654431

  1) ComplianceSummaryHelper when @explorer is set #textual_compliance_status
     Failure/Error: {:time => time_ago_in_words(date.in_time_zone(Time.zone)).titleize}
     NoMethodError:
       undefined method `in_time_zone' for nil:NilClass
     # ./app/helpers/compliance_summary_helper.rb:16:in `textual_compliance_status'
     # ./spec/helpers/compliance_summary_helper_spec.rb:22:in `block (3 levels) in <top (required)>'
  2) ComplianceSummaryHelper for classic screens when @explorer is not set #textual_compliance_status
     Failure/Error: {:time => time_ago_in_words(date.in_time_zone(Time.zone)).titleize}
     NoMethodError:
       undefined method `in_time_zone' for nil:NilClass
     # ./app/helpers/compliance_summary_helper.rb:16:in `textual_compliance_status'
     # ./spec/helpers/compliance_summary_helper_spec.rb:50:in `block (3 levels) in <top (required)>'

PR merged: 2018-11-15 16:53 UTC
travis went red: 2018-11-15 20:03 UTC
discovered: 2018-11-16 13:30 UTC (me, presumably sooner by others?; 12:23 UTC on Brno gitter)
core caused: about 30 minutes, ManageIQ/manageiq#17475
(Thanks @Hyperkid123 for finding the problem (can you add how much time you spent on it too please?))
EDIT: so, an hour

fix created: 2018-11-16 14:10 UTC (assuming #4933)
PR merged: 2018-11-16 19:06 UTC
travis went green: 2018-11-16 19:42 UTC (https://travis-ci.org/ManageIQ/manageiq-ui-classic/builds/456115082)

@Hyperkid123
Copy link
Contributor

Thanks @Hyperkid123 for finding the problem (can you add how much time you spent on it too please?

It took me about 15-20 minutes. And about 30 minutes until i realized that the tests are busted (don't know if that counts). Thanks for the fix @himdel !

@skateman
Copy link
Member

This could be nicely automated by just storing some information about PR merges and travis build results from all the related repos. If the PR's build was green and the master branch afterwards went red, there's probably an issue in the other repositories. This is way too interesting to solve during working hours, if no one wants it, I might play with this during the holidays in December.

@bdunne
Copy link
Member

bdunne commented Nov 20, 2018

@skateman That does sound like a fun project 😄

@martinpovolny
Copy link
Member

martinpovolny commented Nov 26, 2018

@bdunne, @Fryguy:

on the argument of long running UI tests: We fixed that.

test-run-fast

@himdel
Copy link
Contributor Author

himdel commented Jan 3, 2019

Another red...

https://travis-ci.org/ManageIQ/manageiq-ui-classic/jobs/474623058

  1) PhysicalInfraTopologyService#build_topology topology contains the expected structure and content
     Failure/Error:
       expect(subject[:items]).to eq(
         "PhysicalInfraManager" + ems.id.to_s  => {
           :name         => ems.name,
           :kind         => "PhysicalInfraManager",
           :miq_id       => ems.id,
           :status       => nil,
           :display_kind => "Lenovo",
           :model        => ems.class.name,
           :key          => "PhysicalInfraManager" + ems.id.to_s
         },
       expected: {"PhysicalInfraManager96000000000077"=>{:name=>"LXCA", :kind=>"PhysicalInfraManager", :miq_id=>960000...PhysicalServer", :provider=>"LXCA", :model=>"PhysicalServer", :key=>"PhysicalServer96000000000004"}}
            got: {"PhysicalInfraManager96000000000077"=>{:name=>"LXCA", :kind=>"PhysicalInfraManager", :model=>"Manage..."PhysicalRack96000000000001", :status=>"Unknown", :display_kind=>"PhysicalRack", :provider=>"LXCA"}}

(hidden in the diff, but expected has :status => nil, while actual has :status => 'Valid').

Comes from ManageIQ/manageiq#18266.
Fixed by #5120

Merged: 2019-01-02 15:17Z
Went red: 2019-01-02 16:51Z
Discovered: 2019-01-03 10:53Z
Fix created: 2019-01-03 12:27Z
PR merged: 2019-01-03 12:49Z
Went green: 2019-01-03 13:03Z

@cben
Copy link
Contributor

cben commented Jan 3, 2019

Thanks, now I know what broke providers-kubernetes tests, being subscribed to this issue saves a lot of time debugging 😉

@Fryguy
Copy link
Member

Fryguy commented Jan 3, 2019

I made a spreadsheet... link in the OP.

@himdel
Copy link
Contributor Author

himdel commented Jan 28, 2019

Another..

https://travis-ci.org/ManageIQ/manageiq-ui-classic/jobs/485263617

  1) TopologyService#entity_name entity is a tag returns with the parent and the child classification description
     Failure/Error: cond.exists?
     SystemStackError:
       stack level too deep
     # ./spec/manageiq/app/models/classification.rb:16:in `block in <class:Classification>'
     # ./spec/manageiq/app/models/classification.rb:533:in `save_tag'
...
     # ./spec/manageiq/app/models/classification.rb:533:in `save_tag'
     # ./spec/manageiq/spec/support/missing_factory_helper.rb:10:in `create'

Caused by ManageIQ/manageiq#18378

Fixed... ?

(added dates to spreadsheet)

@Fryguy
Copy link
Member

Fryguy commented Jan 29, 2019

We just reverted ManageIQ/manageiq#18378 with ManageIQ/manageiq#18408, so I'm considering that "fixed"

@himdel
Copy link
Contributor Author

himdel commented Feb 27, 2019

https://travis-ci.org/ManageIQ/manageiq-ui-classic/jobs/498918915
caused by ManageIQ/manageiq#18486
fixed by #5285

Failures:
  1) ChargebackController chargeback rate form actions with default chargebacks rates adds new chargeback rate using default values
     Failure/Error: expect(rate_detail.detail_currency.name).to eq(rate_detail_hash[:type_currency])
       expected: "USD"
            got: "United States Dollar"
       (compared using ==)
     # ./spec/controllers/chargeback_controller_spec.rb:385:in `block in expect_chargeback_rate_to_eq_hash'
     # ./spec/controllers/chargeback_controller_spec.rb:381:in `each_with_index'
     # ./spec/controllers/chargeback_controller_spec.rb:381:in `expect_chargeback_rate_to_eq_hash'
     # ./spec/controllers/chargeback_controller_spec.rb:421:in `block (4 levels) in <top (required)>'
  2) ChargebackController chargeback rate form actions with default chargebacks rates adds new chargeback rate and user adds and removes some tiers
     Failure/Error: expect(rate_detail.detail_currency.name).to eq(rate_detail_hash[:type_currency])
       expected: "USD"
            got: "United States Dollar"
       (compared using ==)
     # ./spec/controllers/chargeback_controller_spec.rb:385:in `block in expect_chargeback_rate_to_eq_hash'
     # ./spec/controllers/chargeback_controller_spec.rb:381:in `each_with_index'
     # ./spec/controllers/chargeback_controller_spec.rb:381:in `expect_chargeback_rate_to_eq_hash'
     # ./spec/controllers/chargeback_controller_spec.rb:451:in `block (4 levels) in <top (required)>'

Thanks @lpichler :)

@agrare
Copy link
Member

agrare commented Mar 1, 2019

https://travis-ci.org/ManageIQ/manageiq/jobs/500425821#L2517-L2524
caused by #5271
fixed by ManageIQ/manageiq#18478

Failures:
  1) MiqWidget.import_from_hash rss feed internal with new rss feed import
     Failure/Error: WidgetImportService.new.import_widget_from_hash(widget)
     
     NoMethodError:
       undefined method `new_record?' for nil:NilClass
     # ./app/models/miq_widget/import_export.rb:8:in `import_from_hash'
     # ./spec/models/miq_widget/import_from_hash_spec.rb:27:in `block (3 levels) in <top (required)>'
     # ./spec/models/miq_widget/import_from_hash_spec.rb:135:in `block (6 levels) in <top (required)>'

This issue tracks failures in the other direction too right? 😄

@Fryguy
Copy link
Member

Fryguy commented Mar 1, 2019

This issue tracks failures in the other direction too right? 😄

You mean because a UI PR was merged which broke core?

@agrare
Copy link
Member

agrare commented Mar 1, 2019

You mean because a UI PR was merged which broke core

Yes

@himdel
Copy link
Contributor Author

himdel commented Apr 15, 2019

https://travis-ci.org/ManageIQ/manageiq-ui-classic/jobs/519439431

Failures:
  1) AuthKeyPairCloudController#report_data when tile mode is selected returns key pairs with quadicons
     Failure/Error: expect(results['data']['rows'][0]['quad']).to have_key('fonticon')
       expected  to respond to `has_key?`
     # ./spec/controllers/auth_key_pair_cloud_controller_spec.rb:98:in `block (4 levels) in <top (required)>'

cause ManageIQ/manageiq#18633
fix ManageIQ/manageiq-decorators#4

@himdel
Copy link
Contributor Author

himdel commented Apr 30, 2019

https://travis-ci.org/ManageIQ/manageiq-ui-classic/builds/526150604

  1) CatalogController tests that needs all rbac features access #st_upload_image uploads a selected png file 
     Failure/Error: expect(assigns(:flash_array).first[:message]).to include('Custom Image file "upload_image.png" successfully uploaded')
     
     NoMethodError:
       undefined method `first' for nil:NilClass
     # ./spec/controllers/catalog_controller_spec.rb:287:in `block (4 levels) in <top (required)>'

rspec ./spec/controllers/catalog_controller_spec.rb:284

cause ManageIQ/manageiq#18689
fix ManageIQ/manageiq#18705

@himdel
Copy link
Contributor Author

himdel commented May 17, 2019

https://travis-ci.org/ManageIQ/manageiq-ui-classic/jobs/533531882#L2666

 1) MiqAeClassController save class/method update a method with inputs
     Failure/Error: render :json => ex.for_render
     
     Module::DelegationError:
       ActionController::Metal#content_type delegated to @_response.content_type, but @_response is nil.......
     # ./app/helpers/application_helper/flash.rb:27:in `javascript_flash'
     # ./app/controllers/miq_ae_class_controller.rb:1235:in `rescue in update_method'
     # ./app/controllers/miq_ae_class_controller.rb:1223:in `update_method'
     # ./spec/controllers/miq_ae_class_controller_spec.rb:575:in `block (3 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # ActiveRecord::RecordInvalid:
     #   Validation failed: MiqAeMethod: Embedded methods is reserved
     #   ./app/controllers/miq_ae_class_controller.rb:1229:in `block in update_method'

  2) MiqAeClassController#ae_class_validation Should not allow to add two parameters with identical name to a newly created method
     Failure/Error: expect(assigns(:flash_array).first[:message]).to include("Name has already been taken")
       expected "Error during 'add': Validation failed: MiqAeMethod: Embedded methods is reserved" to include "Name has already been taken"
     # ./spec/controllers/miq_ae_class_controller_spec.rb:534:in `block (3 levels) in <top (required)>'

cause ManageIQ/manageiq#18778
fix #5601

@mzazrivec
Copy link
Contributor

1) CloudTenantController#create queues the create action
     Failure/Error: MiqTask.generic_action_with_callback(task_opts, queue_opts)
       #<MiqTask(id: integer, name: string, state: string, status: string, message: text, userid: string, created_on: datetime, updated_on: datetime, pct_complete: integer, context_data: text, results: text, miq_server_id: integer, identifier: string, started_on: datetime, zone: string, href_slug: string, region_number: integer, region_description: string, state_or_status: string) (class)> received :generic_action_with_callback with unexpected arguments
         expected: ({:action=>"creating Cloud Tenant for user user2897", :userid=>"user2897"}, {:args=>[11000000002025, {:name=>"foo"}], :class_name=>ManageIQ::Providers::Openstack::CloudManager::... ), :method_name=>"create_cloud_tenant", :priority=>20, :role=>"ems_operations", :zone=>"Zone 3000"})
              got: ({:action=>"creating Cloud Tenant for user user2897", :userid=>"user2897"}, {:args=>[11000000002025, {:name=>"foo"}], :class_name=>"ManageIQ::Providers::Openstack::CloudManager:...t", :method_name=>"create_cloud_tenant", :priority=>20, :role=>"ems_operations", :zone=>"Zone 3000"})
       Diff:
       @@ -1,7 +1,6 @@
        [{:action=>"creating Cloud Tenant for user user2897", :userid=>"user2897"},
         {:args=>[11000000002025, {:name=>"foo"}],
       -  :class_name=>
       -   ManageIQ::Providers::Openstack::CloudManager::CloudTenant(id: integer, name: string, description: text, enabled: boolean, ems_ref: string, ems_id: integer, created_at: datetime, updated_at: datetime, type: string, parent_id: integer, href_slug: string, region_number: integer, region_description: string, total_vms: integer, cloud_volume_types: ),
       +  :class_name=>"ManageIQ::Providers::Openstack::CloudManager::CloudTenant",
          :method_name=>"create_cloud_tenant",
          :priority=>20,
          :role=>"ems_operations",
     # ./spec/manageiq/app/models/cloud_tenant.rb:67:in `create_cloud_tenant_queue'
     # ./app/controllers/cloud_tenant_controller.rb:87:in `create'
     # ./spec/controllers/cloud_tenant_controller_spec.rb:120:in `block (3 levels) in <top (required)>'

Cause: ManageIQ/manageiq#18827
Fix: #5660

@himdel
Copy link
Contributor Author

himdel commented Jun 11, 2019

https://travis-ci.org/ManageIQ/manageiq-ui-classic/jobs/544108049

  1) ReportHelper#chart_fields_options should return numeric fields from report with models when "Show Sort Breaks" is "No"
     Failure/Error: data_type = parse_field_or_tag(path).try(:column_type)
     
     NoMethodError:
       undefined method `parse_field_or_tag' for #<Class:0x000000000a783ea8>
     # ./spec/manageiq/app/models/miq_report.rb:127:in `get_col_info'
     # ./app/helpers/report_helper.rb:53:in `block in chart_fields_options'
     # ./app/helpers/report_helper.rb:52:in `each'
     # ./app/helpers/report_helper.rb:52:in `find_all'
     # ./app/helpers/report_helper.rb:52:in `chart_fields_options'
     # ./spec/helpers/report_helper_spec.rb:57:in `block (3 levels) in <top (required)>'

Cause: ManageIQ/manageiq#18784
Fix: ManageIQ/manageiq#18850

@himdel
Copy link
Contributor Author

himdel commented Jun 12, 2019

https://travis-ci.org/ManageIQ/manageiq-ui-classic/jobs/544619532

Failures:
  1) AnsibleCredentialController#show renders correct template and listnav
     Failure/Error: is_expected.to render_template(:partial => "layouts/listnav/_ansible_credential")
       expecting partial <layouts/listnav/_ansible_credential> but action rendered <["layouts/_flash_msg", "_flash_msg", "layouts/_textual_groups_generic", "_textual_groups_generic", "layouts/_exception_contents", "_exception_contents", "layouts/_doctype", "_doctype", "stylesheets/_template50", "_template50", "layouts/_i18n_js", "_i18n_js", "layouts/_user_options", "_user_options", "layouts/_notifications_drawer", "_notifications_drawer", "layouts/_toast_list", "_toast_list", "layouts/_spinner", "_spinner", "layouts/_lightbox_panel", "_lightbox_panel", "layouts/_header", "_header", "layouts/_vertical_navbar", "_vertical_navbar", "layouts/_breadcrumbs", "_breadcrumbs", "layouts/_center_div_no_listnav", "_center_div_no_listnav", "layouts/_content", "_content", "layouts/_adv_search_body", "_adv_search_body", "layouts/_adv_search_footer", "_adv_search_footer", "layouts/_adv_search", "_adv_search", "layouts/_footer", "_footer"]>.
       Expected {"layouts/_flash_msg"=>1, "_flash_msg"=>1, "layouts/_textual_groups_generic"=>1, "_textual_groups_generic"=>1, "layouts/_exception_contents"=>1, "_exception_contents"=>1, "layouts/_doctype"=>1, "_doctype"=>1, "stylesheets/_template50"=>1, "_template50"=>1, "layouts/_i18n_js"=>1, "_i18n_js"=>1, "layouts/_user_options"=>1, "_user_options"=>1, "layouts/_notifications_drawer"=>1, "_notifications_drawer"=>1, "layouts/_toast_list"=>1, "_toast_list"=>1, "layouts/_spinner"=>1, "_spinner"=>1, "layouts/_lightbox_panel"=>1, "_lightbox_panel"=>1, "layouts/_header"=>1, "_header"=>1, "layouts/_vertical_navbar"=>1, "_vertical_navbar"=>1, "layouts/_breadcrumbs"=>1, "_breadcrumbs"=>1, "layouts/_center_div_no_listnav"=>1, "_center_div_no_listnav"=>1, "layouts/_content"=>1, "_content"=>1, "layouts/_adv_search_body"=>1, "_adv_search_body"=>1, "layouts/_adv_search_footer"=>1, "_adv_search_footer"=>1, "layouts/_adv_search"=>1, "_adv_search"=>1, "layouts/_footer"=>1, "_footer"=>1} to include "layouts/listnav/_ansible_credential".
     # ./spec/controllers/ansible_credential_controller_spec.rb:14:in `block (3 levels) in <top (required)>'

(uninitialized constant ManageIQ::Providers::EmbeddedAnsible::AutomationManager::MachineCredential::API_ATTRIBUTES [ansible_credential/show])

Cause: ManageIQ/manageiq#18687
Fix: ManageIQ/manageiq#18854

@himdel
Copy link
Contributor Author

himdel commented Jul 9, 2019

@Fryguy I think the approach you outlined is a nice first step, but I don't expect it to have much effect by itself. It makes it easy to run the tests when you suspect there may be a problem, but... well, if a merger already suspects there may be a problem with a particular PR and doesn't try just running the tests locally, that's just negligence :).

If the goal is to catch unexpected breakages, this does nothing, except perhaps serve as a basis for a policy of "do this for every PR where X,Y,Z".

So.. what are the plans after that?

@bdunne
Copy link
Member

bdunne commented Jul 9, 2019

It feels like the test mentioned in #4921 (comment) is in the wrong repo and should live with the YAML files that it's testing.

@himdel
Copy link
Contributor Author

himdel commented Jul 9, 2019

Aah, yes.. it was moved together with product/views in #1384 / ManageIQ/manageiq#15159, but it doesn't actually test product/views. However, it also tests timelines, charts etc,. all of which should live in the UI.

So.. maybe we need to fix the UI spec to look at product/views instead of product/reports and copy the relevant bit of the spec to core, to check product/reports there?

@himdel
Copy link
Contributor Author

himdel commented Jul 23, 2019

https://travis-ci.org/ManageIQ/manageiq-ui-classic/jobs/562535976

  1) TreeNode::ConfiguredSystem  #tooltip returns the prefixed text
     Failure/Error: expect(subject.tooltip).to eq("#{prefix}: #{subject.text}")
     
       expected: "Configured System: Configured_system_0000000000003"
            got: "Host Name"
     
       (compared using ==)
     Shared Example Group: "TreeNode::Node#tooltip prefix" called from ./spec/presenters/tree_node/configured_system_spec.rb:15
     # ./spec/shared/presenters/tree_node/common.rb:36:in `block (3 levels) in <top (required)>'

ManageIQ/manageiq#18977 (comment)

Cause: ManageIQ/manageiq#18977
Fix: ManageIQ/manageiq#19045

@mzazrivec
Copy link
Contributor

https://travis-ci.org/ManageIQ/manageiq-ui-classic/jobs/563014986

ApplicationHelper#role_allows? permission store consults the permission store
     Failure/Error: expect(Menu::DefaultMenu.services_menu_section.visible?).to be_truthy
     
       expected: truthy value
            got: false
     # ./spec/helpers/application_helper_spec.rb:62:in `block (5 levels) in <top (required)>'
     # ./spec/helpers/application_helper_spec.rb:50:in `block (4 levels) in <top (required)>'

Cause: ManageIQ/manageiq#19053
Fix: #5870

@mzazrivec
Copy link
Contributor

mzazrivec commented Nov 8, 2019

Failing CI: https://travis-ci.org/ManageIQ/manageiq-ui-classic/jobs/608753209?utm_medium=notification&utm_source=github_status

irb(main):002:0> MiqExpression.miq_adv_search_lists('CloudNetwork', :exp_available_finds)
PostgreSQLAdapter#log_after_checkout, connection_pool: size: 30, connections: 1, in use: 1, waiting_in_queue: 0
Traceback (most recent call last):
       16: from railties (5.1.7) lib/rails/commands/console/console_command.rb:97:in `perform'
       15: from railties (5.1.7) lib/rails/commands/console/console_command.rb:17:in `start'
       14: from railties (5.1.7) lib/rails/commands/console/console_command.rb:62:in `start'
       13: from (irb):2
       12: from lib/miq_expression.rb:903:in `miq_adv_search_lists'
       11: from lib/miq_expression.rb:802:in `model_details'
       10: from lib/miq_expression.rb:891:in `get_relats'
        9: from lib/miq_expression.rb:942:in `build_relats'
        8: from lib/miq_expression.rb:942:in `each'
        7: from lib/miq_expression.rb:973:in `block in build_relats'
        6: from lib/miq_expression.rb:942:in `build_relats'
        5: from lib/miq_expression.rb:942:in `each'
        4: from lib/miq_expression.rb:952:in `block in build_relats'
        3: from activerecord (5.1.7) lib/active_record/reflection.rb:404:in `klass'
        2: from activerecord (5.1.7) lib/active_record/reflection.rb:408:in `compute_class'
        1: from activerecord (5.1.7) lib/active_record/inheritance.rb:166:in `compute_type'
NameError (uninitialized constant ManageIQ::Providers::NetworkManager::AuthKeyPair)

Cause: ManageIQ/manageiq#19473 (comment)
Fix: ManageIQ/manageiq#19486

@himdel
Copy link
Contributor Author

himdel commented Nov 14, 2019

https://travis-ci.org/ManageIQ/manageiq-ui-classic/jobs/611907845#L2080

  1) ReportController::Dashboards #db_copy when save button saves unsuccessfully and returns error message
     Failure/Error: expect(JSON.parse(response.body)["error"]["message"]).to include("Error")
     
     NoMethodError:
       undefined method `[]' for nil:NilClass
     # ./spec/controllers/miq_report_controller/dashboards_spec.rb:29:in `block (5 levels) in <top (required)>'

(the expected response.body is "{\"error\":{\"message\":\"Error during 'Validate': Validation failed: MiqWidgetSet: Name has already been taken\"}}")

Cause: ManageIQ/manageiq#19491
Fix: #6416

@himdel
Copy link
Contributor Author

himdel commented Nov 19, 2019

https://travis-ci.org/ManageIQ/manageiq-ui-classic/jobs/614038504#L2079

  1) VmInfraController the reconfigure tab displays the submit and cancel buttons
     Failure/Error: expect(response.body).to include("miq-button alt='Submit'")
       expected "{\"explorer\":\"flash\",\"replacePartials\":{\"flash_msg_div\":\"\\u003cdiv id='flash_msg_div' style...ong\\u003e\\n\\u003c/div\\u003e\\n\\u003c/div\\u003e\\n\\u003c/div\\u003e\\n\"},\"scrollTop\":true}" to include "miq-button alt='Submit'"
     # ./spec/controllers/vm_infra_controller_spec.rb:566:in `block (2 levels) in <top (required)>'
  2) VmInfraController the reconfigure tab for a vm with max_cpu_cores_per_socket > 1 should display the cpu_cores_per_socket dropdown
     Failure/Error: expect(response.body).to include('Total Processors')
       expected "{\"explorer\":\"flash\",\"replacePartials\":{\"flash_msg_div\":\"\\u003cdiv id='flash_msg_div' style...ong\\u003e\\n\\u003c/div\\u003e\\n\\u003c/div\\u003e\\n\\u003c/div\\u003e\\n\"},\"scrollTop\":true}" to include "Total Processors"
     # ./spec/controllers/vm_infra_controller_spec.rb:532:in `block (2 levels) in <top (required)>'
  3) VmInfraController the reconfigure tab for a single vmware vm should display the list of disks
     Failure/Error: expect(response.body).to include('Disks')
       expected "{\"explorer\":\"flash\",\"replacePartials\":{\"flash_msg_div\":\"\\u003cdiv id='flash_msg_div' style...ong\\u003e\\n\\u003c/div\\u003e\\n\\u003c/div\\u003e\\n\\u003c/div\\u003e\\n\"},\"scrollTop\":true}" to include "Disks"
     # ./spec/controllers/vm_infra_controller_spec.rb:549:in `block (2 levels) in <top (required)>'
  4) ApplicationHelper::Button::VmReconfigure#visible? record is vmware vm behaves like will not be skipped for this record is expected to be truthy
     Failure/Error: expect(button.visible?).to be_truthy
     
       expected: truthy value
            got: false
     Shared Example Group: "will not be skipped for this record" called from ./spec/helpers/application_helper/buttons/vm_reconfigure_spec.rb:8
     # ./spec/shared/helpers/application_helper_buttons.rb:13:in `block (2 levels) in <top (required)>'
  5) ApplicationController Certain actions should be allowed only for a VM record
     Failure/Error: expect(controller.send(:flash_errors?)).not_to be_truthy
     
       expected: falsey value
            got: true
     # ./spec/controllers/application_controller/ci_processing_spec.rb:621:in `block (3 levels) in <top (required)>'
     # ./spec/controllers/application_controller/ci_processing_spec.rb:618:in `each'
     # ./spec/controllers/application_controller/ci_processing_spec.rb:618:in `block (2 levels) in <top (required)>'

Cause: ManageIQ/manageiq-providers-ovirt#421, ManageIQ/manageiq-providers-vmware#467

Fix: #6428

@agrare
Copy link
Member

agrare commented Nov 19, 2019

In this last case it was a provider change that caused the failure.

I don't think that running the UI specs on every core PR and every provider PR is going to be very reasonable.

@himdel
Copy link
Contributor Author

himdel commented Nov 20, 2019

Well, @agrare how this should work is that we have a set of provider methods that are guaranteed to have a stable interface, and test that UI and everything else just use those methods. Then there would be no need for this, you could just test those methods in provider repos. (IIRC that was even an explicit target at some point, we can't really have pluggable providers without it.)

But, until that happens, the UI (and API) is the main place where provider code and core code come together. We are the integration. So, I think it's absolutely reasonable to run the UI tests everywhere.

Of course, if we do that, we may want to go through those tests and comb them so that tests that won't catch any of these problems only run ui side. But, that's probably just JS tests now anyway. Really.


I mean, we don't have to run tests that test our toolbar implementation in providers.
But we absolutely have to run tests that evaulate individual toolbar definitions, as long as toolbars need to call provider methods to determine whether they should be enabled or not.
If those provider methods break, the whole app breaks, so it absolutely makes sense to tests that, even though those are just "ui toolbar tests" :).

That, or write actual shared provider tests that test that every method the UI needs keeps the same interface :).

@martinpovolny
Copy link
Member

cc: @chessbyte

@agrare
Copy link
Member

agrare commented Nov 20, 2019

how this should work is that we have a set of provider methods that are guaranteed to have a stable interface, and test that UI and everything else just use those methods. Then there would be no need for this, you could just test those methods in provider repos

We completely agree on this point, lets add moving provider specifics in UI specs to the pluggability checklist ManageIQ/manageiq#19440 so we can start moving the provider logic out of the UI.

@himdel
Copy link
Contributor Author

himdel commented Nov 25, 2019

https://travis-ci.org/ManageIQ/manageiq-ui-classic/jobs/615790473#L2060

  1) Mixins::Actions::VmActions::Rename#rename_save getting proper task_id initiates wait for task
     Failure/Error: expect(controller).to receive(:initiate_wait_for_task).with(:task_id => kind_of(Integer), :action => 'rename_finished')
     ...@flash_array=[{:message=>{:text=>"VM rename: Task start failed",...

Cause: ManageIQ/manageiq#19544
Fix: ManageIQ/manageiq#19553

@martinpovolny
Copy link
Member

martinpovolny commented Dec 4, 2019

https://travis-ci.org/ManageIQ/manageiq-ui-classic/jobs/620502649

1) CloudVolumeController#create_volume in Amazon EBS for volume type 'gp2' behaves like queue create volume task queues the create cloud volume action form OpenStack
     Failure/Error: MiqTask.generic_action_with_callback(task_opts, queue_opts)
     
       #<MiqTask(id: integer, name: string, state: string, status: string, message: text, userid: string, created_on: datetime, updated_on: datetime, pct_complete: integer, context_data: text, results: text, miq_server_id: integer, identifier: string, started_on: datetime, zone: string, href_slug: string, region_number: integer, region_description: string, state_or_status: string) (class)> received :generic_action_with_callback with unexpected arguments
         expected: ({:action=>"creating Cloud Volume for user user9", :userid=>"user9"}, {:args=>[52000000000033, {:availability_zone=>"us-east-1e", :encrypted=>nil, :name=>"volume", :size=>...class_name=>"CloudVolume", :method_name=>"create_volume", :role=>"ems_operations", :zone=>"Zone 22"})
              got: ({:action=>"creating Cloud Volume for user user9", :userid=>"user9"}, {:args=>[52000000000033, {:availability_zone=>"us-east-1e", :encrypted=>nil, :name=>"volume", :size=>...Volume", :method_name=>"create_volume", :queue_name=>nil, :role=>"ems_operations", :zone=>"Zone 22"})
       Diff:
       @@ -8,6 +8,7 @@
             :volume_type=>"gp2"}],
          :class_name=>"CloudVolume",
          :method_name=>"create_volume",
       +  :queue_name=>nil,
          :role=>"ems_operations",
          :zone=>"Zone 22"}]

Cause: ManageIQ/manageiq#19570
Fix: #6482

@himdel
Copy link
Contributor Author

himdel commented Dec 6, 2019

https://travis-ci.org/ManageIQ/manageiq-ui-classic/jobs/621722549

rspec ./spec/controllers/cloud_object_store_container_spec.rb:165 # CloudObjectStoreContainerController create object store container in Amazon S3 create behaves like queue create container task queues the create cloud object store container action form
rspec ./spec/controllers/cloud_tenant_controller_spec.rb:175 # CloudTenantController#delete queues the delete action
rspec ./spec/controllers/cloud_tenant_controller_spec.rb:149 # CloudTenantController#edit queues the update action
rspec ./spec/controllers/cloud_tenant_controller_spec.rb:117 # CloudTenantController#create queues the create action

(all the specs fail on the same thing:)

     Failure/Error: MiqTask.generic_action_with_callback(task_opts, queue_opts)
     
       #<MiqTask(id: integer, name: string, state: string, status: string, message: text, userid: string, created_on: datetime, updated_on: datetime, pct_complete: integer, context_data: text, results: text, miq_server_id: integer, identifier: string, started_on: datetime, zone: string, href_slug: string, region_number: integer, region_description: string, state_or_status: string) (class)> received :generic_action_with_callback with unexpected arguments
         expected: ({:action=>"creating Cloud Object Store Container for user user3219", :userid=>"user3219"}, {:args=>[34000000001988, {:create_bucket_configuration=>{:location_constraint=>"eu-central-1"}, :name...", :method_name=>"cloud_object_store_container_create", :role=>"ems_operations", :zone=>"Zone 3052"})
              got: ({:action=>"creating Cloud Object Store Container for user user3219", :userid=>"user3219"}, {:args=>[34000000001988, {:create_bucket_configuration=>{:location_constraint=>"eu-central-1"}, :name...cloud_object_store_container_create", :queue_name=>nil, :role=>"ems_operations", :zone=>"Zone 3052"})
       Diff:
       @@ -6,6 +6,7 @@
             :name=>"bucket-01"}],
          :class_name=>"CloudObjectStoreContainer",
          :method_name=>"cloud_object_store_container_create",
       +  :queue_name=>nil,
          :role=>"ems_operations",
          :zone=>"Zone 3052"}]

Cause: ManageIQ/manageiq#19602, ManageIQ/manageiq#19603
Fix: #6503

@agrare
Copy link
Member

agrare commented Dec 6, 2019

Created #6504 to track decoupling of UI tests from core operations methods

@himdel
Copy link
Contributor Author

himdel commented Feb 6, 2020

ManageIQ/manageiq#19754
#6662

rspec ./spec/helpers/application_helper/buttons/storage_scan_spec.rb:35 # ApplicationHelper::Button::StorageScan when feature is supported #calculate_properties with valid credentials for this Datastore behaves like an enabled button is expected to be truthy
rspec ./spec/helpers/application_helper/buttons/storage_scan_spec.rb:32 # ApplicationHelper::Button::StorageScan when feature is supported #calculate_properties but no EMS has valid credentials for the Datastore behaves like a disabled button is expected to eq "There are no EMSs with valid credentials for this Datastore"

@skateman
Copy link
Member

Upgrading kubeclient broke stuff in the UI:

1) EmsContainerController.update_ems_button_detect with route set detects openshift prometheus alert route
     Failure/Error: expect(mock_client).to receive(:discover)
     
       (Double "kubeclient").discover(*(any args))
           expected: 1 time with any arguments
           received: 2 times with any arguments
     # ./spec/controllers/ems_container_controller_spec.rb:74:in `block (4 levels) in <top (required)>'
  2) EmsContainerController.update_ems_button_detect with route set tolerates detection exceptions
     Failure/Error: expect(mock_client).to receive(:discover)
     
       (Double "kubeclient").discover(*(any args))
           expected: 1 time with any arguments
           received: 2 times with any arguments
     # ./spec/controllers/ems_container_controller_spec.rb:74:in `block (4 levels) in <top (required)>'
  3) EmsContainerController.update_ems_button_detect with route set detects openshift prometheus metric route
     Failure/Error: expect(mock_client).to receive(:discover)
     
       (Double "kubeclient").discover(*(any args))
           expected: 1 time with any arguments
           received: 2 times with any arguments
     # ./spec/controllers/ems_container_controller_spec.rb:74:in `block (4 levels) in <top (required)>'
  4) EmsContainerController.update_ems_button_detect with route set detects openshift hawkular metric route
     Failure/Error: expect(mock_client).to receive(:discover)
     
       (Double "kubeclient").discover(*(any args))
           expected: 1 time with any arguments
           received: 2 times with any arguments
     # ./spec/controllers/ems_container_controller_spec.rb:74:in `block (4 levels) in <top (required)>'

#7051

@agrare
Copy link
Member

agrare commented May 18, 2020

Hey @skateman I suspect this wasn't upgrading kubeclient or #7043 (since cross-repo tests were green on that one). I'm guessing it was probably ManageIQ/manageiq-providers-openshift#174 which changed how the method was internally constructed even though the API stayed the same. The test should probably be rewritten to not expect anything from the underlying kubeclient connection.

@skateman
Copy link
Member

skateman commented May 18, 2020

Hey @skateman I suspect this wasn't upgrading kubeclient or #7043 (since cross-repo tests were green on that one). I'm guessing it was probably ManageIQ/manageiq-providers-openshift#174 which changed how the method was internally constructed even though the API stayed the same. The test should probably be rewritten to not expect anything from the underlying kubeclient connection.

@mzazrivec can you create a new spec according to this? I guess we need allow instead of expect.

@mzazrivec
Copy link
Contributor

Cause: ManageIQ/manageiq#20361
Fix: #7214

@gtanzillo
Copy link
Member

Closing since we now have cross repo tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests