Skip to content

Commit

Permalink
chore: bump gcp-metadata
Browse files Browse the repository at this point in the history
bump minimum node ver for gcp detector

Co-authored-by: Bradley Behnke <[email protected]>
  • Loading branch information
dyladan and Bradley Behnke committed Aug 27, 2020
1 parent 5c7753f commit 19c7b17
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 15 deletions.
1 change: 1 addition & 0 deletions .circleci/checksum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ fi
openssl md5 package.json >> $FILE

find packages/*/package.json | xargs -I{} openssl md5 {} >> $FILE
find metapackages/*/package.json | xargs -I{} openssl md5 {} >> $FILE

sort -o $FILE $FILE
14 changes: 8 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ node_test_env: &node_test_env


cache_1: &cache_1
key: npm-cache-01-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-F267A71D
key: npm-cache-01-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-20B74F85
paths:
- ./node_modules
- ./package-lock.json
Expand All @@ -25,13 +25,15 @@ cache_1: &cache_1
- packages/opentelemetry-web/node_modules

cache_2: &cache_2
key: npm-cache-02-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-F267A71D
key: npm-cache-02-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-20B74F85
paths:
- packages/opentelemetry-plugin-grpc/node_modules
- packages/opentelemetry-plugin-http/node_modules
- packages/opentelemetry-plugin-https/node_modules
- packages/opentelemetry-exporter-collector/node_modules
- packages/opentelemetry-plugin-xml-http-request/node_modules
- packages/opentelemetry-resource-detector-aws/node_modules
- packages/opentelemetry-resource-detector-gcp/node_modules
- packages/opentelemetry-resources/node_modules

node_unit_tests: &node_unit_tests
Expand All @@ -53,10 +55,10 @@ node_unit_tests: &node_unit_tests
echo "CIRCLE_NODE_VERSION=${CIRCLE_NODE_VERSION}"
- restore_cache:
keys:
- npm-cache-01-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-F267A71D
- npm-cache-01-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-20B74F85
- restore_cache:
keys:
- npm-cache-02-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-F267A71D
- npm-cache-02-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-20B74F85
- run:
name: Install Root Dependencies
command: npm install --ignore-scripts
Expand Down Expand Up @@ -93,10 +95,10 @@ browsers_unit_tests: &browsers_unit_tests
echo "CIRCLE_NODE_VERSION=${CIRCLE_NODE_VERSION}"
- restore_cache:
keys:
- npm-cache-01-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-F267A71D
- npm-cache-01-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-20B74F85
- restore_cache:
keys:
- npm-cache-02-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-F267A71D
- npm-cache-02-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-20B74F85
- run:
name: Install Root Dependencies
command: npm install --ignore-scripts
Expand Down
2 changes: 2 additions & 0 deletions packages/opentelemetry-resource-detector-gcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ The OpenTelemetry Resource is an immutable representation of the entity producin

## Installation

The GCP resource detector requires Node.JS 10+ due to a dependency on [`gcp-metadata`](https://www.npmjs.com/package/gcp-metadata) which uses features only available in Node.JS 10+.

```bash
npm install --save @opentelemetry/resource-detector-gcp
```
Expand Down
11 changes: 5 additions & 6 deletions packages/opentelemetry-resource-detector-gcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
},
"files": [
"build/src/**/*.js",
Expand All @@ -41,24 +41,23 @@
"access": "public"
},
"devDependencies": {
"@opentelemetry/core": "^0.10.2",
"@types/mocha": "8.0.1",
"@types/node": "14.0.27",
"@types/sinon": "9.0.4",
"@types/semver": "7.3.3",
"codecov": "3.7.2",
"gts": "2.0.2",
"mocha": "7.2.0",
"nock": "12.0.3",
"nyc": "15.1.0",
"rimraf": "3.0.2",
"sinon": "9.0.2",
"semver": "7.3.2",
"ts-mocha": "7.0.0",
"ts-node": "8.10.2",
"typescript": "3.9.7"
},
"dependencies": {
"@opentelemetry/api": "^0.10.2",
"@opentelemetry/core": "^0.10.2",
"@opentelemetry/resources": "^0.10.2",
"gcp-metadata": "^3.5.0"
"gcp-metadata": "^4.1.4"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
resetIsAvailableCache,
} from 'gcp-metadata';
import * as nock from 'nock';
import * as semver from 'semver';
import { gcpDetector } from '../../src';
import {
assertCloudResource,
Expand All @@ -43,8 +44,8 @@ const PROJECT_ID_PATH = BASE_PATH + '/project/project-id';
const ZONE_PATH = BASE_PATH + '/instance/zone';
const CLUSTER_NAME_PATH = BASE_PATH + '/instance/attributes/cluster-name';

describe('gcpDetector', () => {
describe('.detect', () => {
(semver.satisfies(process.version, ">=10") ? describe : describe.skip)('gcpDetector', () => {
describe('.detect', function() {
before(() => {
nock.disableNetConnect();
});
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-sdk-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@types/node": "14.0.27",
"@types/sinon": "9.0.4",
"codecov": "3.7.2",
"gcp-metadata": "^3.5.0",
"gcp-metadata": "^4.1.4",
"gts": "2.0.2",
"istanbul-instrumenter-loader": "3.0.1",
"mocha": "7.2.0",
Expand Down

0 comments on commit 19c7b17

Please sign in to comment.