Skip to content

Commit

Permalink
Merge branch 'master' of github.com:DataDog/integrations-core into co…
Browse files Browse the repository at this point in the history
…llect-postgres-schemas
  • Loading branch information
edengorevoy committed Aug 16, 2023
2 parents 4af6358 + d39fd73 commit 842f1f6
Show file tree
Hide file tree
Showing 37 changed files with 126 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sudo apt install -y --no-install-recommends build-essential libkrb5-dev wget sof
# Install librdkafka from source since no binaries are available for the distribution we use on the CI:
git clone https://github.com/confluentinc/librdkafka
cd librdkafka
git checkout v2.1.1
git checkout v2.2.0
sudo ./configure --install-deps --prefix=/usr
make
sudo make install
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ jobs:
sudo apt-get update
sudo apt-get install -y --no-install-recommends libkrb5-dev
- name: Build documentation
- name: Validate documentation
run: ddev -v docs build --check

- name: Build documentation
run: ddev -v docs build

- uses: actions/upload-artifact@v2
with:
name: documentation
Expand Down
2 changes: 1 addition & 1 deletion LICENSE-3rdparty.csv
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ python-dateutil,PyPI,BSD-3-Clause,Copyright 2017- Paul Ganssle <[email protected]>
python3-gearman,PyPI,Apache-2.0,
pyvmomi,PyPI,Apache-2.0,"Copyright (c) 2005-2021 VMware, Inc. All Rights Reserved."
pywin32,PyPI,PSF,Copyright 2002-2003 by Blackdog Software Pty Ltd.
redis,PyPI,MIT,"Copyright (c) 2022, Redis, inc."
redis,PyPI,MIT,"Copyright (c) 2022-2023, Redis, inc."
redis,PyPI,MIT,Copyright (c) 2012 Andy McCurdy
requests,PyPI,Apache-2.0,Copyright 2019 Kenneth Reitz
requests-kerberos,PyPI,ISC,Copyright (c) 2012 Kenneth Reitz
Expand Down
4 changes: 4 additions & 0 deletions amazon_msk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

***Added***:

* Update dependencies for Agent 7.48 ([#15585](https://github.com/DataDog/integrations-core/pull/15585))

## 4.0.0 / 2023-08-10

***Changed***:
Expand Down
2 changes: 1 addition & 1 deletion amazon_msk/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ license = "BSD-3-Clause"
[project.optional-dependencies]
deps = [
"boto3==1.17.112; python_version < '3.0'",
"boto3==1.27.0; python_version > '3.0'",
"boto3==1.28.27; python_version > '3.0'",
]

[project.urls]
Expand Down
1 change: 1 addition & 0 deletions datadog_checks_base/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

***Added***:

* Dependency update for 7.48 ([#15585](https://github.com/DataDog/integrations-core/pull/15585))
* Improve documentation of APIs ([#15582](https://github.com/DataDog/integrations-core/pull/15582))

***Fixed***:
Expand Down
28 changes: 14 additions & 14 deletions datadog_checks_base/datadog_checks/base/data/agent_requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ beautifulsoup4==4.12.2; python_version > '3.0'
beautifulsoup4==4.9.3; python_version < '3.0'
binary==1.0.0
boto3==1.17.112; python_version < '3.0'
boto3==1.27.0; python_version > '3.0'
boto3==1.28.27; python_version > '3.0'
boto==2.49.0
botocore==1.20.112; python_version < '3.0'
botocore==1.30.0; python_version > '3.0'
botocore==1.31.27; python_version > '3.0'
cachetools==3.1.1; python_version < '3.0'
cachetools==5.3.1; python_version > '3.0'
clickhouse-cityhash==1.0.2.3; python_version < '3.0'
clickhouse-cityhash==1.0.2.4; python_version > '3.0'
clickhouse-driver==0.2.0; python_version < '3.0'
clickhouse-driver==0.2.3; python_version > '3.0'
cm-client==45.0.4
confluent-kafka==2.1.1; python_version > '3.0'
confluent-kafka==2.2.0; python_version > '3.0'
contextlib2==0.6.0.post1; python_version < '3.0'
cryptography==3.3.2; python_version < '3.0'
cryptography==41.0.3; python_version > '3.0'
Expand All @@ -35,34 +35,34 @@ jaydebeapi==1.2.3
jellyfish==1.0.0; python_version > '3.0'
jpype1==1.4.1; python_version > '3.0'
kubernetes==18.20.0; python_version < '3.0'
kubernetes==26.1.0; python_version > '3.0'
kubernetes==27.2.0; python_version > '3.0'
ldap3==2.9.1
lxml==4.9.2
lxml==4.9.3
lz4==2.2.1; python_version < '3.0'
lz4==3.1.3; python_version > '3.0'
mmh3==2.5.1; python_version < '3.0'
mmh3==4.0.0; python_version > '3.0'
mmh3==4.0.1; python_version > '3.0'
oauthlib==3.1.0; python_version < '3.0'
oauthlib==3.2.2; python_version > '3.0'
openstacksdk==1.0.1; python_version > '3.0'
oracledb==1.3.2; python_version >= '3.8'
orjson==3.9.1; python_version > '3.0'
orjson==3.9.4; python_version > '3.0'
packaging==23.1; python_version > '3.0'
paramiko==2.12.0; python_version < '3.0'
paramiko==3.2.0; python_version > '3.0'
paramiko==3.3.1; python_version > '3.0'
ply==3.11
prometheus-client==0.12.0; python_version < '3.0'
prometheus-client==0.17.0; python_version > '3.0'
prometheus-client==0.17.1; python_version > '3.0'
protobuf==3.17.3; python_version < '3.0'
protobuf==3.20.2; python_version > '3.0'
psutil==5.9.0
psycopg2-binary==2.8.6; sys_platform != 'darwin' or platform_machine != 'arm64'
psycopg[binary]==3.1.10; python_version > '3.0'
pyasn1==0.4.6
pycryptodomex==3.10.1
pydantic==2.0.2; python_version > '3.0'
pydantic==2.1.1; python_version > '3.0'
pyjwt==1.7.1; python_version < '3.0'
pyjwt==2.7.0; python_version > '3.0'
pyjwt==2.8.0; python_version > '3.0'
pymongo[srv]==4.3.3; python_version >= '3.9'
pymqi==1.12.10; sys_platform != 'darwin' or platform_machine != 'arm64'
pymysql==0.10.1
Expand All @@ -80,9 +80,9 @@ pyvmomi==7.0.3
pywin32==228; sys_platform == 'win32' and python_version < '3.0'
pywin32==306; sys_platform == 'win32' and python_version > '3.0'
pyyaml==5.4.1; python_version < '3.0'
pyyaml==6.0; python_version > '3.0'
pyyaml==6.0.1; python_version > '3.0'
redis==3.5.3; python_version < '3.0'
redis==4.6.0; python_version > '3.0'
redis==5.0.0; python_version > '3.0'
requests-kerberos==0.12.0; python_version < '3.0'
requests-kerberos==0.14.0; python_version > '3.0'
requests-ntlm==1.1.0; python_version < '3.0'
Expand All @@ -109,6 +109,6 @@ tuf==2.0.0; python_version > '3.0'
typing==3.10.0.0; python_version < '3.0'
uptime==3.0.1
vertica-python==1.2.0; python_version < '3.0'
vertica-python==1.3.2; python_version > '3.0'
vertica-python==1.3.4; python_version > '3.0'
win-inet-pton==1.1.0; sys_platform == 'win32' and python_version < '3.0'
wrapt==1.15.0
16 changes: 8 additions & 8 deletions datadog_checks_base/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ license = "BSD-3-Clause"
[project.optional-dependencies]
db = [
"mmh3==2.5.1; python_version < '3.0'",
"mmh3==4.0.0; python_version > '3.0'",
"mmh3==4.0.1; python_version > '3.0'",
]
deps = [
"binary==1.0.0",
Expand All @@ -52,15 +52,15 @@ deps = [
"ipaddress==1.0.23; python_version < '3.0'",
"jellyfish==1.0.0; python_version > '3.0'",
"prometheus-client==0.12.0; python_version < '3.0'",
"prometheus-client==0.17.0; python_version > '3.0'",
"prometheus-client==0.17.1; python_version > '3.0'",
"protobuf==3.17.3; python_version < '3.0'",
"protobuf==3.20.2; python_version > '3.0'",
"pydantic==2.0.2; python_version > '3.0'",
"pydantic==2.1.1; python_version > '3.0'",
"python-dateutil==2.8.2",
"pywin32==228; sys_platform == 'win32' and python_version < '3.0'",
"pywin32==306; sys_platform == 'win32' and python_version > '3.0'",
"pyyaml==5.4.1; python_version < '3.0'",
"pyyaml==6.0; python_version > '3.0'",
"pyyaml==6.0.1; python_version > '3.0'",
"requests-toolbelt==1.0.0",
"requests-unixsocket==0.3.0",
"requests==2.27.1; python_version < '3.0'",
Expand All @@ -74,11 +74,11 @@ deps = [
http = [
"aws-requests-auth==0.4.3",
"botocore==1.20.112; python_version < '3.0'",
"botocore==1.30.0; python_version > '3.0'",
"botocore==1.31.27; python_version > '3.0'",
"oauthlib==3.1.0; python_version < '3.0'",
"oauthlib==3.2.2; python_version > '3.0'",
"pyjwt==1.7.1; python_version < '3.0'",
"pyjwt==2.7.0; python_version > '3.0'",
"pyjwt==2.8.0; python_version > '3.0'",
"pysocks==1.7.1",
"requests-kerberos==0.12.0; python_version < '3.0'",
"requests-kerberos==0.14.0; python_version > '3.0'",
Expand All @@ -88,11 +88,11 @@ http = [
"win-inet-pton==1.1.0; sys_platform == 'win32' and python_version < '3.0'",
]
json = [
"orjson==3.9.1; python_version > '3.0'",
"orjson==3.9.4; python_version > '3.0'",
]
kube = [
"kubernetes==18.20.0; python_version < '3.0'",
"kubernetes==26.1.0; python_version > '3.0'",
"kubernetes==27.2.0; python_version > '3.0'",
]

[project.urls]
Expand Down
4 changes: 4 additions & 0 deletions datadog_checks_dev/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
* Remove files in datadog_checks_dev for `validate ci, http, and metadata` ([#15546](https://github.com/DataDog/integrations-core/pull/15546))
* Migrate documentation commands to ddev ([#15582](https://github.com/DataDog/integrations-core/pull/15582))

***Added***:

* Update dependencies for Agent 7.48 ([#15585](https://github.com/DataDog/integrations-core/pull/15585))

***Fixed***:

* Stop using the TOX_ENV_NAME variable ([#15528](https://github.com/DataDog/integrations-core/pull/15528))
Expand Down
8 changes: 4 additions & 4 deletions hatch.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[envs.docs]
dependencies = [
"mkdocs~=1.4.3",
"mkdocs-material~=9.0.0",
"mkdocs~=1.5.2",
"mkdocs-material~=9.2.0b3",
# Plugins
"mkdocs-minify-plugin~=0.6.4",
"mkdocs-git-revision-date-localized-plugin~=1.2.0",
"mkdocstrings-python~=1.2.1",
"mkdocstrings-python~=1.3.0",
"mkdocs-redirects~=1.2.1",
"mkdocs-glightbox~=0.3.4",
"mkdocs-pdf-export-plugin~=0.5.10",
Expand All @@ -22,7 +22,7 @@ dependencies = [
]
# API & CLI documentation
post-install-commands = [
"pip install -e ./datadog_checks_base[deps,http] -e ./datadog_checks_dev",
"pip install -e ./datadog_checks_base[deps,http] -e ./datadog_checks_dev[cli]",
"pip install -e ./ddev",
]
[envs.docs.env-vars]
Expand Down
4 changes: 4 additions & 0 deletions ibm_ace/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

***Added***:

* Add hostname as part of the subscription substring ([#15189](https://github.com/DataDog/integrations-core/pull/15189))

## 2.0.0 / 2023-08-10

***Changed***:
Expand Down
8 changes: 7 additions & 1 deletion ibm_ace/datadog_checks/ibm_ace/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,21 @@
from .flows import get_statistics
from .resources import get_resource

try:
import datadog_agent
except ImportError:
from datadog_checks.base.stubs import datadog_agent

# https://www.ibm.com/docs/en/app-connect/12.0?topic=performance-resource-statistics
# https://www.ibm.com/docs/en/app-connect/12.0?topic=data-message-flow-accounting-statistics-collection-options
SNAPSHOT_UPDATE_INTERVAL = 20


def get_unique_name(check_id, topic_string):
# https://www.ibm.com/docs/en/ibm-mq/9.2?topic=reference-crtmqmsub-create-mq-subscription#q084220___q084220SUBNAME
hostname = datadog_agent.get_hostname()
data = topic_string.encode('utf-8')
return f'datadog-{check_id}-{hashlib.sha256(data).hexdigest()}'
return f'datadog-{check_id}-{hostname}-{hashlib.sha256(data).hexdigest()}'


class Subscription(ABC):
Expand Down
4 changes: 4 additions & 0 deletions ibm_was/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

***Added***:

* Update dependencies for Agent 7.48 ([#15585](https://github.com/DataDog/integrations-core/pull/15585))

## 3.0.0 / 2023-08-10

***Changed***:
Expand Down
3 changes: 1 addition & 2 deletions ibm_was/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ dependencies = [
dynamic = [
"version",
]

license = "BSD-3-Clause"

[project.optional-dependencies]
deps = [
"lxml==4.9.2",
"lxml==4.9.3",
]

[project.urls]
Expand Down
4 changes: 4 additions & 0 deletions kafka_consumer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

***Added***:

* Update dependencies for Agent 7.48 ([#15585](https://github.com/DataDog/integrations-core/pull/15585))

## 4.0.0 / 2023-08-10

***Changed***:
Expand Down
2 changes: 1 addition & 1 deletion kafka_consumer/hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# If you bump the `confluent-kafka` version, also bump the `librdkafka` version in the `32_install_kerberos.sh` file
post-install-commands = [
"python -m pip uninstall -y confluent-kafka",
"python -m pip install --no-binary confluent-kafka confluent-kafka==2.1.1",
"python -m pip install --no-binary confluent-kafka confluent-kafka==2.2.0",
]

[envs.default.env-vars]
Expand Down
5 changes: 1 addition & 4 deletions kafka_consumer/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,11 @@ dependencies = [
dynamic = [
"version",
]

license = "BSD-3-Clause"

[project.optional-dependencies]
deps = [
# confluent-kafka is built in omnibus, so bumping it here will have no real effect
# if you bump this version, also bump the one in the `hatch.toml` file
"confluent-kafka==2.1.1; python_version > '3.0'",
"confluent-kafka==2.2.0; python_version > '3.0'",
]

[project.urls]
Expand Down
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ theme:
palette:
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: custom
toggle:
icon: material/weather-night
name: Switch to light mode
- media: "(prefers-color-scheme: light)"
scheme: default
primary: custom
toggle:
icon: material/weather-sunny
name: Switch to dark mode
Expand Down
12 changes: 12 additions & 0 deletions oracle/datadog_checks/oracle/oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,15 @@ def check(self, _):
def _connection(self):
if self._cached_connection is None:
if self.can_use_jdbc():
self.log.debug('Detected that JDBC can be used to connect, will attempt first')
try:
self._cached_connection = self._jdbc_connect()
except Exception as e:
self.log.error("The JDBC connection failed with the following error: %s", str(e))
self._connection_errors += 1
else:
if self._use_instant_client:
self.log.debug('Connecting to Oracle using Oracle Instant Client')
self.init_instant_client()
else:
self.log.debug('Connecting to Oracle using the native client')
Expand Down Expand Up @@ -233,16 +235,26 @@ def _jdbc_connect(self):
try:
with jdbc_lock:
if jpype.isJVMStarted() and not jpype.isThreadAttachedToJVM():
self.log.debug("JVM started but thread not attached to JVM.")
jpype.attachThreadToJVM()
jpype.java.lang.Thread.currentThread().setContextClassLoader(
jpype.java.lang.ClassLoader.getSystemClassLoader()
)
connection = jdb.connect(
self.ORACLE_DRIVER_CLASS, connect_string, jdbc_connect_properties, self._jdbc_driver
)
if jpype.isJVMStarted() and jpype.isThreadAttachedToJVM():
jpype.detachThreadFromJVM()
self.log.debug("Detaching thread from JVM after connection")

self.log.debug("Connected to Oracle DB using JDBC connector")

return connection
except Exception as e:
if jpype.isJVMStarted() and jpype.isThreadAttachedToJVM():
jpype.detachThreadFromJVM()
self.log.debug("Thread detached from JVM after JDBC connection failure")

self._connection_errors += 1
if "Class {} not found".format(self.ORACLE_DRIVER_CLASS) in str(e):
msg = """Cannot run the Oracle check until either the Oracle instant client or the JDBC Driver
Expand Down
1 change: 1 addition & 0 deletions postgres/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

* Add schema collection to Postgres integration ([#15484](https://github.com/DataDog/integrations-core/pull/15484))
* Add support for sending `database_instance` metadata ([#15559](https://github.com/DataDog/integrations-core/pull/15559))
* Update dependencies for Agent 7.48 ([#15585](https://github.com/DataDog/integrations-core/pull/15585))

## 14.1.0 / 2023-08-10

Expand Down
Loading

0 comments on commit 842f1f6

Please sign in to comment.