Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Renovate Bot
renovate
Commits
a00cefa5
Commit
a00cefa5
authored
4 years ago
by
Rhys Arkins
Browse files
Options
Downloads
Patches
Plain Diff
fix(terraform): gracefully handle EAI_AGAIN
parent
65190695
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/datasource/terraform-module/index.ts
+6
-1
6 additions, 1 deletion
lib/datasource/terraform-module/index.ts
lib/datasource/terraform-provider/index.ts
+6
-1
6 additions, 1 deletion
lib/datasource/terraform-provider/index.ts
with
12 additions
and
2 deletions
lib/datasource/terraform-module/index.ts
+
6
−
1
View file @
a00cefa5
...
...
@@ -2,7 +2,7 @@ import is from '@sindresorhus/is';
import
{
logger
}
from
'
../../logger
'
;
import
*
as
globalCache
from
'
../../util/cache/global
'
;
import
{
Http
}
from
'
../../util/http
'
;
import
{
GetReleasesConfig
,
ReleaseResult
}
from
'
../common
'
;
import
{
DatasourceError
,
GetReleasesConfig
,
ReleaseResult
}
from
'
../common
'
;
export
const
id
=
'
terraform-module
'
;
...
...
@@ -111,6 +111,11 @@ export async function getReleases({
});
return
null
;
}
const
failureCodes
=
[
'
EAI_AGAIN
'
];
// istanbul ignore if
if
(
failureCodes
.
includes
(
err
.
code
))
{
throw
new
DatasourceError
(
err
);
}
logger
.
warn
(
{
err
,
lookupName
},
'
Terraform registry failure: Unknown error
'
...
...
This diff is collapsed.
Click to expand it.
lib/datasource/terraform-provider/index.ts
+
6
−
1
View file @
a00cefa5
import
{
logger
}
from
'
../../logger
'
;
import
*
as
globalCache
from
'
../../util/cache/global
'
;
import
{
Http
}
from
'
../../util/http
'
;
import
{
GetReleasesConfig
,
ReleaseResult
}
from
'
../common
'
;
import
{
DatasourceError
,
GetReleasesConfig
,
ReleaseResult
}
from
'
../common
'
;
export
const
id
=
'
terraform-provider
'
;
...
...
@@ -69,6 +69,11 @@ export async function getReleases({
});
return
null
;
}
const
failureCodes
=
[
'
EAI_AGAIN
'
];
// istanbul ignore if
if
(
failureCodes
.
includes
(
err
.
code
))
{
throw
new
DatasourceError
(
err
);
}
logger
.
warn
(
{
err
,
lookupName
},
'
Terraform registry failure: Unknown error
'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment