Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 19 additions & 18 deletions .github/workflows/plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,24 +182,25 @@ jobs:
uses: ./.github/actions/testagent/logs
- uses: codecov/codecov-action@v2

# couchbase:
# runs-on: ubuntu-latest
# services:
# couchbase:
# image: sabrenner/couchbase-server-sandbox:latest
# ports:
# - 8091-8095:8091-8095
# - 11210:11210
# env:
# PLUGINS: couchbase
# SERVICES: couchbase
# steps:
# - uses: actions/checkout@v2
# - uses: ./.github/actions/node/setup
# - run: yarn install
# - uses: ./.github/actions/node/oldest
# - run: yarn test:plugins:ci
# - uses: codecov/codecov-action@v2
couchbase:
runs-on: ubuntu-latest
services:
couchbase:
image: ghcr.io/datadog/couchbase-server-sandbox:latest
ports:
- 8091-8095:8091-8095
- 11210:11210
env:
PLUGINS: couchbase
SERVICES: couchbase
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/testagent/start
- uses: ./.github/actions/node/setup
- run: yarn install
- uses: ./.github/actions/node/oldest
- run: yarn test:plugins:ci
- uses: codecov/codecov-action@v2

connect:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "2"
services:
couchbase:
image: sabrenner/couchbase-server-sandbox:latest
image: ghcr.io/datadog/couchbase-server-sandbox:latest
ports:
- "127.0.0.1:8091-8095:8091-8095"
- "127.0.0.1:11210:11210"
Expand Down
8 changes: 4 additions & 4 deletions packages/datadog-instrumentations/src/couchbase.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function wrapV3Query (query) {
}

// semver >=2 <3
addHook({ name: 'couchbase', file: 'lib/bucket.js', versions: ['^2.6.5'] }, Bucket => {
addHook({ name: 'couchbase', file: 'lib/bucket.js', versions: ['^2.6.12'] }, Bucket => {
const startCh = channel('apm:couchbase:query:start')
const finishCh = channel('apm:couchbase:query:finish')
const errorCh = channel('apm:couchbase:query:error')
Expand Down Expand Up @@ -208,7 +208,7 @@ addHook({ name: 'couchbase', file: 'lib/bucket.js', versions: ['^2.6.5'] }, Buck
return Bucket
})

addHook({ name: 'couchbase', file: 'lib/cluster.js', versions: ['^2.6.5'] }, Cluster => {
addHook({ name: 'couchbase', file: 'lib/cluster.js', versions: ['^2.6.12'] }, Cluster => {
Cluster.prototype._maybeInvoke = wrapMaybeInvoke(Cluster.prototype._maybeInvoke)
Cluster.prototype.query = wrapQuery(Cluster.prototype.query)

Expand All @@ -217,15 +217,15 @@ addHook({ name: 'couchbase', file: 'lib/cluster.js', versions: ['^2.6.5'] }, Clu

// semver >=3 <3.2.0

addHook({ name: 'couchbase', file: 'lib/collection.js', versions: ['>=3.0.0 <3.2.0'] }, Collection => {
addHook({ name: 'couchbase', file: 'lib/collection.js', versions: ['^3.0.7', '^3.1.3'] }, Collection => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^3.0.7 is the same as >=3.0.7 <4.0.0 so that would already include the range of ^3.1.3.

wrapAllNames(['upsert', 'insert', 'replace'], name => {
shimmer.wrap(Collection.prototype, name, wrapWithName(name))
})

return Collection
})

addHook({ name: 'couchbase', file: 'lib/cluster.js', versions: ['>=3.0.0 <3.2.0'] }, Cluster => {
addHook({ name: 'couchbase', file: 'lib/cluster.js', versions: ['^3.0.7', '^3.1.3'] }, Cluster => {
shimmer.wrap(Cluster.prototype, 'query', wrapV3Query)
return Cluster
})
Expand Down
1 change: 1 addition & 0 deletions scripts/install_plugin_modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const externals = require('../packages/dd-trace/test/plugins/externals')

const requirePackageJsonPath = require.resolve('../packages/dd-trace/src/require-package-json')

// Can remove couchbase after removing support for couchbase <= 3.2.0
const excludeList = os.arch() === 'arm64' ? ['couchbase', 'grpc', 'oracledb'] : []
const workspaces = new Set()
const versionLists = {}
Expand Down