Broken `master` due to failure in spec/services/clusters/applications/schedule_installation_service_spec.rb
Job #42729131 failed for f999fa4c:
1) Clusters::Applications::ScheduleInstallationService#execute creates a new application
Failure/Error: @client.get_namespace(name)
WebMock::NetConnectNotAllowedError:
Real HTTP connections are disabled. Unregistered request: GET https://kubernetes.example.com/api/v1 with headers {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip, deflate', 'Authorization'=>'Bearer aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'Host'=>'kubernetes.example.com', 'User-Agent'=>'rest-client/2.0.0 (linux-gnu x86_64) ruby/2.3.5p376'}
You can stub this request with the following snippet:
stub_request(:get, "https://kubernetes.example.com/api/v1").
with(:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip, deflate', 'Authorization'=>'Bearer aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'Host'=>'kubernetes.example.com', 'User-Agent'=>'rest-client/2.0.0 (linux-gnu x86_64) ruby/2.3.5p376'}).
to_return(:status => 200, :body => "", :headers => {})
============================================================
# ./lib/gitlab/kubernetes/namespace.rb:12:in `exists?'
# ./lib/gitlab/kubernetes/namespace.rb:26:in `ensure_exists!'
# ./lib/gitlab/kubernetes/helm.rb:25:in `install'
# ./app/services/clusters/applications/install_service.rb:9:in `execute'
# ./app/workers/cluster_install_app_worker.rb:8:in `block in perform'
# ./app/workers/concerns/cluster_applications.rb:6:in `find_application'
# ./app/workers/cluster_install_app_worker.rb:7:in `perform'
# ./lib/gitlab/sidekiq_status/server_middleware.rb:5:in `call'
# ./config/initializers/forbid_sidekiq_in_transactions.rb:21:in `block (2 levels) in <module:NoSchedulingFromTransactions>'
# ./app/services/clusters/applications/schedule_installation_service.rb:7:in `block in execute'
# ./app/services/clusters/applications/schedule_installation_service.rb:5:in `execute'
# ./spec/services/clusters/applications/schedule_installation_service_spec.rb:25:in `block (4 levels) in <top (required)>'
# ./spec/services/clusters/applications/schedule_installation_service_spec.rb:25:in `block (3 levels) in <top (required)>'
Finished in 32 minutes 43 seconds (files took 28.93 seconds to load)
1267 examples, 1 failure
Failed examples:
rspec ./spec/services/clusters/applications/schedule_installation_service_spec.rb:24 # Clusters::Applications::ScheduleInstallationService#execute creates a new application
/cc @dosuken123 @ayufan since this was reported at https://gitlab.slack.com/archives/C3JJET4Q6/p1512127134000013.