Skip to content

Commit

Permalink
Merge pull request #3759 from 18F/3737-upgrade-node-remove-dns-workar…
Browse files Browse the repository at this point in the history
…ound

3737 upgrade node remove dns workaround
  • Loading branch information
davemcorwin committed Jan 28, 2022
2 parents 6849b5d + fec1159 commit 6c34807
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 37 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ commands:
jobs:
build:
docker:
- image: circleci/node:16.4
- image: circleci/node:16.13
environment:
YARN_VERSION: 0.24.6-1
CC_TEST_REPORTER_ID: 101a439651b6abd27e5440028a53b5b8f08fe0889f3948d5f58f6cf9f7c786a0
Expand Down Expand Up @@ -166,7 +166,7 @@ jobs:
deploy:
docker:
- image: circleci/node:16.4
- image: circleci/node:16.13
parameters:
app:
type: string
Expand All @@ -190,7 +190,7 @@ jobs:

deploy-admin-client:
docker:
- image: circleci/node:16.4
- image: circleci/node:16.13
parameters:
app:
type: string
Expand Down Expand Up @@ -234,7 +234,7 @@ jobs:

deploy-queues-ui:
docker:
- image: circleci/node:16.4
- image: circleci/node:16.13
parameters:
app:
type: string
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-app
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.4
FROM node:16.13.1

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion admin-client/Dockerfile-admin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.4
FROM node:16.13.1

WORKDIR /app

Expand Down
4 changes: 2 additions & 2 deletions admin-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"start": "sirv public -p 3000 --host --single --dev"
},
"engines": {
"node": "16.x.x",
"npm": "7.x.x"
"node": "^16.13.1",
"npm": "^8.1.2"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^12.0.0",
Expand Down
23 changes: 0 additions & 23 deletions api/services/Dns.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,29 +107,6 @@ async function resolveDnsRecord(dnsRecord) {
return [DnsResultState.Pending, 'Record not set'];
}

// 2021-11-10
// A temporary workaround until node is updated with the latest c-ares version
// that fixes the regression in handling domain names with underscores
// https://github.com/nodejs/node/issues/39780
if (code === 'EBADRESP') {
// eslint-disable-next-line global-require
const { execFileSync } = require('child_process');
const value = execFileSync('dig', ['+short', dnsRecord.type, dnsRecord.name], { encoding: 'utf8' });

if (!value) {
return [DnsResultState.Pending, 'Record not set'];
}

const formattedValue = value.trim().slice(0, -1);

if (formattedValue === dnsRecord.target) {
return [DnsResultState.Success];
}

return [DnsResultState.Pending, `Record incorrectly set to ${formattedValue}`];
}
// end workaround

return [DnsResultState.Error, error.message];
}
}
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3'

services:
app:
image: node:16
image: node:16.13
volumes:
- ../..:/app
depends_on:
Expand Down
4 changes: 2 additions & 2 deletions ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ node-image: &node-image
type: docker-image
source:
repository: node
tag: 16
tag: 16.13

cf-image: &cf-image
platform: linux
Expand Down Expand Up @@ -524,7 +524,7 @@ resources:
type: docker-image
source:
repository: node
tag: 16
tag: 16.13

- name: slack
type: slack-notification
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@
"send-email": "node ./scripts/send-email.js",
"bootstrap-admins": "node ./scripts/bootstrap-admins.js",
"migrate-build-notification-settings": "node ./scripts/migrate-build-notification-settings.js",
"remove-bucket-website-configs": "node ./scripts/remove-bucket-website-configs.js"
"remove-bucket-website-configs": "node ./scripts/remove-bucket-website-configs.js",
"check-object-paths": "node ./scripts/check-object-paths.js"
},
"main": "index.js",
"repository": {
Expand Down Expand Up @@ -171,7 +172,7 @@
"webpack-manifest-plugin": "^3.0.0"
},
"engines": {
"node": "16.x.x",
"npm": "7.x.x"
"node": "^16.13.1",
"npm": "^8.1.2"
}
}

0 comments on commit 6c34807

Please sign in to comment.