Commit b91438de authored by Mark Lapierre's avatar Mark Lapierre Committed by Ramya Authappan

Make runner handling more resilient

Retry getting the runners token if it's not available initially

Ensure the docker runner container is stopped even if there's a
problem removing it from the project
parent b5f6142d
...@@ -54,7 +54,7 @@ module QA ...@@ -54,7 +54,7 @@ module QA
@id = this_runner[:id] @id = this_runner[:id]
super super
ensure
Service::DockerRun::GitlabRunner.new(name).remove! Service::DockerRun::GitlabRunner.new(name).remove!
end end
......
...@@ -41,6 +41,14 @@ module QA ...@@ -41,6 +41,14 @@ module QA
resource_web_url(api_get) resource_web_url(api_get)
rescue ResourceNotFoundError rescue ResourceNotFoundError
super super
# If the group was just created the runners token might not be
# available via the API immediately.
Support::Retrier.retry_on_exception(sleep_interval: 5) do
resource = resource_web_url(api_get)
populate(:runners_token)
resource
end
end end
def api_get_path def api_get_path
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment