ee/spec/features/projects/new_project_spec.rb fails if GitHub is down

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

GitHub was down for a while, and in https://gitlab.com/gitlab-org/gitlab/-/jobs/4568252354 I see:

    1.3) Failure/Error: @app.call(env)
          Faraday::ConnectionFailed:
            Failed to open TCP connection to api.github.com:443 (execution expired)
          # ./lib/gitlab/octokit/middleware.rb:18:in `call'
          # ./app/controllers/import/github_groups_controller.rb:31:in `client_orgs'
          # ./app/controllers/import/github_groups_controller.rb:27:in `importable_orgs'
          # ./app/controllers/import/github_groups_controller.rb:23:in `serialized_provider_groups'
          # ./app/controllers/import/github_groups_controller.rb:15:in `block (2 levels) in status'
          # ./app/controllers/import/github_groups_controller.rb:13:in `status'
          # ./ee/lib/gitlab/ip_address_state.rb:10:in `with'
          # ./ee/app/controllers/ee/application_controller.rb:45:in `set_current_ip_address'
          # ./lib/gitlab/auth/current_user_mode.rb:72:in `with_current_admin'
          # ./app/controllers/application_controller.rb:503:in `set_current_admin'
          # ./lib/gitlab/session.rb:11:in `with_session'
          # ./app/controllers/application_controller.rb:491:in `set_session_storage'
          # ./lib/gitlab/i18n.rb:107:in `with_locale'

The spec appears to stub api.github.com in https://gitlab.com/gitlab-org/gitlab/-/blob/f0991bf4021c8676d522ab396bd569b1575a51a8/ee/spec/features/projects/new_project_spec.rb#L170-171, but the backtrace suggests the controller is attempting to retrieve a list of organizations. I thought Webmock would block external HTTP requests. We should update this test to avoid making any external HTTP requests and investigate why this HTTP request wasn't flagged.

Edited Jul 02, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading