From 6517d7b4cde2eb7d8d1e6c8c967ec700870d3c48 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 26 Nov 2021 10:36:34 +0100 Subject: [PATCH 01/44] [Release] Bumped ibm_mq version to 3.16.2 --- ibm_mq/CHANGELOG.md | 3 +++ ibm_mq/datadog_checks/ibm_mq/__about__.py | 2 +- ibm_mq/manifest.json | 3 ++- requirements-agent-release.txt | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ibm_mq/CHANGELOG.md b/ibm_mq/CHANGELOG.md index fa3189e04ab61..7b65004b5756a 100644 --- a/ibm_mq/CHANGELOG.md +++ b/ibm_mq/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG - IBM MQ +## 3.16.2 / 2021-11-26 + + ## 3.16.1 / 2021-10-04 / Agent 7.32.0 * [Fixed] ibm mq queue pattern should have precedence over autodiscover. See [#10247](https://github.com/DataDog/integrations-core/pull/10247). diff --git a/ibm_mq/datadog_checks/ibm_mq/__about__.py b/ibm_mq/datadog_checks/ibm_mq/__about__.py index 6ce65de40d410..00c1c1f8b6f14 100644 --- a/ibm_mq/datadog_checks/ibm_mq/__about__.py +++ b/ibm_mq/datadog_checks/ibm_mq/__about__.py @@ -1,4 +1,4 @@ # (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) -__version__ = '3.16.1' +__version__ = '3.16.2' diff --git a/ibm_mq/manifest.json b/ibm_mq/manifest.json index bfbd40657c6cd..a27ea77379600 100644 --- a/ibm_mq/manifest.json +++ b/ibm_mq/manifest.json @@ -11,7 +11,8 @@ "support": "core", "supported_os": [ "linux", - "mac_os" + "mac_os", + "windows" ], "public_title": "Datadog-IBM MQ Integration", "categories": [ diff --git a/requirements-agent-release.txt b/requirements-agent-release.txt index a1a06026eab54..826ca15d93643 100644 --- a/requirements-agent-release.txt +++ b/requirements-agent-release.txt @@ -62,7 +62,7 @@ datadog-hudi==2.0.0 datadog-hyperv==1.4.0; sys_platform == 'win32' datadog-ibm-db2==1.9.0 datadog-ibm-i==1.1.0 -datadog-ibm-mq==3.16.1; sys_platform != 'win32' +datadog-ibm-mq==3.16.2 datadog-ibm-was==1.11.1 datadog-ignite==2.1.1 datadog-iis==2.13.0; sys_platform == 'win32' From 6806f24c3b6e0a0c5acda1892b70f8411587ff5b Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 26 Nov 2021 10:36:50 +0100 Subject: [PATCH 02/44] [Release] Update metadata --- .in-toto/tag.0244aaa8.link | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.in-toto/tag.0244aaa8.link b/.in-toto/tag.0244aaa8.link index d667e2f70781b..16952d71a7abb 100644 --- a/.in-toto/tag.0244aaa8.link +++ b/.in-toto/tag.0244aaa8.link @@ -1 +1 @@ -{"signatures":[{"keyid":"0244aaa8dd1efe4730a4f1ca392c882e0da0c6c8","other_headers":"04000108001d1621040244aaa8dd1efe4730a4f1ca392c882e0da0c6c80502614862b7","signature":"83e2685a5ad29ad27d21e16777ea8963a06384ebac8e5830d68fab8082aaa34662e3ba31f4d1ea84d50a481e91b5cbff7ecdae76d49e7c2313dbda29e975cf06222ad90ac8d35a5d004125ea4d069762a544032ff4310515448f69afba1fc98b9c25c2f7cfba6e68f9a8e68d2367361865313ec74ba40278d482b42f11494072cfcf32445cbb4f30a3abaaea4d086aa50a111849522ff086fb442b870f343ad070a7718a7d5487b733ffeac462cb947dad5a539ce27337b9322cb4f7b2c825a3e87e9568f1983814fde64dc559073c7217af70d765cfd0b1c465df02b97fb818761f5306f21beb92f6c2d0f768cc8c466b1b2553ce6d96f8fec7a9da89c954629e752aee3c73a90bbdce04ae2fbb6ddf04cca3039beed40d70aca021cee0bf2314c3358bc0b7cd49d64f4082f4acecd73bf9ffb753b9110fcca80aafa9ec509c62e8380878dd149875a37b602cbec159d9de4bfa039ec4c032427b158f12283e875cac111d195a19ad3d97b56aaedf45456edccd509c3749ce2ba9f92402cbf8f9b36b58375c3c5754b6ac2972e5efcdd579033b7cb93679fab021e4de76a89a88d889083766268207e6db9be64232b117f0c84490f5a6312f09227d41607cb4d6a3dda5a42445b8b05cbecad7738d6ee499561849af8b03ac884d3835b8086cd21dcebc002ace2a4bcf917481613fd3c39a6cb1e09eb30c440699e812258643"}],"signed":{"_type":"link","byproducts":{},"command":[],"environment":{},"materials":{},"name":"tag","products":{"datadog_checks_base/datadog_checks/__init__.py":{"sha256":"9a3c64b8b00c94da4b4f34618d803d3255808caf21b8afa9195c84b61da66b6a"},"datadog_checks_base/datadog_checks/base/__about__.py":{"sha256":"70c7f5b41d8b3f3312c7886d5f18851f06c96c292a1b8a7efb50fe74d57c51e5"},"datadog_checks_base/datadog_checks/base/__init__.py":{"sha256":"089426ba33c410760e7a3ad93c0298eebceee7468b3bd951ad35831dad5e3cf9"},"datadog_checks_base/datadog_checks/base/checks/__init__.py":{"sha256":"6b45aff8e774058500e39cf7ede54ebee81f95364c8a380648eb89aa7744dc35"},"datadog_checks_base/datadog_checks/base/checks/base.py":{"sha256":"2957940617e513c64dc737b4a967f7e27ce52a617c49327342a7c178eb1d38b6"},"datadog_checks_base/datadog_checks/base/checks/kube_leader/__init__.py":{"sha256":"ac4335c2a324c7c24bbc9a5834730ecba39d3e60b0438e8948e7c4dd00c0a726"},"datadog_checks_base/datadog_checks/base/checks/kube_leader/base_check.py":{"sha256":"d8b21153a6b67096f86f2338437bf54955498d05bc363549affc9428e7e32a35"},"datadog_checks_base/datadog_checks/base/checks/kube_leader/mixins.py":{"sha256":"81cc766e7da305894c9b98bfbbdcba3a3e2ae0b1943c2fa22db3ed744adc87dc"},"datadog_checks_base/datadog_checks/base/checks/kube_leader/record.py":{"sha256":"6aa334545b055aeda90343b976cfbabf959038cee58103321b0a26e90eaa09a5"},"datadog_checks_base/datadog_checks/base/checks/kubelet_base/__init__.py":{"sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"datadog_checks_base/datadog_checks/base/checks/kubelet_base/base.py":{"sha256":"97ec3af5e262a9f1a3dcc0664f01cca4df95241771c4bf53d09fa06b4a8fbc23"},"datadog_checks_base/datadog_checks/base/checks/libs/__init__.py":{"sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"datadog_checks_base/datadog_checks/base/checks/libs/prometheus.py":{"sha256":"bc26fc613d37025a1efca477ac60960ad0499d0b73180c0c5bc4045bc62f2630"},"datadog_checks_base/datadog_checks/base/checks/libs/thread_pool.py":{"sha256":"2e56a317ebf0f097c18971fbb7a1ecfadb61e90f0380e6aa166807f01a9d37da"},"datadog_checks_base/datadog_checks/base/checks/libs/timer.py":{"sha256":"8ac17c602136ed7a5e7a1bb39389782190afc505574dd6cd8a46c1db146780c4"},"datadog_checks_base/datadog_checks/base/checks/libs/vmware/__init__.py":{"sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"datadog_checks_base/datadog_checks/base/checks/libs/vmware/all_metrics.py":{"sha256":"4f89b8c40a8abc0f57b6abbea2227be3cd8a0a000e34a134b48800fc4a0842c6"},"datadog_checks_base/datadog_checks/base/checks/libs/vmware/basic_metrics.py":{"sha256":"f4ea471b2580d65819e57dc9c6e04753f99a2bd8c049de9ac150d09b4b729a56"},"datadog_checks_base/datadog_checks/base/checks/network.py":{"sha256":"5228cfd4e5410a908d28ccba6d590d6b31e0cba49d9bca82bc26063da5ae4c3a"},"datadog_checks_base/datadog_checks/base/checks/openmetrics/__init__.py":{"sha256":"3876cda6f0d3eb38d15b8d91cd85991f383e692f2a5d83984292aea2e9942771"},"datadog_checks_base/datadog_checks/base/checks/openmetrics/base_check.py":{"sha256":"c5030243a7d16348e2a82ff4ce245fc058f4b268546ada55da6cc5f131ee3314"},"datadog_checks_base/datadog_checks/base/checks/openmetrics/mixins.py":{"sha256":"4fc950ab21d9e8ca47c0cc78a62e626b3d29ba5bde42c25071cf6a354cca3afa"},"datadog_checks_base/datadog_checks/base/checks/openmetrics/v2/__init__.py":{"sha256":"3fcd4506124b03d306a73e0bee8ffb0bea6f13077803ff235855906758e0d048"},"datadog_checks_base/datadog_checks/base/checks/openmetrics/v2/base.py":{"sha256":"afffa0abff0c517282775705cae25261099e52896ffec13b13bb7e38e8efb4a2"},"datadog_checks_base/datadog_checks/base/checks/openmetrics/v2/labels.py":{"sha256":"d05d084a1d37c12daf56c8db9ecdc5ad80e7ea0bf18f45effb67e40361e1f43f"},"datadog_checks_base/datadog_checks/base/checks/openmetrics/v2/scraper.py":{"sha256":"6f85bb46c8f31842c502416f6d9bf14a6680c8b32ef3a60f2fb7d3dc8f468457"},"datadog_checks_base/datadog_checks/base/checks/openmetrics/v2/transform.py":{"sha256":"3dd0aef1f39f38a0aaacc1a5572db1dfa34c2611b3119f043d26ead35bea2b97"},"datadog_checks_base/datadog_checks/base/checks/openmetrics/v2/transformers/__init__.py":{"sha256":"84f667f162ef41faf32d2689c6d15b61802d2b576df084174942cbefdb2b663b"},"datadog_checks_base/datadog_checks/base/checks/openmetrics/v2/transformers/counter.py":{"sha256":"6355de8f90a6b82007ded471280ff1280c61b29f0bd3b27cfd025583b647990c"},"datadog_checks_base/datadog_checks/base/checks/openmetrics/v2/transformers/counter_gauge.py":{"sha256":"407af76aa1018fa9566c603985cd00d7245143fb5b962c8efb1d9d63d95a439a"},"datadog_checks_base/datadog_checks/base/checks/openmetrics/v2/transformers/gauge.py":{"sha256":"ff6a19d789bfe7f6fb94e47eb4cc49461b1e17aafa7fd0ec3bee0b6c023288f1"},"datadog_checks_base/datadog_checks/base/checks/openmetrics/v2/transformers/histogram.py":{"sha256":"5971520be5607e0d8d4587c63bef7aaca0d369f9e171a4538f127fb6bec9a00d"},"datadog_checks_base/datadog_checks/base/checks/openmetrics/v2/transformers/metadata.py":{"sha256":"069b093750fd272f78bb12deee4a472f5e042dd961530c939a5e51f3d3003aea"},"datadog_checks_base/datadog_checks/base/checks/openmetrics/v2/transformers/rate.py":{"sha256":"7beb75edc142b002a77d7810add521f79c3496c972de2b80d36322cc63ffa1c3"},"datadog_checks_base/datadog_checks/base/checks/openmetrics/v2/transformers/service_check.py":{"sha256":"e0244e3b8da63d241c593dfbe9b4c722fb0e68b0db2ce9883e197ce1c58501b5"},"datadog_checks_base/datadog_checks/base/checks/openmetrics/v2/transformers/summary.py":{"sha256":"2ec1714a0f6f1b5b0a331e462447991797144553385dcb8c48006864d58048f9"},"datadog_checks_base/datadog_checks/base/checks/openmetrics/v2/transformers/temporal_percent.py":{"sha256":"c02a8ea971a8550de5c99066fc04e7830a6f21d81c7ce905ff59461397e88625"},"datadog_checks_base/datadog_checks/base/checks/openmetrics/v2/transformers/time_elapsed.py":{"sha256":"c8fb3bd9478e82bd9e40e7610638c507a7add21327c034beaee516388f160db1"},"datadog_checks_base/datadog_checks/base/checks/openmetrics/v2/utils.py":{"sha256":"b6993786d240cff2b0091a85b360938da8c790b0acff64db19d069e75e2b58e4"},"datadog_checks_base/datadog_checks/base/checks/prometheus/__init__.py":{"sha256":"35c57ac8d1d9555c42ac0ac80ece6d4a459fae72f05398b195374d5c57284a30"},"datadog_checks_base/datadog_checks/base/checks/prometheus/base_check.py":{"sha256":"2d4b347b12235a4d520d0901a7191e534fa0888d68cb32e21936898ccd8b8f5d"},"datadog_checks_base/datadog_checks/base/checks/prometheus/mixins.py":{"sha256":"faa20a2c0d58dfae659c7ed7ad7492621213fb859939f364417475a0ab991908"},"datadog_checks_base/datadog_checks/base/checks/prometheus/prometheus_base.py":{"sha256":"9f35823bf488a24646a04ee8f01269a254cfa160bbfe471625f90b1c05de057e"},"datadog_checks_base/datadog_checks/base/checks/win/__init__.py":{"sha256":"9083ff7fefc6d7404110ec4ee3e1a7cb29730a8d6439ff5deb291388151a7a4a"},"datadog_checks_base/datadog_checks/base/checks/win/winpdh.py":{"sha256":"142f282601923e049811ccdc3de3b89b7e21cbaf48f08e487c34cfea1865e839"},"datadog_checks_base/datadog_checks/base/checks/win/winpdh_base.py":{"sha256":"851c1428aab7c14b81f35dff00f5bdc8aed06c0077987f0db686368fa1d9dfe0"},"datadog_checks_base/datadog_checks/base/checks/win/winpdh_stub.py":{"sha256":"3397f2064cc0b842afa19ac6f64b506a9c241ffecaf8a388605e55a52f372cc9"},"datadog_checks_base/datadog_checks/base/checks/win/wmi/__init__.py":{"sha256":"6f4f143f3ef047e807872bc2396f83a4fab9c96406d846e1a12248e43f144f37"},"datadog_checks_base/datadog_checks/base/checks/win/wmi/counter_type.py":{"sha256":"521c1dc1ea0b5c6e2baec6f4bcaa08531a1f3d51f59065a89c2ba42df9470a84"},"datadog_checks_base/datadog_checks/base/checks/win/wmi/sampler.py":{"sha256":"00087957937449759977958b30a575dbd164aa5602f347bf106e25052507f159"},"datadog_checks_base/datadog_checks/base/checks/win/wmi/types.py":{"sha256":"e04f1ed72a69d8ff9e3b180bb11adfb656aeaaf6a9582b956803e872a0abc158"},"datadog_checks_base/datadog_checks/base/config.py":{"sha256":"a9c000e17f6c5d065177041ef0382219ddbdf34541a7549003477af79b57fed5"},"datadog_checks_base/datadog_checks/base/constants.py":{"sha256":"711d7db40a95cac3056dd056a88199a0720a9359064f2a91b029fd15f1503a7c"},"datadog_checks_base/datadog_checks/base/data/agent_requirements.in":{"sha256":"bf3d9fe6e703a84adeae7b34449fdf1b838bc810820fd562f8b18140d2352c75"},"datadog_checks_base/datadog_checks/base/ddyaml.py":{"sha256":"6ede1da3958a76df688e7fbe155a31553dc5bfbaa3f61d8b0f3291bafbd26af6"},"datadog_checks_base/datadog_checks/base/errors.py":{"sha256":"5c2575e6739a65e65ca68fc7be8eeaf012c4ee0eff339c7ca6339aedf832ccd8"},"datadog_checks_base/datadog_checks/base/log.py":{"sha256":"ded8d63f7b5cc977e0928737476ca71ce1b8611b2fdad26d45be8af8f287703b"},"datadog_checks_base/datadog_checks/base/stubs/__init__.py":{"sha256":"c2958047dbfb0624db6e64ceea9569b21a9aff3f8f59a613af7df049364bcf77"},"datadog_checks_base/datadog_checks/base/stubs/_util.py":{"sha256":"6431ad41af05ddc1dff3e42f4951cc0780462370bd5600bbb067061af3b46a92"},"datadog_checks_base/datadog_checks/base/stubs/aggregator.py":{"sha256":"e96b53a2ab098ed77d79d416354e750e15715fbbd77a2b2bf6458062165b2979"},"datadog_checks_base/datadog_checks/base/stubs/common.py":{"sha256":"af79f38d4b18640e4670b8de7ec6f7736a7ba6197ec9954d9da8d290481f6a8a"},"datadog_checks_base/datadog_checks/base/stubs/datadog_agent.py":{"sha256":"bcfda041ebd2317e5f15e5617bb8305fe2a93c04e577a83584de615adcbe542c"},"datadog_checks_base/datadog_checks/base/stubs/log.py":{"sha256":"03e7969f3639813a535b8d59721f96e4255c97395d96684c4d6faf0cd15d4f5a"},"datadog_checks_base/datadog_checks/base/stubs/similar.py":{"sha256":"cd9d5bab9c0f690fbc70163f1d2fbad76b29151dd4277bf214069756c19c7013"},"datadog_checks_base/datadog_checks/base/stubs/tagging.py":{"sha256":"cf12dd3c2e04a87c46892fc71216da3ac2ffb399d922137c043931d810133aab"},"datadog_checks_base/datadog_checks/base/types.py":{"sha256":"6a76a3652d16d13b31507250c3e24738fd8d49eb82f418ac5d2cbd9804ad9714"},"datadog_checks_base/datadog_checks/base/utils/__init__.py":{"sha256":"b9a42d0a3f15d1e755495de788dfadddb7e033e4f7fb2005674194b86cfc9975"},"datadog_checks_base/datadog_checks/base/utils/agent/__init__.py":{"sha256":"a37696bf2dcf872903fe1ed84f7b3adbc3b45b66291e2b3436542c495d4f234e"},"datadog_checks_base/datadog_checks/base/utils/agent/common.py":{"sha256":"841b6ac5022dbf68034fd28b9a0c4ca61f0e3ba2e5f5c48aad3c1599f28bbe7b"},"datadog_checks_base/datadog_checks/base/utils/agent/debug.py":{"sha256":"cde05b34bb7763f5b1a5ff4e74092595d2f2d6098bd14e9b30398e1d20c63373"},"datadog_checks_base/datadog_checks/base/utils/agent/memory.py":{"sha256":"5656ded2fee4fe13c21d4fe15ddf66cc60aad22264a3cb14615f6def9736bcab"},"datadog_checks_base/datadog_checks/base/utils/agent/packages.py":{"sha256":"f54ecd9756a757eb979793c436b18989c5669ebd213227c4e7baa3c4b599b460"},"datadog_checks_base/datadog_checks/base/utils/agent/utils.py":{"sha256":"155fe8eab71c53907432b5f299afb8c80aa62a08649734de39fd6785872663ba"},"datadog_checks_base/datadog_checks/base/utils/aws.py":{"sha256":"c3114b5a5545b6fe7f11445db17cc384e45c4e93348c1940a2470c88f575c43f"},"datadog_checks_base/datadog_checks/base/utils/common.py":{"sha256":"b9823bbc94eeced93ba25a7ee6b35ab983fd422ed313eda9bfdef85947152a29"},"datadog_checks_base/datadog_checks/base/utils/constants.py":{"sha256":"4304decb8096074340c66dab703fb03d84641328257a4408ac0cc531a6c46b7f"},"datadog_checks_base/datadog_checks/base/utils/containers.py":{"sha256":"8227d931334393baecb8dcde9132740b832dcb5b26b07f847f6a9b8ebc60b24b"},"datadog_checks_base/datadog_checks/base/utils/date.py":{"sha256":"2499aa3fce0281570527472f02632ef04b4ceaff7ab48112b9c40d9bd78a7847"},"datadog_checks_base/datadog_checks/base/utils/db/__init__.py":{"sha256":"9b8ec761f6db2312197a5ae14e7b0941bf6bf3bebeebbe71aa4687f78a146789"},"datadog_checks_base/datadog_checks/base/utils/db/core.py":{"sha256":"f68700fe31bc786add4b7a8cdf600355c3f436200896f0520d8b0415c3b1a6a7"},"datadog_checks_base/datadog_checks/base/utils/db/query.py":{"sha256":"f13d9abb9e7dfea020e01ee211ffd186a60dcce04cf042451b1ba5eaf25621bb"},"datadog_checks_base/datadog_checks/base/utils/db/sql.py":{"sha256":"c5d8bba84cf1a556a9c310f304cd7ba65d88f45e1e40f5638171f44e734a7392"},"datadog_checks_base/datadog_checks/base/utils/db/statement_metrics.py":{"sha256":"4dbdd9396b7a87cbde92cedd39a524a590a02b0a7b1c53f48b33e6bba850df26"},"datadog_checks_base/datadog_checks/base/utils/db/transform.py":{"sha256":"fb2f0d4948515b9395371a08b2bdbb49eb58d5756a532c293f31237ea78f921f"},"datadog_checks_base/datadog_checks/base/utils/db/types.py":{"sha256":"cf040bb83b13f00be3101c2e10462d527546e4b7ce6ae8afcfa3cf6928364de5"},"datadog_checks_base/datadog_checks/base/utils/db/utils.py":{"sha256":"9eaeb726eee6e1a434f9e89ec2c4c81a5e3ad11c031d369e03e65e7a6bc2b7d6"},"datadog_checks_base/datadog_checks/base/utils/functions.py":{"sha256":"41834b1978663141f0a0ac3852cdea26a6fcef1a63a4e0ae8332e411f73b1a65"},"datadog_checks_base/datadog_checks/base/utils/headers.py":{"sha256":"b4b060cbc1448e0056b38169fd0b78ed1a456e6edf97075abae60e4a733eaf0f"},"datadog_checks_base/datadog_checks/base/utils/http.py":{"sha256":"800d9d244ee13b8019a5dc925aaf6a8d50e193000cfdc27b4173d69514499852"},"datadog_checks_base/datadog_checks/base/utils/limiter.py":{"sha256":"66b5b2ce97e8cd13bb9ae2d9e45c28651a4bade42eec0c67942f930a3296e1b5"},"datadog_checks_base/datadog_checks/base/utils/metadata/__init__.py":{"sha256":"6d36a6f7a190f43be4ea287c70aabc5b16b69640e48feed3b89de85875d432cb"},"datadog_checks_base/datadog_checks/base/utils/metadata/constants.py":{"sha256":"5c77cfc2f40c6f2344d8562607fed7c968862343761b17415dbb572f87839e27"},"datadog_checks_base/datadog_checks/base/utils/metadata/core.py":{"sha256":"f54330023488e3b21d7c2a83d5cdf9cbe3e578fd5c12b25af16a42527aa2d77a"},"datadog_checks_base/datadog_checks/base/utils/metadata/utils.py":{"sha256":"4c2876f1c9b1434dcc413b9e3af4274f5ad0b604c7dadf30fde8e90901dcaa9e"},"datadog_checks_base/datadog_checks/base/utils/metadata/version.py":{"sha256":"7257bc2c7c2a72ee364ea14a24625d16d1c098e7a2b423a2ce34cd43606cc534"},"datadog_checks_base/datadog_checks/base/utils/models/__init__.py":{"sha256":"b2e1a32eb8591a9d541a935aa5c56f20fa7ebbc3de68cf24df3a650198f2712a"},"datadog_checks_base/datadog_checks/base/utils/models/fields.py":{"sha256":"b3cc9e55f977b91bce1334c5ef0cff69e69b76b75f353ab8c06fa1300c3324d1"},"datadog_checks_base/datadog_checks/base/utils/models/types.py":{"sha256":"7a091279f90e7f24386c1c09392d0a5a50342e88431518c704cf2bffa3bb532d"},"datadog_checks_base/datadog_checks/base/utils/models/validation/__init__.py":{"sha256":"699557dfc5b5a642c793b9281e02b9267d8f3824f940a28f1b35bfc3d2e082da"},"datadog_checks_base/datadog_checks/base/utils/models/validation/core.py":{"sha256":"e4c4c762db3e0792daba69fe8b22f7c06b3bf03349599e2d6bb2b0bfd1b211ea"},"datadog_checks_base/datadog_checks/base/utils/models/validation/helpers.py":{"sha256":"1dc1ad939c6adc4720f876c589dc67ea6505ea664ee8ac8b9079c12810c0c78c"},"datadog_checks_base/datadog_checks/base/utils/models/validation/utils.py":{"sha256":"7837021425ed2f937d4a15c17fe83af1ea6041284cbe13c98ec5e5f8278c9cb6"},"datadog_checks_base/datadog_checks/base/utils/network.py":{"sha256":"ccdf3d908dd2ae5227a0f3c35593c8cdfb0d9e76a4cc2fd6dbec005427f665c0"},"datadog_checks_base/datadog_checks/base/utils/platform.py":{"sha256":"8c7385f586321c82014c4827e3c53939d6b69ab9f3631e0c72d948383c82ebc4"},"datadog_checks_base/datadog_checks/base/utils/prometheus/__init__.py":{"sha256":"f794783ecff74f6713b846470f28eaaa841ed20c0d1681bcd18186135e2c150f"},"datadog_checks_base/datadog_checks/base/utils/prometheus/functions.py":{"sha256":"7c4640fc2159de7bc78890b08a9d3143d1bc28999c8726ec9cb8faf6dc62677c"},"datadog_checks_base/datadog_checks/base/utils/prometheus/metrics_pb2.py":{"sha256":"0953cf7b28e8d5f1d4b97526ab2483ef6f985a12f091a1a3cc11de7deebf36c9"},"datadog_checks_base/datadog_checks/base/utils/secrets.py":{"sha256":"e2a7f643f1f05b5c93b9cf4d98ea9a573d54219fa5736b8ecf53324c0455e5d5"},"datadog_checks_base/datadog_checks/base/utils/serialization.py":{"sha256":"7ec78259573604c7c1ac299199cad1f34fa129f19a4f3f605c8a87624426b2da"},"datadog_checks_base/datadog_checks/base/utils/subprocess_output.py":{"sha256":"d0fdff8aa22fb2f7fed2f9a2e3194a2e8c121b15030b176cdc275c73601e25b6"},"datadog_checks_base/datadog_checks/base/utils/tagging.py":{"sha256":"e2531f71f4061028aa245c809ad34b644feca4f16b232f2d58db0dddb92074ed"},"datadog_checks_base/datadog_checks/base/utils/tailfile.py":{"sha256":"c7fa4ce6982655a5b87890704ba19764a3aa89fa66a9faf01ce537816b6162d3"},"datadog_checks_base/datadog_checks/base/utils/time.py":{"sha256":"9caeb78a0273d313748990aea3dd09a6ca47119cc52671bcca42428186a9a41c"},"datadog_checks_base/datadog_checks/base/utils/timeout.py":{"sha256":"78e059a1f14dfa13aee7125e30e17769cfe87dccbd118ebe92f981bcfe101058"},"datadog_checks_base/datadog_checks/base/utils/tls.py":{"sha256":"f45ace9879b9355c3303896c7199d32e47a192f2823107918b9adec0fd65503c"},"datadog_checks_base/datadog_checks/base/utils/tracing.py":{"sha256":"d62f74100ddb6b1c728ffa268ed673995e726475d82511757a4a4c28ed72d428"},"datadog_checks_base/datadog_checks/checks/__init__.py":{"sha256":"3d6258c4df6b62c13123f26fa5da3bc32772cc848f51385067097c0c2c70045e"},"datadog_checks_base/datadog_checks/checks/base.py":{"sha256":"dc38edab88478b210a5d35af8ddd7ad39abc8930b89f5c05dd1a998bef9e30d4"},"datadog_checks_base/datadog_checks/checks/libs/__init__.py":{"sha256":"2300c3103843a8f3d4d63e0fcaf78691dbb508cbfd91b7de2bdd0802f981c777"},"datadog_checks_base/datadog_checks/checks/libs/thread_pool.py":{"sha256":"b3993208a85fd94da0df48993d018b50f5159c487889c03cc143c33ac80900a4"},"datadog_checks_base/datadog_checks/checks/libs/timer.py":{"sha256":"ba969b008bd579182a0ffb0abea8ff9432c992feffe339c7916c37b4325b0df8"},"datadog_checks_base/datadog_checks/checks/libs/vmware/__init__.py":{"sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"datadog_checks_base/datadog_checks/checks/libs/vmware/all_metrics.py":{"sha256":"e7dc615b7bb72cb11ee8afcd298796ebdb9d9396ac8ba2b2203c3be1191a464c"},"datadog_checks_base/datadog_checks/checks/libs/vmware/basic_metrics.py":{"sha256":"5dfd9e9e057aebe88557e02c4455e7b60de077fa9914c2003d69b06ef078ed47"},"datadog_checks_base/datadog_checks/checks/libs/wmi/__init__.py":{"sha256":"2300c3103843a8f3d4d63e0fcaf78691dbb508cbfd91b7de2bdd0802f981c777"},"datadog_checks_base/datadog_checks/checks/libs/wmi/sampler.py":{"sha256":"7771b0b1c5ab5edaf270f718c342d2abf198353ae36cfefcea026af42701c4f4"},"datadog_checks_base/datadog_checks/checks/network.py":{"sha256":"17117f1a7d445eec8b179dc87d5c109167c23a1aa912049182f042e85c9108d6"},"datadog_checks_base/datadog_checks/checks/network_checks.py":{"sha256":"1c001087323bab765881d303f81c5812ff62ba52c7a725657af1c59ac47ebb9f"},"datadog_checks_base/datadog_checks/checks/openmetrics/__init__.py":{"sha256":"0b3e6240dfad0d0a5393d9d8003f48b79b57f32b4ddb1a7050d20d5594af449f"},"datadog_checks_base/datadog_checks/checks/openmetrics/base_check.py":{"sha256":"795244407f255082bcd95a1687ae9f3e3a6e4aaab77a3c7bd9b6e5381fdef872"},"datadog_checks_base/datadog_checks/checks/openmetrics/mixins.py":{"sha256":"c56f5fe86939910ae8dda58c4e5bb74dc079f991d706573a208aa774756c7e94"},"datadog_checks_base/datadog_checks/checks/prometheus/__init__.py":{"sha256":"be43b8c29604d29b672712ddc6c31f13a0d2894c78dd2a3ca2da3e61e478a498"},"datadog_checks_base/datadog_checks/checks/prometheus/base_check.py":{"sha256":"b4f57fb5d9466334d0b082c2383fd730d2380f5803134ec8db1e935fd7279657"},"datadog_checks_base/datadog_checks/checks/prometheus/mixins.py":{"sha256":"7145fffb69fdc4a627993b5f6f8b27e79a638b89390e505404804c033d00fd49"},"datadog_checks_base/datadog_checks/checks/prometheus/prometheus_base.py":{"sha256":"9e4c5922f766a9919184c938ce89d47beea6d4fa18ffb9abb7316b1e033614d9"},"datadog_checks_base/datadog_checks/checks/prometheus_check/__init__.py":{"sha256":"9b5434e894e03018e342ee726f635de62122bf0e1d8f59d3f0109f89a95d890d"},"datadog_checks_base/datadog_checks/checks/win/__init__.py":{"sha256":"0139c7047940115c6f817d0e377710e1f1bd19c1d6761bda90c5d5602ed19541"},"datadog_checks_base/datadog_checks/checks/win/winpdh.py":{"sha256":"0a5d63c0c8b3c9fabc73f0c2e92d371a583d83a3dd97a94d111c6dea268d94bf"},"datadog_checks_base/datadog_checks/checks/win/winpdh_base.py":{"sha256":"0bd3f73333dcf9caade3545426d71cedce4967cc9f3f73f758789c51bb5cbc4b"},"datadog_checks_base/datadog_checks/checks/win/winpdh_stub.py":{"sha256":"7b810576bacc8b2a8b163add8eb7cd90aed4c42812278305eebf4dc5bfcf78f4"},"datadog_checks_base/datadog_checks/checks/win/wmi/__init__.py":{"sha256":"1a3a629024f8a0997508afc0cd652f8ef3cb453890bd789bad7b276ae1bcb55f"},"datadog_checks_base/datadog_checks/checks/win/wmi/counter_type.py":{"sha256":"ace194760755f2e37593a7a7132f0264ad933499382001cc998eb515f0cc0610"},"datadog_checks_base/datadog_checks/checks/win/wmi/sampler.py":{"sha256":"dff3fd553aff952a075739ea60e1bcfb26c11e0df93ea39a3fb67639dcb8d416"},"datadog_checks_base/datadog_checks/checks/winwmi_check.py":{"sha256":"feb4ce64d553782535661c6d095c11ea1a45ad6795940483fcef9ed81fd3a242"},"datadog_checks_base/datadog_checks/config.py":{"sha256":"e8bf9637beaa27c165c1516c76b7145bea655466d1a83ca4868d1dffd8d7678f"},"datadog_checks_base/datadog_checks/errors.py":{"sha256":"32225623dd57d0e17d9559c4d0634bfa40dae26e1001b6d217059f376bd50b5a"},"datadog_checks_base/datadog_checks/log.py":{"sha256":"8c3c40328a1eac771f7b156cb8b2216d56147046762d3778262204ae111d32e7"},"datadog_checks_base/datadog_checks/py.typed":{"sha256":"95aebb28195b8d737effe0df18d71d39c8d8ba6569286fd3930fbc9f9767181e"},"datadog_checks_base/datadog_checks/stubs/__init__.py":{"sha256":"44d51fc02cb61c8c5f3cf856561a130b9ea537e979c0e399ce0f4322491bedb4"},"datadog_checks_base/datadog_checks/stubs/_util.py":{"sha256":"85ad5971661b4d1cdf7a6bc8ee2d73b902665250531f87392797abba1ac41992"},"datadog_checks_base/datadog_checks/stubs/aggregator.py":{"sha256":"67c13ca62d45b892ee276d14344e7d270588d90bd67c8a8917b2752cffd23e24"},"datadog_checks_base/datadog_checks/stubs/datadog_agent.py":{"sha256":"683dc289e79105ef6f47a3f83e4edbddeed65880b1cca5bbbe6065a4f161d7d0"},"datadog_checks_base/datadog_checks/utils/__init__.py":{"sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"datadog_checks_base/datadog_checks/utils/common.py":{"sha256":"0254495cbc4437ca79ee9095e99601c3ccf22a7acf222cdcc0edcdd0fbda738a"},"datadog_checks_base/datadog_checks/utils/containers.py":{"sha256":"efd9757e5cfaeb3ce413535f658864f8dcd84b7a40c6f762108a447af82b23b7"},"datadog_checks_base/datadog_checks/utils/headers.py":{"sha256":"49ee3fbbba5916447728088e5e0496406b4558e2059ccd7ce2011a304562abde"},"datadog_checks_base/datadog_checks/utils/limiter.py":{"sha256":"714e05982aae913b337acc96afbdd139f2d89cda529a486bdd322c3ccec78a74"},"datadog_checks_base/datadog_checks/utils/platform.py":{"sha256":"0ad1a1b91a9e393f8b8fd6c4754ffeffaecbd586cc77a5fad0267714e2421557"},"datadog_checks_base/datadog_checks/utils/prometheus/__init__.py":{"sha256":"6146957796d2404c1bb69b2b6a69826188c233b3771906d494f9b4b76a8d2c29"},"datadog_checks_base/datadog_checks/utils/prometheus/functions.py":{"sha256":"e9dd7561b2c10df79e07c6cfeb7004f314bf4f74fe15ac9c9f378808f93a8fe0"},"datadog_checks_base/datadog_checks/utils/prometheus/metrics_pb2.py":{"sha256":"2b1e9a7b1ac08f2ca198c354a93949e3060f10c53708a231c8fc634634cf0b1c"},"datadog_checks_base/datadog_checks/utils/proxy.py":{"sha256":"a72ff1f15b71b2b026d3890c32f5a3a14e41a71b82be28f3cbd244f8a2740d59"},"datadog_checks_base/datadog_checks/utils/subprocess_output.py":{"sha256":"597df0f0faea11360e8586402aadc093a2738901e025d07b0e626ec492d052f1"},"datadog_checks_base/datadog_checks/utils/tailfile.py":{"sha256":"9a0136818048bd4673dada3ede2cfd335556a3c40eaff07a1a84582e073aab76"},"datadog_checks_base/datadog_checks/utils/timeout.py":{"sha256":"491f65bc4bdeacc1f87c7a61e84f3bf0a502b4fa1d45a799291db922859c377f"},"datadog_checks_base/datadog_checks/utils/tracing.py":{"sha256":"07ce4352bacd50297c7e1d385b6ec78d81bda5d599f0ec63878d62171b037d5e"},"datadog_checks_base/requirements.in":{"sha256":"6d42923f6957daff0b2902070f26512502d40ca0d36f8a598f0eed454275e1a5"},"datadog_checks_base/setup.py":{"sha256":"05a8b51f1474e6d0bd22e4ec0a470c7c2d033ad139deceb610b251bd63a05cd5"}}}} \ No newline at end of file +{"signatures":[{"keyid":"0244aaa8dd1efe4730a4f1ca392c882e0da0c6c8","other_headers":"04000108001d1621040244aaa8dd1efe4730a4f1ca392c882e0da0c6c8050261a0aaac","signature":"3a876d8a50d4794eaff88aa1e2f33bd8b8a9ddf77fe7e66246bc22d56e9c46b98a151541e5c7ea09f6f5511c2f8d779386c36ddab4bcb77f2e06d8b31a1e1039459ec9a219060142272fc4ebb2824f6a799c4d8b5d5829fe77b8046d03bb5a379a1d4e9d33b3e7a8d3719ade016822dc91fd332d1396c207d095279cbdb9a4e5120fa61aa9d039a8677cd885f36456503aaf7ea9bf47df10d5536361fd3ddcba72d145d23cd4e22e7428cb3c3097fc37ed5aaef3660cbe04ca24f28b205666ed259c8829fe55e40b3f22408493efd426ec810397922252b7402f0a3eed20984a7d2c28430acf22955731a4278e654c5a8e481c4200ce16af3813143ebcfb4d5379f61d80d15e52d1d086c683e1f05b176a759c65e632a4afabc6362d01a6b4b181e9d45291aba7b29573827b018db5e4d61aeb2666296f2d3ec0a213fa4076a3346f124dbfa222557960f1fbb86d5b5ac5d2d2772332632f97fed697b13be184bdfe79e6b739c9bc77aafca75e8996c2b1d122f22b64f2231e44ebdae8f946ea00ac3a914dac57c0d069c207c1dcf482a81f0be52f5c800eb86480808c5436ca3757058d81f6645d800c6a1cbf3fcd04100f65a60471c855531ddc342cc6e5a07d49f044919aee7c02fee35571c010f0aa8cf154683a6354ceb3969184e9e78157255fad2bc550d5038b855ffce3dcd1fd331fff64d93b2b2c4be32cd696669b"}],"signed":{"_type":"link","byproducts":{},"command":[],"environment":{},"materials":{},"name":"tag","products":{"ibm_mq/datadog_checks/__init__.py":{"sha256":"9a3c64b8b00c94da4b4f34618d803d3255808caf21b8afa9195c84b61da66b6a"},"ibm_mq/datadog_checks/ibm_mq/__about__.py":{"sha256":"bf0d552f0e6cfc160b2b9afe871b66a2a9c90f4d9ee56931d1b436d8ccc76e40"},"ibm_mq/datadog_checks/ibm_mq/__init__.py":{"sha256":"021b228d39ade69b71805e2ac5de8d90f2e3ea9aa3532ffce8b2f0be2dd9a961"},"ibm_mq/datadog_checks/ibm_mq/collectors/__init__.py":{"sha256":"0313e5ebdb9a0a0e7127a7c089dc10e2421017366c711acc4ede27a67346ad77"},"ibm_mq/datadog_checks/ibm_mq/collectors/channel_metric_collector.py":{"sha256":"ef893bdd8c85cf7d412c59249f3b56fcbdd36e58ba2c5f0f3677a19f3dbcbaca"},"ibm_mq/datadog_checks/ibm_mq/collectors/metadata_collector.py":{"sha256":"47f27e7c68d353ff272c970f860f8c6b490738c612b1714fcdf8a6c22e86a79c"},"ibm_mq/datadog_checks/ibm_mq/collectors/queue_metric_collector.py":{"sha256":"5defae87fca361dcdb3dd5d96b6e20742913bb60566c65ea8757e21f4959dad1"},"ibm_mq/datadog_checks/ibm_mq/collectors/stats_collector.py":{"sha256":"96421fad926bb8f3ad235627aafaecc9586a18ef5ba7c9639de5298a9f293963"},"ibm_mq/datadog_checks/ibm_mq/config.py":{"sha256":"858985177cf4e4723acefa6cd4fe8eb95462352d5e2663d62eae77f1d106e65a"},"ibm_mq/datadog_checks/ibm_mq/config_models/__init__.py":{"sha256":"7a5c3cc09fab7c1e75de218a0c73f295ceb685fa95ab3f47c44eda82ca646a1e"},"ibm_mq/datadog_checks/ibm_mq/config_models/defaults.py":{"sha256":"4c970bbafd6b6be2e5fc16d3f666e947ae6796a0145d307b10879ac8d1ace048"},"ibm_mq/datadog_checks/ibm_mq/config_models/instance.py":{"sha256":"adb49482b7e03ab3672359f558682509ad05c8fb75d3af7546dfd9ccb6d92056"},"ibm_mq/datadog_checks/ibm_mq/config_models/shared.py":{"sha256":"65a852b77a60c267a4c4b61ee19ff822a4b33fcc8b8170d9aad25777fed10de7"},"ibm_mq/datadog_checks/ibm_mq/config_models/validators.py":{"sha256":"b2e1a32eb8591a9d541a935aa5c56f20fa7ebbc3de68cf24df3a650198f2712a"},"ibm_mq/datadog_checks/ibm_mq/connection.py":{"sha256":"de0369e3bbf338f650943c37a807bb2e0e3bd5e0b714646c7d8ca59885b599b7"},"ibm_mq/datadog_checks/ibm_mq/data/conf.yaml.example":{"sha256":"ccccda94bdbd85801912bc44b7690da1060032ce763fbc16883f1810ccc868a3"},"ibm_mq/datadog_checks/ibm_mq/errors.py":{"sha256":"b3fa52cba4c95852964035a177d82fdede89a1b6a0ec16c576769e9ae8f3586d"},"ibm_mq/datadog_checks/ibm_mq/ibm_mq.py":{"sha256":"edf488e913555facf9ef34f42fbd39f6a01cd6b70469656e302093c73842c256"},"ibm_mq/datadog_checks/ibm_mq/metrics.py":{"sha256":"40a43b0cf8b02fcf23a590e899220895ed47385e597b6b426d987acd456b243e"},"ibm_mq/datadog_checks/ibm_mq/stats/__init__.py":{"sha256":"7eecb71fc655e7c75ffcb4de6427d506f99a257e4af46770077c1d067664a707"},"ibm_mq/datadog_checks/ibm_mq/stats/base_stats.py":{"sha256":"8e4e15e00bd427e8aedad1ce80ffa4efa6d85773c457d1ade85baf13330e7ce4"},"ibm_mq/datadog_checks/ibm_mq/stats/channel_stats.py":{"sha256":"062bd93099568ec9297091d241883ac1431ad61e7ee585fe24e77f12461778a4"},"ibm_mq/datadog_checks/ibm_mq/stats/queue_stats.py":{"sha256":"0492462f52611480290c425ce25ab614eebf2cb1a586bc090095af37b3364f13"},"ibm_mq/datadog_checks/ibm_mq/utils.py":{"sha256":"fa2ec324e9c1843d656e5c56c8c72af5334b64c11f78087f7ac0fbc1a0160518"},"ibm_mq/requirements.in":{"sha256":"00587bc88beb8f92359aeda87a8dbbfe181310e31ed44a94e5fee52af07dbadb"},"ibm_mq/setup.py":{"sha256":"3abc9dc5655fd52b14c9284ca52253f078ce7d484be0eb812305a5e8ffc67f21"}}}} \ No newline at end of file From 3ed20a7f678ce9ffb251e0c562076a01e4981ecc Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 26 Nov 2021 10:41:22 +0100 Subject: [PATCH 03/44] Include dependency on windows --- .../datadog_checks/base/data/agent_requirements.in | 2 +- ibm_mq/requirements.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/datadog_checks_base/datadog_checks/base/data/agent_requirements.in b/datadog_checks_base/datadog_checks/base/data/agent_requirements.in index 2aec0b456ffc0..24e19225daff7 100644 --- a/datadog_checks_base/datadog_checks/base/data/agent_requirements.in +++ b/datadog_checks_base/datadog_checks/base/data/agent_requirements.in @@ -58,7 +58,7 @@ pyhdb==0.3.4 pyjwt==1.7.1; python_version < "3.0" pyjwt==2.0.1; python_version > "3.0" pymongo==3.11.4 -pymqi==1.12.0; sys_platform != "win32" +pymqi==1.12.0; pymysql==0.9.3 pyodbc==4.0.26 pyro4==4.73; sys_platform == "win32" diff --git a/ibm_mq/requirements.in b/ibm_mq/requirements.in index 710b2cfbcc99d..77ffd71c22355 100644 --- a/ibm_mq/requirements.in +++ b/ibm_mq/requirements.in @@ -1 +1 @@ -pymqi==1.12.0; sys_platform != 'win32' +pymqi==1.12.0; From 76102581f90648802774e2379c6249dcf6df4554 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 26 Nov 2021 10:42:09 +0100 Subject: [PATCH 04/44] [Release] Bumped ibm_mq version to 3.16.2-beta --- ibm_mq/CHANGELOG.md | 2 +- ibm_mq/datadog_checks/ibm_mq/__about__.py | 2 +- requirements-agent-release.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ibm_mq/CHANGELOG.md b/ibm_mq/CHANGELOG.md index 7b65004b5756a..b255fe3c2cb79 100644 --- a/ibm_mq/CHANGELOG.md +++ b/ibm_mq/CHANGELOG.md @@ -1,6 +1,6 @@ # CHANGELOG - IBM MQ -## 3.16.2 / 2021-11-26 +## 3.16.2-beta / 2021-11-26 ## 3.16.1 / 2021-10-04 / Agent 7.32.0 diff --git a/ibm_mq/datadog_checks/ibm_mq/__about__.py b/ibm_mq/datadog_checks/ibm_mq/__about__.py index 00c1c1f8b6f14..4a91302983e03 100644 --- a/ibm_mq/datadog_checks/ibm_mq/__about__.py +++ b/ibm_mq/datadog_checks/ibm_mq/__about__.py @@ -1,4 +1,4 @@ # (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) -__version__ = '3.16.2' +__version__ = '3.16.2-beta' diff --git a/requirements-agent-release.txt b/requirements-agent-release.txt index 826ca15d93643..ae375d17fdf17 100644 --- a/requirements-agent-release.txt +++ b/requirements-agent-release.txt @@ -62,7 +62,7 @@ datadog-hudi==2.0.0 datadog-hyperv==1.4.0; sys_platform == 'win32' datadog-ibm-db2==1.9.0 datadog-ibm-i==1.1.0 -datadog-ibm-mq==3.16.2 +datadog-ibm-mq==3.16.2-beta datadog-ibm-was==1.11.1 datadog-ignite==2.1.1 datadog-iis==2.13.0; sys_platform == 'win32' From 137b3a4b6754d69c047eccda6cc6795a16904062 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 26 Nov 2021 10:42:16 +0100 Subject: [PATCH 05/44] [Release] Update metadata --- .in-toto/tag.0244aaa8.link | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.in-toto/tag.0244aaa8.link b/.in-toto/tag.0244aaa8.link index 16952d71a7abb..6a43e0a4ca805 100644 --- a/.in-toto/tag.0244aaa8.link +++ b/.in-toto/tag.0244aaa8.link @@ -1 +1 @@ -{"signatures":[{"keyid":"0244aaa8dd1efe4730a4f1ca392c882e0da0c6c8","other_headers":"04000108001d1621040244aaa8dd1efe4730a4f1ca392c882e0da0c6c8050261a0aaac","signature":"3a876d8a50d4794eaff88aa1e2f33bd8b8a9ddf77fe7e66246bc22d56e9c46b98a151541e5c7ea09f6f5511c2f8d779386c36ddab4bcb77f2e06d8b31a1e1039459ec9a219060142272fc4ebb2824f6a799c4d8b5d5829fe77b8046d03bb5a379a1d4e9d33b3e7a8d3719ade016822dc91fd332d1396c207d095279cbdb9a4e5120fa61aa9d039a8677cd885f36456503aaf7ea9bf47df10d5536361fd3ddcba72d145d23cd4e22e7428cb3c3097fc37ed5aaef3660cbe04ca24f28b205666ed259c8829fe55e40b3f22408493efd426ec810397922252b7402f0a3eed20984a7d2c28430acf22955731a4278e654c5a8e481c4200ce16af3813143ebcfb4d5379f61d80d15e52d1d086c683e1f05b176a759c65e632a4afabc6362d01a6b4b181e9d45291aba7b29573827b018db5e4d61aeb2666296f2d3ec0a213fa4076a3346f124dbfa222557960f1fbb86d5b5ac5d2d2772332632f97fed697b13be184bdfe79e6b739c9bc77aafca75e8996c2b1d122f22b64f2231e44ebdae8f946ea00ac3a914dac57c0d069c207c1dcf482a81f0be52f5c800eb86480808c5436ca3757058d81f6645d800c6a1cbf3fcd04100f65a60471c855531ddc342cc6e5a07d49f044919aee7c02fee35571c010f0aa8cf154683a6354ceb3969184e9e78157255fad2bc550d5038b855ffce3dcd1fd331fff64d93b2b2c4be32cd696669b"}],"signed":{"_type":"link","byproducts":{},"command":[],"environment":{},"materials":{},"name":"tag","products":{"ibm_mq/datadog_checks/__init__.py":{"sha256":"9a3c64b8b00c94da4b4f34618d803d3255808caf21b8afa9195c84b61da66b6a"},"ibm_mq/datadog_checks/ibm_mq/__about__.py":{"sha256":"bf0d552f0e6cfc160b2b9afe871b66a2a9c90f4d9ee56931d1b436d8ccc76e40"},"ibm_mq/datadog_checks/ibm_mq/__init__.py":{"sha256":"021b228d39ade69b71805e2ac5de8d90f2e3ea9aa3532ffce8b2f0be2dd9a961"},"ibm_mq/datadog_checks/ibm_mq/collectors/__init__.py":{"sha256":"0313e5ebdb9a0a0e7127a7c089dc10e2421017366c711acc4ede27a67346ad77"},"ibm_mq/datadog_checks/ibm_mq/collectors/channel_metric_collector.py":{"sha256":"ef893bdd8c85cf7d412c59249f3b56fcbdd36e58ba2c5f0f3677a19f3dbcbaca"},"ibm_mq/datadog_checks/ibm_mq/collectors/metadata_collector.py":{"sha256":"47f27e7c68d353ff272c970f860f8c6b490738c612b1714fcdf8a6c22e86a79c"},"ibm_mq/datadog_checks/ibm_mq/collectors/queue_metric_collector.py":{"sha256":"5defae87fca361dcdb3dd5d96b6e20742913bb60566c65ea8757e21f4959dad1"},"ibm_mq/datadog_checks/ibm_mq/collectors/stats_collector.py":{"sha256":"96421fad926bb8f3ad235627aafaecc9586a18ef5ba7c9639de5298a9f293963"},"ibm_mq/datadog_checks/ibm_mq/config.py":{"sha256":"858985177cf4e4723acefa6cd4fe8eb95462352d5e2663d62eae77f1d106e65a"},"ibm_mq/datadog_checks/ibm_mq/config_models/__init__.py":{"sha256":"7a5c3cc09fab7c1e75de218a0c73f295ceb685fa95ab3f47c44eda82ca646a1e"},"ibm_mq/datadog_checks/ibm_mq/config_models/defaults.py":{"sha256":"4c970bbafd6b6be2e5fc16d3f666e947ae6796a0145d307b10879ac8d1ace048"},"ibm_mq/datadog_checks/ibm_mq/config_models/instance.py":{"sha256":"adb49482b7e03ab3672359f558682509ad05c8fb75d3af7546dfd9ccb6d92056"},"ibm_mq/datadog_checks/ibm_mq/config_models/shared.py":{"sha256":"65a852b77a60c267a4c4b61ee19ff822a4b33fcc8b8170d9aad25777fed10de7"},"ibm_mq/datadog_checks/ibm_mq/config_models/validators.py":{"sha256":"b2e1a32eb8591a9d541a935aa5c56f20fa7ebbc3de68cf24df3a650198f2712a"},"ibm_mq/datadog_checks/ibm_mq/connection.py":{"sha256":"de0369e3bbf338f650943c37a807bb2e0e3bd5e0b714646c7d8ca59885b599b7"},"ibm_mq/datadog_checks/ibm_mq/data/conf.yaml.example":{"sha256":"ccccda94bdbd85801912bc44b7690da1060032ce763fbc16883f1810ccc868a3"},"ibm_mq/datadog_checks/ibm_mq/errors.py":{"sha256":"b3fa52cba4c95852964035a177d82fdede89a1b6a0ec16c576769e9ae8f3586d"},"ibm_mq/datadog_checks/ibm_mq/ibm_mq.py":{"sha256":"edf488e913555facf9ef34f42fbd39f6a01cd6b70469656e302093c73842c256"},"ibm_mq/datadog_checks/ibm_mq/metrics.py":{"sha256":"40a43b0cf8b02fcf23a590e899220895ed47385e597b6b426d987acd456b243e"},"ibm_mq/datadog_checks/ibm_mq/stats/__init__.py":{"sha256":"7eecb71fc655e7c75ffcb4de6427d506f99a257e4af46770077c1d067664a707"},"ibm_mq/datadog_checks/ibm_mq/stats/base_stats.py":{"sha256":"8e4e15e00bd427e8aedad1ce80ffa4efa6d85773c457d1ade85baf13330e7ce4"},"ibm_mq/datadog_checks/ibm_mq/stats/channel_stats.py":{"sha256":"062bd93099568ec9297091d241883ac1431ad61e7ee585fe24e77f12461778a4"},"ibm_mq/datadog_checks/ibm_mq/stats/queue_stats.py":{"sha256":"0492462f52611480290c425ce25ab614eebf2cb1a586bc090095af37b3364f13"},"ibm_mq/datadog_checks/ibm_mq/utils.py":{"sha256":"fa2ec324e9c1843d656e5c56c8c72af5334b64c11f78087f7ac0fbc1a0160518"},"ibm_mq/requirements.in":{"sha256":"00587bc88beb8f92359aeda87a8dbbfe181310e31ed44a94e5fee52af07dbadb"},"ibm_mq/setup.py":{"sha256":"3abc9dc5655fd52b14c9284ca52253f078ce7d484be0eb812305a5e8ffc67f21"}}}} \ No newline at end of file +{"signatures":[{"keyid":"0244aaa8dd1efe4730a4f1ca392c882e0da0c6c8","other_headers":"04000108001d1621040244aaa8dd1efe4730a4f1ca392c882e0da0c6c8050261a0abf6","signature":"41ff54926e813fda9f73816008b3b8a488f9ebda34fe5ae1cebe5ba32062526290c0a39f0855521275810765b51322ffcea9b18c01c14d227b6013ff315a86dda4534228eb3775481fec288fce3b91e58e369aa3c48472b7c4dedcc585679ef68b90d7c18df4333a1d9e4db38dbd02eb690e033b2f01959b7578cae3dddad12b45910a05e258a8f0f6c1eae20e15d4343189a948e10e86429e746b05f270144c84ea52a2cef2352807cf7d8975caf73dae64961b1226cceace42ba584c8db9a829f8165858b5afb97b2b5c519c9c1bcc0a01c62ec3e6141d036e53d28484bc2a31b2721f609ee106a24084f410ba8d0b82e861d86e17b8ee1ce3c842555797d51d115e736fd0961bcdc83cd52a49133cba9ccbb71688f7c52ef90cf379275cc5a70df43f92a9b652ed94d802cf1ed2707d7a9588c97239bc765868441d99ceaf353f788146e9ea8905d4c41792cedcfc700519aeee4b36b7ae559d688f67a2801ccee938540509538a1eb58e363badff6a4f00e24615a551cf935dcebbae337119439ac84f08abe5ad48e38e2df0d681b907fdfe81aa5e65749a76ae9efb4e42180d9339b61f6f346810cbe7ad270fe5f37cceb156d9431e6209a8dad16fd7a769f5cab0ab706ad551e712e7e0a3be0a33fb0b8b05a4a195855c0053dfcf3a6989fb2815652e56dbfd493ff44b582c3227abb42faa8ffb979604813053a1efc5"}],"signed":{"_type":"link","byproducts":{},"command":[],"environment":{},"materials":{},"name":"tag","products":{"ibm_mq/datadog_checks/__init__.py":{"sha256":"9a3c64b8b00c94da4b4f34618d803d3255808caf21b8afa9195c84b61da66b6a"},"ibm_mq/datadog_checks/ibm_mq/__about__.py":{"sha256":"89c68f9a99b3917cc270910808280e31f2d7bdf8ec9535958515892c18992db7"},"ibm_mq/datadog_checks/ibm_mq/__init__.py":{"sha256":"021b228d39ade69b71805e2ac5de8d90f2e3ea9aa3532ffce8b2f0be2dd9a961"},"ibm_mq/datadog_checks/ibm_mq/collectors/__init__.py":{"sha256":"0313e5ebdb9a0a0e7127a7c089dc10e2421017366c711acc4ede27a67346ad77"},"ibm_mq/datadog_checks/ibm_mq/collectors/channel_metric_collector.py":{"sha256":"ef893bdd8c85cf7d412c59249f3b56fcbdd36e58ba2c5f0f3677a19f3dbcbaca"},"ibm_mq/datadog_checks/ibm_mq/collectors/metadata_collector.py":{"sha256":"47f27e7c68d353ff272c970f860f8c6b490738c612b1714fcdf8a6c22e86a79c"},"ibm_mq/datadog_checks/ibm_mq/collectors/queue_metric_collector.py":{"sha256":"5defae87fca361dcdb3dd5d96b6e20742913bb60566c65ea8757e21f4959dad1"},"ibm_mq/datadog_checks/ibm_mq/collectors/stats_collector.py":{"sha256":"96421fad926bb8f3ad235627aafaecc9586a18ef5ba7c9639de5298a9f293963"},"ibm_mq/datadog_checks/ibm_mq/config.py":{"sha256":"858985177cf4e4723acefa6cd4fe8eb95462352d5e2663d62eae77f1d106e65a"},"ibm_mq/datadog_checks/ibm_mq/config_models/__init__.py":{"sha256":"7a5c3cc09fab7c1e75de218a0c73f295ceb685fa95ab3f47c44eda82ca646a1e"},"ibm_mq/datadog_checks/ibm_mq/config_models/defaults.py":{"sha256":"4c970bbafd6b6be2e5fc16d3f666e947ae6796a0145d307b10879ac8d1ace048"},"ibm_mq/datadog_checks/ibm_mq/config_models/instance.py":{"sha256":"adb49482b7e03ab3672359f558682509ad05c8fb75d3af7546dfd9ccb6d92056"},"ibm_mq/datadog_checks/ibm_mq/config_models/shared.py":{"sha256":"65a852b77a60c267a4c4b61ee19ff822a4b33fcc8b8170d9aad25777fed10de7"},"ibm_mq/datadog_checks/ibm_mq/config_models/validators.py":{"sha256":"b2e1a32eb8591a9d541a935aa5c56f20fa7ebbc3de68cf24df3a650198f2712a"},"ibm_mq/datadog_checks/ibm_mq/connection.py":{"sha256":"de0369e3bbf338f650943c37a807bb2e0e3bd5e0b714646c7d8ca59885b599b7"},"ibm_mq/datadog_checks/ibm_mq/data/conf.yaml.example":{"sha256":"ccccda94bdbd85801912bc44b7690da1060032ce763fbc16883f1810ccc868a3"},"ibm_mq/datadog_checks/ibm_mq/errors.py":{"sha256":"b3fa52cba4c95852964035a177d82fdede89a1b6a0ec16c576769e9ae8f3586d"},"ibm_mq/datadog_checks/ibm_mq/ibm_mq.py":{"sha256":"edf488e913555facf9ef34f42fbd39f6a01cd6b70469656e302093c73842c256"},"ibm_mq/datadog_checks/ibm_mq/metrics.py":{"sha256":"40a43b0cf8b02fcf23a590e899220895ed47385e597b6b426d987acd456b243e"},"ibm_mq/datadog_checks/ibm_mq/stats/__init__.py":{"sha256":"7eecb71fc655e7c75ffcb4de6427d506f99a257e4af46770077c1d067664a707"},"ibm_mq/datadog_checks/ibm_mq/stats/base_stats.py":{"sha256":"8e4e15e00bd427e8aedad1ce80ffa4efa6d85773c457d1ade85baf13330e7ce4"},"ibm_mq/datadog_checks/ibm_mq/stats/channel_stats.py":{"sha256":"062bd93099568ec9297091d241883ac1431ad61e7ee585fe24e77f12461778a4"},"ibm_mq/datadog_checks/ibm_mq/stats/queue_stats.py":{"sha256":"0492462f52611480290c425ce25ab614eebf2cb1a586bc090095af37b3364f13"},"ibm_mq/datadog_checks/ibm_mq/utils.py":{"sha256":"fa2ec324e9c1843d656e5c56c8c72af5334b64c11f78087f7ac0fbc1a0160518"},"ibm_mq/requirements.in":{"sha256":"3810a9fbd98aacb2f57b05986186013e13dcfa724948d05ac1798db7cb415154"},"ibm_mq/setup.py":{"sha256":"3abc9dc5655fd52b14c9284ca52253f078ce7d484be0eb812305a5e8ffc67f21"}}}} \ No newline at end of file From 3aac77d5f3e27aac000c25460f9286e1a473e145 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 26 Nov 2021 11:22:13 +0100 Subject: [PATCH 06/44] [Release] Bumped ibm_mq version to 3.16.2-beta.2 --- .../datadog_checks/base/data/agent_requirements.in | 2 +- ibm_mq/CHANGELOG.md | 3 +++ ibm_mq/datadog_checks/ibm_mq/__about__.py | 2 +- ibm_mq/requirements.in | 2 +- requirements-agent-release.txt | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/datadog_checks_base/datadog_checks/base/data/agent_requirements.in b/datadog_checks_base/datadog_checks/base/data/agent_requirements.in index 24e19225daff7..d3f0a2ad7ddf9 100644 --- a/datadog_checks_base/datadog_checks/base/data/agent_requirements.in +++ b/datadog_checks_base/datadog_checks/base/data/agent_requirements.in @@ -58,7 +58,7 @@ pyhdb==0.3.4 pyjwt==1.7.1; python_version < "3.0" pyjwt==2.0.1; python_version > "3.0" pymongo==3.11.4 -pymqi==1.12.0; +pymqi==1.12.0 pymysql==0.9.3 pyodbc==4.0.26 pyro4==4.73; sys_platform == "win32" diff --git a/ibm_mq/CHANGELOG.md b/ibm_mq/CHANGELOG.md index b255fe3c2cb79..404ea01fbbd33 100644 --- a/ibm_mq/CHANGELOG.md +++ b/ibm_mq/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG - IBM MQ +## 3.16.2-beta.2 / 2021-11-26 + + ## 3.16.2-beta / 2021-11-26 diff --git a/ibm_mq/datadog_checks/ibm_mq/__about__.py b/ibm_mq/datadog_checks/ibm_mq/__about__.py index 4a91302983e03..76edcc8ed8cde 100644 --- a/ibm_mq/datadog_checks/ibm_mq/__about__.py +++ b/ibm_mq/datadog_checks/ibm_mq/__about__.py @@ -1,4 +1,4 @@ # (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) -__version__ = '3.16.2-beta' +__version__ = '3.16.2-beta.2' diff --git a/ibm_mq/requirements.in b/ibm_mq/requirements.in index 77ffd71c22355..cfb23ec3ee5ad 100644 --- a/ibm_mq/requirements.in +++ b/ibm_mq/requirements.in @@ -1 +1 @@ -pymqi==1.12.0; +pymqi==1.12.0 diff --git a/requirements-agent-release.txt b/requirements-agent-release.txt index ae375d17fdf17..0dd2baa8314f3 100644 --- a/requirements-agent-release.txt +++ b/requirements-agent-release.txt @@ -62,7 +62,7 @@ datadog-hudi==2.0.0 datadog-hyperv==1.4.0; sys_platform == 'win32' datadog-ibm-db2==1.9.0 datadog-ibm-i==1.1.0 -datadog-ibm-mq==3.16.2-beta +datadog-ibm-mq==3.16.2-beta.2 datadog-ibm-was==1.11.1 datadog-ignite==2.1.1 datadog-iis==2.13.0; sys_platform == 'win32' From 54a4cd4e37b9b9371c582d0337c462b7676511ad Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 26 Nov 2021 11:22:24 +0100 Subject: [PATCH 07/44] [Release] Update metadata --- .in-toto/tag.0244aaa8.link | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.in-toto/tag.0244aaa8.link b/.in-toto/tag.0244aaa8.link index 6a43e0a4ca805..65ece57853d06 100644 --- a/.in-toto/tag.0244aaa8.link +++ b/.in-toto/tag.0244aaa8.link @@ -1 +1 @@ -{"signatures":[{"keyid":"0244aaa8dd1efe4730a4f1ca392c882e0da0c6c8","other_headers":"04000108001d1621040244aaa8dd1efe4730a4f1ca392c882e0da0c6c8050261a0abf6","signature":"41ff54926e813fda9f73816008b3b8a488f9ebda34fe5ae1cebe5ba32062526290c0a39f0855521275810765b51322ffcea9b18c01c14d227b6013ff315a86dda4534228eb3775481fec288fce3b91e58e369aa3c48472b7c4dedcc585679ef68b90d7c18df4333a1d9e4db38dbd02eb690e033b2f01959b7578cae3dddad12b45910a05e258a8f0f6c1eae20e15d4343189a948e10e86429e746b05f270144c84ea52a2cef2352807cf7d8975caf73dae64961b1226cceace42ba584c8db9a829f8165858b5afb97b2b5c519c9c1bcc0a01c62ec3e6141d036e53d28484bc2a31b2721f609ee106a24084f410ba8d0b82e861d86e17b8ee1ce3c842555797d51d115e736fd0961bcdc83cd52a49133cba9ccbb71688f7c52ef90cf379275cc5a70df43f92a9b652ed94d802cf1ed2707d7a9588c97239bc765868441d99ceaf353f788146e9ea8905d4c41792cedcfc700519aeee4b36b7ae559d688f67a2801ccee938540509538a1eb58e363badff6a4f00e24615a551cf935dcebbae337119439ac84f08abe5ad48e38e2df0d681b907fdfe81aa5e65749a76ae9efb4e42180d9339b61f6f346810cbe7ad270fe5f37cceb156d9431e6209a8dad16fd7a769f5cab0ab706ad551e712e7e0a3be0a33fb0b8b05a4a195855c0053dfcf3a6989fb2815652e56dbfd493ff44b582c3227abb42faa8ffb979604813053a1efc5"}],"signed":{"_type":"link","byproducts":{},"command":[],"environment":{},"materials":{},"name":"tag","products":{"ibm_mq/datadog_checks/__init__.py":{"sha256":"9a3c64b8b00c94da4b4f34618d803d3255808caf21b8afa9195c84b61da66b6a"},"ibm_mq/datadog_checks/ibm_mq/__about__.py":{"sha256":"89c68f9a99b3917cc270910808280e31f2d7bdf8ec9535958515892c18992db7"},"ibm_mq/datadog_checks/ibm_mq/__init__.py":{"sha256":"021b228d39ade69b71805e2ac5de8d90f2e3ea9aa3532ffce8b2f0be2dd9a961"},"ibm_mq/datadog_checks/ibm_mq/collectors/__init__.py":{"sha256":"0313e5ebdb9a0a0e7127a7c089dc10e2421017366c711acc4ede27a67346ad77"},"ibm_mq/datadog_checks/ibm_mq/collectors/channel_metric_collector.py":{"sha256":"ef893bdd8c85cf7d412c59249f3b56fcbdd36e58ba2c5f0f3677a19f3dbcbaca"},"ibm_mq/datadog_checks/ibm_mq/collectors/metadata_collector.py":{"sha256":"47f27e7c68d353ff272c970f860f8c6b490738c612b1714fcdf8a6c22e86a79c"},"ibm_mq/datadog_checks/ibm_mq/collectors/queue_metric_collector.py":{"sha256":"5defae87fca361dcdb3dd5d96b6e20742913bb60566c65ea8757e21f4959dad1"},"ibm_mq/datadog_checks/ibm_mq/collectors/stats_collector.py":{"sha256":"96421fad926bb8f3ad235627aafaecc9586a18ef5ba7c9639de5298a9f293963"},"ibm_mq/datadog_checks/ibm_mq/config.py":{"sha256":"858985177cf4e4723acefa6cd4fe8eb95462352d5e2663d62eae77f1d106e65a"},"ibm_mq/datadog_checks/ibm_mq/config_models/__init__.py":{"sha256":"7a5c3cc09fab7c1e75de218a0c73f295ceb685fa95ab3f47c44eda82ca646a1e"},"ibm_mq/datadog_checks/ibm_mq/config_models/defaults.py":{"sha256":"4c970bbafd6b6be2e5fc16d3f666e947ae6796a0145d307b10879ac8d1ace048"},"ibm_mq/datadog_checks/ibm_mq/config_models/instance.py":{"sha256":"adb49482b7e03ab3672359f558682509ad05c8fb75d3af7546dfd9ccb6d92056"},"ibm_mq/datadog_checks/ibm_mq/config_models/shared.py":{"sha256":"65a852b77a60c267a4c4b61ee19ff822a4b33fcc8b8170d9aad25777fed10de7"},"ibm_mq/datadog_checks/ibm_mq/config_models/validators.py":{"sha256":"b2e1a32eb8591a9d541a935aa5c56f20fa7ebbc3de68cf24df3a650198f2712a"},"ibm_mq/datadog_checks/ibm_mq/connection.py":{"sha256":"de0369e3bbf338f650943c37a807bb2e0e3bd5e0b714646c7d8ca59885b599b7"},"ibm_mq/datadog_checks/ibm_mq/data/conf.yaml.example":{"sha256":"ccccda94bdbd85801912bc44b7690da1060032ce763fbc16883f1810ccc868a3"},"ibm_mq/datadog_checks/ibm_mq/errors.py":{"sha256":"b3fa52cba4c95852964035a177d82fdede89a1b6a0ec16c576769e9ae8f3586d"},"ibm_mq/datadog_checks/ibm_mq/ibm_mq.py":{"sha256":"edf488e913555facf9ef34f42fbd39f6a01cd6b70469656e302093c73842c256"},"ibm_mq/datadog_checks/ibm_mq/metrics.py":{"sha256":"40a43b0cf8b02fcf23a590e899220895ed47385e597b6b426d987acd456b243e"},"ibm_mq/datadog_checks/ibm_mq/stats/__init__.py":{"sha256":"7eecb71fc655e7c75ffcb4de6427d506f99a257e4af46770077c1d067664a707"},"ibm_mq/datadog_checks/ibm_mq/stats/base_stats.py":{"sha256":"8e4e15e00bd427e8aedad1ce80ffa4efa6d85773c457d1ade85baf13330e7ce4"},"ibm_mq/datadog_checks/ibm_mq/stats/channel_stats.py":{"sha256":"062bd93099568ec9297091d241883ac1431ad61e7ee585fe24e77f12461778a4"},"ibm_mq/datadog_checks/ibm_mq/stats/queue_stats.py":{"sha256":"0492462f52611480290c425ce25ab614eebf2cb1a586bc090095af37b3364f13"},"ibm_mq/datadog_checks/ibm_mq/utils.py":{"sha256":"fa2ec324e9c1843d656e5c56c8c72af5334b64c11f78087f7ac0fbc1a0160518"},"ibm_mq/requirements.in":{"sha256":"3810a9fbd98aacb2f57b05986186013e13dcfa724948d05ac1798db7cb415154"},"ibm_mq/setup.py":{"sha256":"3abc9dc5655fd52b14c9284ca52253f078ce7d484be0eb812305a5e8ffc67f21"}}}} \ No newline at end of file +{"signatures":[{"keyid":"0244aaa8dd1efe4730a4f1ca392c882e0da0c6c8","other_headers":"04000108001d1621040244aaa8dd1efe4730a4f1ca392c882e0da0c6c8050261a0b55e","signature":"4dd157f4d580b6083f4c02a44e88dce5d9b7c1e4263da7d83c162aa1e3cb4dedb7a72d77ec2acb20dc5b3fafdc9dbc2ae1bdc5067758bd17958c74a05bb37df73ce96d61d8ca42a4608626265098ec2fca46a73851c62f21ff82502a3b89a22aea82e31e11ec8279def9c9ad212e88744b6543c606cc78b939793b1bf2eaa3791112d1ebb36a54c743e2cd27f189eed044e8bd8d771752cb553a62c7a015b3e8de12c11d854155750969314e44405ea287bf0b42ac1e32d73332f1ac0c48706b45c086cb5dd4dbc2096db474d950868d393ae04c9c2aabaf604a328819f6a50fb15ccf8af40b4e0575ab9c8ce09db98e04872d07d18795318f6c147e62593e79fd6b8d2ca9c1c3822842a65d32a9a3079d76772e1ae5399ba6a3ccf15331c71e6cee5091c9145c168f757e4bde89f52b4a67df8ad6ddfac9b2c6b874ae9b5d52af891ade2421bb0114c3eef1f3d0c4e0079bdc636914d32b1e7fc374626f3a0d27860f9b1cd94f30a8aa76ab26e369ee5a69e1e8908edd3387dc2591ca52c834d87a875a80c6cc8426cbd6cddc498cdafd0ff05304f772fc4da58ebcf5d94421164da24d23b3ce35fb936873390247b0d7277313ce5c3b9d9352f884ada47fa7625eae5e777615effb7529467745681f46997242cc7251f398aef9dabbd2bbf149889600be17cf4f77323b5551561a50415eae380fa0a35d31ed87d06e2e6ddc"}],"signed":{"_type":"link","byproducts":{},"command":[],"environment":{},"materials":{},"name":"tag","products":{"ibm_mq/datadog_checks/__init__.py":{"sha256":"9a3c64b8b00c94da4b4f34618d803d3255808caf21b8afa9195c84b61da66b6a"},"ibm_mq/datadog_checks/ibm_mq/__about__.py":{"sha256":"a31112a3cb1910b90b249178f1592bb117d089ef741a3c0b2b7f105929a9c339"},"ibm_mq/datadog_checks/ibm_mq/__init__.py":{"sha256":"021b228d39ade69b71805e2ac5de8d90f2e3ea9aa3532ffce8b2f0be2dd9a961"},"ibm_mq/datadog_checks/ibm_mq/collectors/__init__.py":{"sha256":"0313e5ebdb9a0a0e7127a7c089dc10e2421017366c711acc4ede27a67346ad77"},"ibm_mq/datadog_checks/ibm_mq/collectors/channel_metric_collector.py":{"sha256":"ef893bdd8c85cf7d412c59249f3b56fcbdd36e58ba2c5f0f3677a19f3dbcbaca"},"ibm_mq/datadog_checks/ibm_mq/collectors/metadata_collector.py":{"sha256":"47f27e7c68d353ff272c970f860f8c6b490738c612b1714fcdf8a6c22e86a79c"},"ibm_mq/datadog_checks/ibm_mq/collectors/queue_metric_collector.py":{"sha256":"5defae87fca361dcdb3dd5d96b6e20742913bb60566c65ea8757e21f4959dad1"},"ibm_mq/datadog_checks/ibm_mq/collectors/stats_collector.py":{"sha256":"96421fad926bb8f3ad235627aafaecc9586a18ef5ba7c9639de5298a9f293963"},"ibm_mq/datadog_checks/ibm_mq/config.py":{"sha256":"858985177cf4e4723acefa6cd4fe8eb95462352d5e2663d62eae77f1d106e65a"},"ibm_mq/datadog_checks/ibm_mq/config_models/__init__.py":{"sha256":"7a5c3cc09fab7c1e75de218a0c73f295ceb685fa95ab3f47c44eda82ca646a1e"},"ibm_mq/datadog_checks/ibm_mq/config_models/defaults.py":{"sha256":"4c970bbafd6b6be2e5fc16d3f666e947ae6796a0145d307b10879ac8d1ace048"},"ibm_mq/datadog_checks/ibm_mq/config_models/instance.py":{"sha256":"adb49482b7e03ab3672359f558682509ad05c8fb75d3af7546dfd9ccb6d92056"},"ibm_mq/datadog_checks/ibm_mq/config_models/shared.py":{"sha256":"65a852b77a60c267a4c4b61ee19ff822a4b33fcc8b8170d9aad25777fed10de7"},"ibm_mq/datadog_checks/ibm_mq/config_models/validators.py":{"sha256":"b2e1a32eb8591a9d541a935aa5c56f20fa7ebbc3de68cf24df3a650198f2712a"},"ibm_mq/datadog_checks/ibm_mq/connection.py":{"sha256":"de0369e3bbf338f650943c37a807bb2e0e3bd5e0b714646c7d8ca59885b599b7"},"ibm_mq/datadog_checks/ibm_mq/data/conf.yaml.example":{"sha256":"ccccda94bdbd85801912bc44b7690da1060032ce763fbc16883f1810ccc868a3"},"ibm_mq/datadog_checks/ibm_mq/errors.py":{"sha256":"b3fa52cba4c95852964035a177d82fdede89a1b6a0ec16c576769e9ae8f3586d"},"ibm_mq/datadog_checks/ibm_mq/ibm_mq.py":{"sha256":"edf488e913555facf9ef34f42fbd39f6a01cd6b70469656e302093c73842c256"},"ibm_mq/datadog_checks/ibm_mq/metrics.py":{"sha256":"40a43b0cf8b02fcf23a590e899220895ed47385e597b6b426d987acd456b243e"},"ibm_mq/datadog_checks/ibm_mq/stats/__init__.py":{"sha256":"7eecb71fc655e7c75ffcb4de6427d506f99a257e4af46770077c1d067664a707"},"ibm_mq/datadog_checks/ibm_mq/stats/base_stats.py":{"sha256":"8e4e15e00bd427e8aedad1ce80ffa4efa6d85773c457d1ade85baf13330e7ce4"},"ibm_mq/datadog_checks/ibm_mq/stats/channel_stats.py":{"sha256":"062bd93099568ec9297091d241883ac1431ad61e7ee585fe24e77f12461778a4"},"ibm_mq/datadog_checks/ibm_mq/stats/queue_stats.py":{"sha256":"0492462f52611480290c425ce25ab614eebf2cb1a586bc090095af37b3364f13"},"ibm_mq/datadog_checks/ibm_mq/utils.py":{"sha256":"fa2ec324e9c1843d656e5c56c8c72af5334b64c11f78087f7ac0fbc1a0160518"},"ibm_mq/requirements.in":{"sha256":"ca0af70ba058546844b1a850d0a93479456394d1935f615dddb4cc516b787bda"},"ibm_mq/setup.py":{"sha256":"3abc9dc5655fd52b14c9284ca52253f078ce7d484be0eb812305a5e8ffc67f21"}}}} \ No newline at end of file From 6e2223efdb8c5d601f4c436d4eb96101908221a2 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Thu, 16 Dec 2021 14:55:34 +0100 Subject: [PATCH 08/44] Test in windows --- .azure-pipelines/templates/test-all-checks.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/test-all-checks.yml b/.azure-pipelines/templates/test-all-checks.yml index 8abf178911f78..c58c4d8af626c 100644 --- a/.azure-pipelines/templates/test-all-checks.yml +++ b/.azure-pipelines/templates/test-all-checks.yml @@ -226,8 +226,11 @@ jobs: displayName: IBM i os: linux - checkName: ibm_mq - displayName: IBM MQ + displayName: IBM MQ (Linux) os: linux + - checkName: ibm_mq + displayName: IBM MQ (Windows) + os: windows - checkName: ibm_was displayName: IBM WAS os: linux From 77c7f2c5d8c66e24ae2f654c8809b625b45879fd Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 17 Dec 2021 11:20:47 +0100 Subject: [PATCH 09/44] Add install instructions for windows --- ibm_mq/README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ibm_mq/README.md b/ibm_mq/README.md index fa68bc9cce24a..ab8ef0ceae410 100644 --- a/ibm_mq/README.md +++ b/ibm_mq/README.md @@ -10,10 +10,12 @@ This check monitors [IBM MQ][1] versions 8 to 9.0. The IBM MQ check is included in the [Datadog Agent][2] package. -To use the IBM MQ check, you need to: +To use the IBM MQ check, you need to make sure the [IBM MQ Client][3] 9.1+ is installed (unless a compatible version of IBM MQ server is installed on the Agent host). + +#### On Linux -1. Make sure the [IBM MQ Client][3] 9.1+ is installed (unless a compatible version of IBM MQ server is installed on the Agent host). -2. Update your `LD_LIBRARY_PATH` and `C_INCLUDE_PATH` to include the location of the libraries. (Create these two environment variables if they don’t exist yet.) For example: +Update your `LD_LIBRARY_PATH` and `C_INCLUDE_PATH` to include the location of the libraries. (Create these two environment variables if they don’t exist yet.) +For example, if you installed it in `/opt`: ```text export LD_LIBRARY_PATH=/opt/mqm/lib64:/opt/mqm/lib:$LD_LIBRARY_PATH @@ -129,7 +131,12 @@ Update the bindings: sudo ldconfig ``` -#### Permissions and authentication +#### On Windows + +There is a file called `mqclient.ini` in the IBM MQ data directory. It is normally `C:\ProgramData\IBM\MQ`. +Configure the environment variable `MQ_FILE_PATH`, to point at the data directory. + +### Permissions and authentication There are many ways to set up permissions in IBM MQ. Depending on how your setup works, create a `datadog` user within MQ with read only permissions. From e2fe1f08b8e7c2fa99c0e4dff40c3db4d9fdd9c8 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 17 Dec 2021 11:28:42 +0100 Subject: [PATCH 10/44] Add MQ_FILE_PATH env var to tests --- ibm_mq/tests/common.py | 6 +++++- ibm_mq/tox.ini | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ibm_mq/tests/common.py b/ibm_mq/tests/common.py index c26d244c318fb..2cb7946133350 100644 --- a/ibm_mq/tests/common.py +++ b/ibm_mq/tests/common.py @@ -140,7 +140,11 @@ E2E_METADATA = { 'docker_volumes': ['{}/agent_scripts/start_commands.sh:/tmp/start_commands.sh'.format(HERE)], 'start_commands': ['bash /tmp/start_commands.sh'], - 'env_vars': {'LD_LIBRARY_PATH': '/opt/mqm/lib64:/opt/mqm/lib', 'C_INCLUDE_PATH': '/opt/mqm/inc'}, + 'env_vars': { + 'LD_LIBRARY_PATH': '/opt/mqm/lib64:/opt/mqm/lib', + 'C_INCLUDE_PATH': '/opt/mqm/inc', + 'MQ_FILE_PATH': 'c:\\ibm_mq', + }, } QUEUE_METRICS = [ diff --git a/ibm_mq/tox.ini b/ibm_mq/tox.ini index 095ff94af7037..06fb0f857f442 100644 --- a/ibm_mq/tox.ini +++ b/ibm_mq/tox.ini @@ -34,6 +34,7 @@ commands = pytest -v {posargs} setenv = LD_LIBRARY_PATH=/opt/mqm/lib64:/opt/mqm/lib:{env:LD_LIBRARY_PATH:none} + MQ_FILE_PATH=c:\ibm_mq 8: IBM_MQ_VERSION = 8 8: IBM_MQ_COMPOSE_VERSION = 8 8: IBM_MQ_VERSION_RAW = 8.0.0.4 From 9e7cd42aff2c96d99e1aebd6a377b28bd6c044d5 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 17 Dec 2021 11:36:31 +0100 Subject: [PATCH 11/44] Add artificial change to make it test --- ibm_mq/datadog_checks/ibm_mq/ibm_mq.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ibm_mq/datadog_checks/ibm_mq/ibm_mq.py b/ibm_mq/datadog_checks/ibm_mq/ibm_mq.py index 134d1b5f4a243..8e21daf440778 100644 --- a/ibm_mq/datadog_checks/ibm_mq/ibm_mq.py +++ b/ibm_mq/datadog_checks/ibm_mq/ibm_mq.py @@ -25,7 +25,7 @@ class IbmMqCheck(AgentCheck): - SERVICE_CHECK = 'ibm_mq.can_connect' + SERVICE_CHECK = 'ibm_mq.can_connect' # TODO remove this comment def __init__(self, *args, **kwargs): # type: (*Any, **Any) -> None From 9cec72c6cb9abaf78854f0c1af882ceffa8842d3 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 17 Dec 2021 11:37:36 +0100 Subject: [PATCH 12/44] Add ibm mq to list of changes to check --- .azure-pipelines/changes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/changes.yml b/.azure-pipelines/changes.yml index cf1c7119e8580..87b3b7892129c 100644 --- a/.azure-pipelines/changes.yml +++ b/.azure-pipelines/changes.yml @@ -46,7 +46,7 @@ jobs: - template: './templates/test-single-windows.yml' parameters: job_name: Changed - check: '--changed datadog_checks_base datadog_checks_dev active_directory aspdotnet disk dns_check dotnetclr exchange_server iis network pdh_check sqlserver tcp_check win32_event_log windows_performance_counters windows_service wmi_check' + check: '--changed datadog_checks_base datadog_checks_dev active_directory aspdotnet disk dns_check dotnetclr exchange_server ibm_mq iis network pdh_check sqlserver tcp_check win32_event_log windows_performance_counters windows_service wmi_check' ${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}: ddtrace_flag: '--ddtrace' validate_changed: changed From c67ae1f8ff5f0d83969f3c51803df842239a477f Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 17 Dec 2021 12:19:39 +0100 Subject: [PATCH 13/44] Add python-dev dependency --- .../datadog_checks/base/data/agent_requirements.in | 1 + ibm_mq/requirements.in | 1 + 2 files changed, 2 insertions(+) diff --git a/datadog_checks_base/datadog_checks/base/data/agent_requirements.in b/datadog_checks_base/datadog_checks/base/data/agent_requirements.in index 100c886dc2624..05e7ac39fbfca 100644 --- a/datadog_checks_base/datadog_checks/base/data/agent_requirements.in +++ b/datadog_checks_base/datadog_checks/base/data/agent_requirements.in @@ -59,6 +59,7 @@ pyhdb==0.3.4 pyjwt==1.7.1; python_version < "3.0" pyjwt==2.0.1; python_version > "3.0" pymongo==3.11.4 +python-dev; sys_platform == 'win32' pymqi==1.12.0 pymysql==0.9.3 pyodbc==4.0.26 diff --git a/ibm_mq/requirements.in b/ibm_mq/requirements.in index cfb23ec3ee5ad..a58b2735adffd 100644 --- a/ibm_mq/requirements.in +++ b/ibm_mq/requirements.in @@ -1 +1,2 @@ +python-dev; sys_platform == 'win32' pymqi==1.12.0 From 0f7750f7d0ec075c7764abc72e5eb344bce91388 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 17 Dec 2021 12:23:07 +0100 Subject: [PATCH 14/44] Add python-dev in requirements-dev --- ibm_mq/requirements-dev.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/ibm_mq/requirements-dev.txt b/ibm_mq/requirements-dev.txt index 98b5456bbd0e2..ee9cce55adbc8 100644 --- a/ibm_mq/requirements-dev.txt +++ b/ibm_mq/requirements-dev.txt @@ -1 +1,2 @@ -e ../datadog_checks_dev +python-dev; sys_platform == 'win32' From 57c2e73845a321a5defa73b7e9dc988ec2af725e Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 17 Dec 2021 12:24:50 +0100 Subject: [PATCH 15/44] Pin python-dev dependency --- .../datadog_checks/base/data/agent_requirements.in | 2 +- ibm_mq/requirements-dev.txt | 2 +- ibm_mq/requirements.in | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/datadog_checks_base/datadog_checks/base/data/agent_requirements.in b/datadog_checks_base/datadog_checks/base/data/agent_requirements.in index 05e7ac39fbfca..eae78ff10809d 100644 --- a/datadog_checks_base/datadog_checks/base/data/agent_requirements.in +++ b/datadog_checks_base/datadog_checks/base/data/agent_requirements.in @@ -59,7 +59,7 @@ pyhdb==0.3.4 pyjwt==1.7.1; python_version < "3.0" pyjwt==2.0.1; python_version > "3.0" pymongo==3.11.4 -python-dev; sys_platform == 'win32' +python-dev==2020.9.10; sys_platform == 'win32' pymqi==1.12.0 pymysql==0.9.3 pyodbc==4.0.26 diff --git a/ibm_mq/requirements-dev.txt b/ibm_mq/requirements-dev.txt index ee9cce55adbc8..ad67d7d0b1e98 100644 --- a/ibm_mq/requirements-dev.txt +++ b/ibm_mq/requirements-dev.txt @@ -1,2 +1,2 @@ -e ../datadog_checks_dev -python-dev; sys_platform == 'win32' +python-dev==2020.9.10; sys_platform == 'win32' diff --git a/ibm_mq/requirements.in b/ibm_mq/requirements.in index a58b2735adffd..b7273d7723210 100644 --- a/ibm_mq/requirements.in +++ b/ibm_mq/requirements.in @@ -1,2 +1,2 @@ -python-dev; sys_platform == 'win32' +python-dev==2020.9.10; sys_platform == 'win32' pymqi==1.12.0 From b97c7fdb7ec8fb03824da3761ddd7e2241632d74 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 17 Dec 2021 12:35:12 +0100 Subject: [PATCH 16/44] fix package name --- .../datadog_checks/base/data/agent_requirements.in | 2 +- ibm_mq/requirements-dev.txt | 2 +- ibm_mq/requirements.in | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/datadog_checks_base/datadog_checks/base/data/agent_requirements.in b/datadog_checks_base/datadog_checks/base/data/agent_requirements.in index eae78ff10809d..e6b62a4a5acbc 100644 --- a/datadog_checks_base/datadog_checks/base/data/agent_requirements.in +++ b/datadog_checks_base/datadog_checks/base/data/agent_requirements.in @@ -59,7 +59,7 @@ pyhdb==0.3.4 pyjwt==1.7.1; python_version < "3.0" pyjwt==2.0.1; python_version > "3.0" pymongo==3.11.4 -python-dev==2020.9.10; sys_platform == 'win32' +python-dev-tools==2020.9.10; sys_platform == 'win32' pymqi==1.12.0 pymysql==0.9.3 pyodbc==4.0.26 diff --git a/ibm_mq/requirements-dev.txt b/ibm_mq/requirements-dev.txt index ad67d7d0b1e98..68595c397b5ef 100644 --- a/ibm_mq/requirements-dev.txt +++ b/ibm_mq/requirements-dev.txt @@ -1,2 +1,2 @@ -e ../datadog_checks_dev -python-dev==2020.9.10; sys_platform == 'win32' +python-dev-tools==2020.9.10; sys_platform == 'win32' diff --git a/ibm_mq/requirements.in b/ibm_mq/requirements.in index b7273d7723210..2bfb4f75b919e 100644 --- a/ibm_mq/requirements.in +++ b/ibm_mq/requirements.in @@ -1,2 +1,2 @@ -python-dev==2020.9.10; sys_platform == 'win32' +python-dev-tools==2020.9.10; sys_platform == 'win32' pymqi==1.12.0 From 7615d5f70be2e82b29686ac94964176126f17895 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 17 Dec 2021 12:52:29 +0100 Subject: [PATCH 17/44] Do not run unit & integration tests on windows --- ibm_mq/tests/test_ibm_mq_int.py | 4 ++-- ibm_mq/tests/test_ibm_mq_unit.py | 3 ++- ibm_mq/tests/test_metadata.py | 3 +++ ibm_mq/tests/test_queue_metric_collector.py | 3 ++- ibm_mq/tests/test_utils.py | 4 +++- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ibm_mq/tests/test_ibm_mq_int.py b/ibm_mq/tests/test_ibm_mq_int.py index f433708483063..0e9cca7766c54 100644 --- a/ibm_mq/tests/test_ibm_mq_int.py +++ b/ibm_mq/tests/test_ibm_mq_int.py @@ -11,12 +11,12 @@ from datadog_checks.base import AgentCheck from datadog_checks.base.utils.time import ensure_aware_datetime -from datadog_checks.dev.utils import get_metadata_metrics +from datadog_checks.dev.utils import ON_WINDOWS, get_metadata_metrics from . import common from .common import QUEUE_METRICS, assert_all_metrics -pytestmark = [pytest.mark.usefixtures("dd_environment"), pytest.mark.integration] +pytestmark = [pytest.mark.usefixtures("dd_environment"), pytest.mark.integration, pytest.mark.skipif(ON_WINDOWS)] def test_no_msg_errors_are_caught(get_check, instance, caplog): diff --git a/ibm_mq/tests/test_ibm_mq_unit.py b/ibm_mq/tests/test_ibm_mq_unit.py index 63f543eeaa374..899b2cc00910b 100644 --- a/ibm_mq/tests/test_ibm_mq_unit.py +++ b/ibm_mq/tests/test_ibm_mq_unit.py @@ -6,8 +6,9 @@ from six import iteritems from datadog_checks.base import AgentCheck, ConfigurationError +from datadog_checks.dev.utils import ON_WINDOWS -pytestmark = pytest.mark.unit +pytestmark = [pytest.mark.unit, pytest.mark.skipif(ON_WINDOWS)] def test_channel_status_service_check_default_mapping(aggregator, get_check, instance): diff --git a/ibm_mq/tests/test_metadata.py b/ibm_mq/tests/test_metadata.py index 15c0b63dbc442..8f4e29f15e735 100644 --- a/ibm_mq/tests/test_metadata.py +++ b/ibm_mq/tests/test_metadata.py @@ -3,10 +3,13 @@ # Licensed under a 3-clause BSD style license (see LICENSE) import pytest +from datadog_checks.dev.utils import ON_WINDOWS + from .common import MQ_VERSION_RAW @pytest.mark.integration +@pytest.mark.skipif(ON_WINDOWS) def test_metadata(get_check, instance, datadog_agent): check = get_check(instance) check.check_id = 'test:123' diff --git a/ibm_mq/tests/test_queue_metric_collector.py b/ibm_mq/tests/test_queue_metric_collector.py index 51a4acda384f2..67dd6e5317f65 100644 --- a/ibm_mq/tests/test_queue_metric_collector.py +++ b/ibm_mq/tests/test_queue_metric_collector.py @@ -1,10 +1,11 @@ import pytest from mock import Mock +from datadog_checks.dev.utils import ON_WINDOWS from datadog_checks.ibm_mq.collectors import QueueMetricCollector from datadog_checks.ibm_mq.config import IBMMQConfig -pytestmark = pytest.mark.unit +pytestmark = [pytest.mark.unit, pytest.mark.skipif(ON_WINDOWS)] def test_pattern_preceedes_autodiscovery(instance): diff --git a/ibm_mq/tests/test_utils.py b/ibm_mq/tests/test_utils.py index 05135b757a424..20cce8040bce5 100644 --- a/ibm_mq/tests/test_utils.py +++ b/ibm_mq/tests/test_utils.py @@ -4,7 +4,9 @@ import pytest -pytestmark = pytest.mark.unit +from datadog_checks.dev.utils import ON_WINDOWS + +pytestmark = [pytest.mark.unit, pytest.mark.skipif(ON_WINDOWS)] @pytest.mark.parametrize( From 93aedd7b40000fac4d67676987dea94f0575bb7f Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 17 Dec 2021 12:56:45 +0100 Subject: [PATCH 18/44] Remove python-dev dependency --- .../datadog_checks/base/data/agent_requirements.in | 1 - ibm_mq/requirements-dev.txt | 1 - ibm_mq/requirements.in | 1 - 3 files changed, 3 deletions(-) diff --git a/datadog_checks_base/datadog_checks/base/data/agent_requirements.in b/datadog_checks_base/datadog_checks/base/data/agent_requirements.in index e6b62a4a5acbc..100c886dc2624 100644 --- a/datadog_checks_base/datadog_checks/base/data/agent_requirements.in +++ b/datadog_checks_base/datadog_checks/base/data/agent_requirements.in @@ -59,7 +59,6 @@ pyhdb==0.3.4 pyjwt==1.7.1; python_version < "3.0" pyjwt==2.0.1; python_version > "3.0" pymongo==3.11.4 -python-dev-tools==2020.9.10; sys_platform == 'win32' pymqi==1.12.0 pymysql==0.9.3 pyodbc==4.0.26 diff --git a/ibm_mq/requirements-dev.txt b/ibm_mq/requirements-dev.txt index 68595c397b5ef..98b5456bbd0e2 100644 --- a/ibm_mq/requirements-dev.txt +++ b/ibm_mq/requirements-dev.txt @@ -1,2 +1 @@ -e ../datadog_checks_dev -python-dev-tools==2020.9.10; sys_platform == 'win32' diff --git a/ibm_mq/requirements.in b/ibm_mq/requirements.in index 2bfb4f75b919e..cfb23ec3ee5ad 100644 --- a/ibm_mq/requirements.in +++ b/ibm_mq/requirements.in @@ -1,2 +1 @@ -python-dev-tools==2020.9.10; sys_platform == 'win32' pymqi==1.12.0 From 4f29b1ba1c4768b176d4f5d2f46041f72fe798be Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 17 Dec 2021 13:03:24 +0100 Subject: [PATCH 19/44] Run e2e even if integration fails --- .azure-pipelines/templates/run-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/templates/run-tests.yml b/.azure-pipelines/templates/run-tests.yml index 1f774b020534b..c00cf443832c9 100644 --- a/.azure-pipelines/templates/run-tests.yml +++ b/.azure-pipelines/templates/run-tests.yml @@ -16,6 +16,7 @@ steps: displayName: 'Run Unit/Integration tests' env: CODECOV_TOKEN: $(CODECOV_TOKEN) + continueOnError: true - ${{ if and(eq(parameters.test, 'true'), not(eq(parameters.coverage, 'true'))) }}: - script: ddev test --junit ${{ parameters.ddtrace_flag }} ${{ parameters.check }} From 5f041d84bc3ef0ec52dcfca7b6e9425cc4f99367 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 17 Dec 2021 13:19:42 +0100 Subject: [PATCH 20/44] Add install script --- .../ibm_mq/windows/55_install_client.bat | 7 ++++ .../scripts/ibm_mq/windows/install_ibm_mq.ps1 | 41 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100755 .azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat create mode 100644 .azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.ps1 diff --git a/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat b/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat new file mode 100755 index 0000000000000..1a8a6d76e8aa6 --- /dev/null +++ b/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat @@ -0,0 +1,7 @@ +#:: https://docs.microsoft.com/en-us/sql/connect/odbc/windows/system-requirements-installation-and-driver-files +#:: Finding the actual URL not gated by a form was a nightmare +# This script installs IBM MQ development version on the CI machines to be able to +# * Compile pymqi image +# * Run integration tests on the machine + +RUN Powershell -C .\install_ibm_mq.ps1 "9.2.2.0" diff --git a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.ps1 b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.ps1 new file mode 100644 index 0000000000000..6b586cd7b8250 --- /dev/null +++ b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.ps1 @@ -0,0 +1,41 @@ +param ( + [Parameter(Mandatory=$true)][string]$Version +) + +$ErrorActionPreference = 'Stop' + +function DownloadFile{ + param( + [Parameter(Mandatory = $true)][string] $TargetFile, + [Parameter(Mandatory = $true)][string] $SourceURL + ) + $ErrorActionPreference = 'Stop' + $ProgressPreference = 'SilentlyContinue' + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + + Write-Host -ForegroundColor Green "Downloading $SourceUrl to $TargetFile" + (New-Object System.Net.WebClient).DownloadFile($SourceURL, $TargetFile) +} + +function DownloadAndExpandTo{ + param( + [Parameter(Mandatory = $true)][string] $TargetDir, + [Parameter(Mandatory = $true)][string] $SourceURL + ) + $tmpOutFile = New-TemporaryFile + + DownloadFile -TargetFile $tmpOutFile -SourceURL $SourceURL + + If(!(Test-Path $TargetDir)) + { + md $TargetDir + } + + Start-Process "7z" -ArgumentList "x -o${TargetDir} $tmpOutFile" -Wait + Remove-Item $tmpOutFile +} + +$source = "https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/$($Version)-IBM-MQC-Redist-Win64.zip" +$target = "c:\ibm_mq" + +DownloadAndExpandTo -TargetDir $target -SourceURL $source From 34e57b0afba79bc66c4d32c73c58647ae58e4b29 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 17 Dec 2021 13:24:31 +0100 Subject: [PATCH 21/44] Fix bat script --- .../scripts/ibm_mq/windows/55_install_client.bat | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat b/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat index 1a8a6d76e8aa6..ee5d0df621d44 100755 --- a/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat +++ b/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat @@ -1,7 +1,5 @@ -#:: https://docs.microsoft.com/en-us/sql/connect/odbc/windows/system-requirements-installation-and-driver-files -#:: Finding the actual URL not gated by a form was a nightmare -# This script installs IBM MQ development version on the CI machines to be able to -# * Compile pymqi image -# * Run integration tests on the machine +#:: This script installs IBM MQ development version on the CI machines to be able to +#:: * Compile pymqi image +#:: * Run integration tests on the machine -RUN Powershell -C .\install_ibm_mq.ps1 "9.2.2.0" +powershell -Command .\install_ibm_mq.ps1 "9.2.2.0" From d6eda84234f22627e7644d092992ea9be94f9a81 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 17 Dec 2021 13:30:03 +0100 Subject: [PATCH 22/44] Do not skip tests on windows --- .azure-pipelines/templates/run-tests.yml | 1 - ibm_mq/datadog_checks/ibm_mq/ibm_mq.py | 2 +- ibm_mq/tests/test_ibm_mq_int.py | 4 ++-- ibm_mq/tests/test_ibm_mq_unit.py | 3 +-- ibm_mq/tests/test_metadata.py | 3 --- ibm_mq/tests/test_queue_metric_collector.py | 3 +-- ibm_mq/tests/test_utils.py | 4 +--- 7 files changed, 6 insertions(+), 14 deletions(-) diff --git a/.azure-pipelines/templates/run-tests.yml b/.azure-pipelines/templates/run-tests.yml index c00cf443832c9..1f774b020534b 100644 --- a/.azure-pipelines/templates/run-tests.yml +++ b/.azure-pipelines/templates/run-tests.yml @@ -16,7 +16,6 @@ steps: displayName: 'Run Unit/Integration tests' env: CODECOV_TOKEN: $(CODECOV_TOKEN) - continueOnError: true - ${{ if and(eq(parameters.test, 'true'), not(eq(parameters.coverage, 'true'))) }}: - script: ddev test --junit ${{ parameters.ddtrace_flag }} ${{ parameters.check }} diff --git a/ibm_mq/datadog_checks/ibm_mq/ibm_mq.py b/ibm_mq/datadog_checks/ibm_mq/ibm_mq.py index 8e21daf440778..134d1b5f4a243 100644 --- a/ibm_mq/datadog_checks/ibm_mq/ibm_mq.py +++ b/ibm_mq/datadog_checks/ibm_mq/ibm_mq.py @@ -25,7 +25,7 @@ class IbmMqCheck(AgentCheck): - SERVICE_CHECK = 'ibm_mq.can_connect' # TODO remove this comment + SERVICE_CHECK = 'ibm_mq.can_connect' def __init__(self, *args, **kwargs): # type: (*Any, **Any) -> None diff --git a/ibm_mq/tests/test_ibm_mq_int.py b/ibm_mq/tests/test_ibm_mq_int.py index 0e9cca7766c54..f433708483063 100644 --- a/ibm_mq/tests/test_ibm_mq_int.py +++ b/ibm_mq/tests/test_ibm_mq_int.py @@ -11,12 +11,12 @@ from datadog_checks.base import AgentCheck from datadog_checks.base.utils.time import ensure_aware_datetime -from datadog_checks.dev.utils import ON_WINDOWS, get_metadata_metrics +from datadog_checks.dev.utils import get_metadata_metrics from . import common from .common import QUEUE_METRICS, assert_all_metrics -pytestmark = [pytest.mark.usefixtures("dd_environment"), pytest.mark.integration, pytest.mark.skipif(ON_WINDOWS)] +pytestmark = [pytest.mark.usefixtures("dd_environment"), pytest.mark.integration] def test_no_msg_errors_are_caught(get_check, instance, caplog): diff --git a/ibm_mq/tests/test_ibm_mq_unit.py b/ibm_mq/tests/test_ibm_mq_unit.py index 899b2cc00910b..63f543eeaa374 100644 --- a/ibm_mq/tests/test_ibm_mq_unit.py +++ b/ibm_mq/tests/test_ibm_mq_unit.py @@ -6,9 +6,8 @@ from six import iteritems from datadog_checks.base import AgentCheck, ConfigurationError -from datadog_checks.dev.utils import ON_WINDOWS -pytestmark = [pytest.mark.unit, pytest.mark.skipif(ON_WINDOWS)] +pytestmark = pytest.mark.unit def test_channel_status_service_check_default_mapping(aggregator, get_check, instance): diff --git a/ibm_mq/tests/test_metadata.py b/ibm_mq/tests/test_metadata.py index 8f4e29f15e735..15c0b63dbc442 100644 --- a/ibm_mq/tests/test_metadata.py +++ b/ibm_mq/tests/test_metadata.py @@ -3,13 +3,10 @@ # Licensed under a 3-clause BSD style license (see LICENSE) import pytest -from datadog_checks.dev.utils import ON_WINDOWS - from .common import MQ_VERSION_RAW @pytest.mark.integration -@pytest.mark.skipif(ON_WINDOWS) def test_metadata(get_check, instance, datadog_agent): check = get_check(instance) check.check_id = 'test:123' diff --git a/ibm_mq/tests/test_queue_metric_collector.py b/ibm_mq/tests/test_queue_metric_collector.py index 67dd6e5317f65..51a4acda384f2 100644 --- a/ibm_mq/tests/test_queue_metric_collector.py +++ b/ibm_mq/tests/test_queue_metric_collector.py @@ -1,11 +1,10 @@ import pytest from mock import Mock -from datadog_checks.dev.utils import ON_WINDOWS from datadog_checks.ibm_mq.collectors import QueueMetricCollector from datadog_checks.ibm_mq.config import IBMMQConfig -pytestmark = [pytest.mark.unit, pytest.mark.skipif(ON_WINDOWS)] +pytestmark = pytest.mark.unit def test_pattern_preceedes_autodiscovery(instance): diff --git a/ibm_mq/tests/test_utils.py b/ibm_mq/tests/test_utils.py index 20cce8040bce5..05135b757a424 100644 --- a/ibm_mq/tests/test_utils.py +++ b/ibm_mq/tests/test_utils.py @@ -4,9 +4,7 @@ import pytest -from datadog_checks.dev.utils import ON_WINDOWS - -pytestmark = [pytest.mark.unit, pytest.mark.skipif(ON_WINDOWS)] +pytestmark = pytest.mark.unit @pytest.mark.parametrize( From fa100507bde7a8bea119ac68a83036b6f0f4ed93 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 17 Dec 2021 13:36:35 +0100 Subject: [PATCH 23/44] Dir the directory --- .azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat b/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat index ee5d0df621d44..30c77429379b7 100755 --- a/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat +++ b/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat @@ -2,4 +2,5 @@ #:: * Compile pymqi image #:: * Run integration tests on the machine +dir . powershell -Command .\install_ibm_mq.ps1 "9.2.2.0" From 7603702435bebc1ccc2bbecaec9d46d0c9a35d17 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 17 Dec 2021 13:47:17 +0100 Subject: [PATCH 24/44] Provide right path to ps1 script --- .azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat b/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat index 30c77429379b7..86a047d25c044 100755 --- a/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat +++ b/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat @@ -3,4 +3,4 @@ #:: * Run integration tests on the machine dir . -powershell -Command .\install_ibm_mq.ps1 "9.2.2.0" +powershell -Command .\azure-pipelines\scripts\ibm_mq\windows\install_ibm_mq.ps1 "9.2.2.0" From 941f23cd2dfd03230f0798c1da2fbb37ce3ffc9e Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Fri, 17 Dec 2021 13:48:33 +0100 Subject: [PATCH 25/44] Change dir command --- .azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat b/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat index 86a047d25c044..c0fc6021dd95c 100755 --- a/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat +++ b/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat @@ -2,5 +2,5 @@ #:: * Compile pymqi image #:: * Run integration tests on the machine -dir . -powershell -Command .\azure-pipelines\scripts\ibm_mq\windows\install_ibm_mq.ps1 "9.2.2.0" +dir .azure-pipelines\scripts\ibm_mq\windows +powershell -Command .azure-pipelines\scripts\ibm_mq\windows\install_ibm_mq.ps1 "9.2.2.0" From b10175bd9f8e0d206f0bf75633148264176f0ea9 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Mon, 20 Dec 2021 12:48:22 +0100 Subject: [PATCH 26/44] Use just one script --- .../scripts/ibm_mq/windows/55_install_client.bat | 6 ------ .azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.ps1 | 5 +---- 2 files changed, 1 insertion(+), 10 deletions(-) delete mode 100755 .azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat diff --git a/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat b/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat deleted file mode 100755 index c0fc6021dd95c..0000000000000 --- a/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.bat +++ /dev/null @@ -1,6 +0,0 @@ -#:: This script installs IBM MQ development version on the CI machines to be able to -#:: * Compile pymqi image -#:: * Run integration tests on the machine - -dir .azure-pipelines\scripts\ibm_mq\windows -powershell -Command .azure-pipelines\scripts\ibm_mq\windows\install_ibm_mq.ps1 "9.2.2.0" diff --git a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.ps1 b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.ps1 index 6b586cd7b8250..dc7456a678946 100644 --- a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.ps1 +++ b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.ps1 @@ -1,7 +1,3 @@ -param ( - [Parameter(Mandatory=$true)][string]$Version -) - $ErrorActionPreference = 'Stop' function DownloadFile{ @@ -35,6 +31,7 @@ function DownloadAndExpandTo{ Remove-Item $tmpOutFile } +$Version "9.2.2.0" $source = "https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/$($Version)-IBM-MQC-Redist-Win64.zip" $target = "c:\ibm_mq" From 0c9e1c1e9dd663529851ad1c0083b6305cd68928 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Mon, 20 Dec 2021 13:20:58 +0100 Subject: [PATCH 27/44] Add more messages to script --- .azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.ps1 b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.ps1 index dc7456a678946..b498d67f44ee6 100644 --- a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.ps1 +++ b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.ps1 @@ -9,7 +9,7 @@ function DownloadFile{ $ProgressPreference = 'SilentlyContinue' [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - Write-Host -ForegroundColor Green "Downloading $SourceUrl to $TargetFile" + Write-Output "Downloading $SourceUrl to $TargetFile" (New-Object System.Net.WebClient).DownloadFile($SourceURL, $TargetFile) } @@ -27,6 +27,7 @@ function DownloadAndExpandTo{ md $TargetDir } + Write-Output "Expanding $tmpOutFile to $TargetDir" Start-Process "7z" -ArgumentList "x -o${TargetDir} $tmpOutFile" -Wait Remove-Item $tmpOutFile } From 38e6cc624980ec9196a6c3380f3458c356afeb2e Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Mon, 20 Dec 2021 13:47:00 +0100 Subject: [PATCH 28/44] Simpler download and extract script --- .../scripts/ibm_mq/windows/install_ibm_mq.bat | 10 +++++ .../scripts/ibm_mq/windows/install_ibm_mq.ps1 | 39 ------------------- 2 files changed, 10 insertions(+), 39 deletions(-) create mode 100644 .azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat delete mode 100644 .azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.ps1 diff --git a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat new file mode 100644 index 0000000000000..09a09f1a9a1fd --- /dev/null +++ b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat @@ -0,0 +1,10 @@ +$target = "c:\ibm_mq" +$version = "9.2.2.0" +$file = "$version-IBM-MQC-Redist-Win64.zip" +$source = "https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/$file" + +:: Downloading IBM MQ client +powershell -command "Invoke-WebRequest -Uri $source -OutFile $target\$file" +dir $target +:: Extracting IBM MQ client +powershell -command "Expand-Archive $target\$file $target\" diff --git a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.ps1 b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.ps1 deleted file mode 100644 index b498d67f44ee6..0000000000000 --- a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.ps1 +++ /dev/null @@ -1,39 +0,0 @@ -$ErrorActionPreference = 'Stop' - -function DownloadFile{ - param( - [Parameter(Mandatory = $true)][string] $TargetFile, - [Parameter(Mandatory = $true)][string] $SourceURL - ) - $ErrorActionPreference = 'Stop' - $ProgressPreference = 'SilentlyContinue' - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - - Write-Output "Downloading $SourceUrl to $TargetFile" - (New-Object System.Net.WebClient).DownloadFile($SourceURL, $TargetFile) -} - -function DownloadAndExpandTo{ - param( - [Parameter(Mandatory = $true)][string] $TargetDir, - [Parameter(Mandatory = $true)][string] $SourceURL - ) - $tmpOutFile = New-TemporaryFile - - DownloadFile -TargetFile $tmpOutFile -SourceURL $SourceURL - - If(!(Test-Path $TargetDir)) - { - md $TargetDir - } - - Write-Output "Expanding $tmpOutFile to $TargetDir" - Start-Process "7z" -ArgumentList "x -o${TargetDir} $tmpOutFile" -Wait - Remove-Item $tmpOutFile -} - -$Version "9.2.2.0" -$source = "https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/$($Version)-IBM-MQC-Redist-Win64.zip" -$target = "c:\ibm_mq" - -DownloadAndExpandTo -TargetDir $target -SourceURL $source From 65ce8648d100ea7da53210b4bd99017bf02b16c3 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Mon, 20 Dec 2021 13:58:33 +0100 Subject: [PATCH 29/44] Fix variable definition --- .../scripts/ibm_mq/windows/install_ibm_mq.bat | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat index 09a09f1a9a1fd..4313a03a4750f 100644 --- a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat +++ b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat @@ -1,10 +1,10 @@ -$target = "c:\ibm_mq" -$version = "9.2.2.0" -$file = "$version-IBM-MQC-Redist-Win64.zip" -$source = "https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/$file" +set target=c:\ibm_mq +set version=9.2.2.0 +set file=%version%-IBM-MQC-Redist-Win64.zip +set source=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/%file% :: Downloading IBM MQ client -powershell -command "Invoke-WebRequest -Uri $source -OutFile $target\$file" +powershell -command "Invoke-WebRequest -Uri $source -OutFile %target%\%file%" dir $target :: Extracting IBM MQ client -powershell -command "Expand-Archive $target\$file $target\" +powershell -command "Expand-Archive %target%\%file% %target%\" From 9d805ecfd5839fed9a110dc240149674d610249e Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Mon, 20 Dec 2021 14:06:15 +0100 Subject: [PATCH 30/44] Fix variables --- .azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat index 4313a03a4750f..6c99fe8156cfc 100644 --- a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat +++ b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat @@ -4,7 +4,7 @@ set file=%version%-IBM-MQC-Redist-Win64.zip set source=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/%file% :: Downloading IBM MQ client -powershell -command "Invoke-WebRequest -Uri $source -OutFile %target%\%file%" +powershell -command "Invoke-WebRequest -Uri %source% -OutFile %target%\%file%" dir $target :: Extracting IBM MQ client powershell -command "Expand-Archive %target%\%file% %target%\" From 4737676f806c0d64c2e806cf6460d108e20c7442 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Mon, 20 Dec 2021 14:47:22 +0100 Subject: [PATCH 31/44] Fix string? --- .azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat index 6c99fe8156cfc..473d57902cec0 100644 --- a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat +++ b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat @@ -7,4 +7,5 @@ set source=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messag powershell -command "Invoke-WebRequest -Uri %source% -OutFile %target%\%file%" dir $target :: Extracting IBM MQ client -powershell -command "Expand-Archive %target%\%file% %target%\" +powershell -command "Expand-Archive %target%\%file% %target%" +dir $target From 0c3800801f404005c4e3b0ed04dd3d898dde8401 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Mon, 20 Dec 2021 15:14:42 +0100 Subject: [PATCH 32/44] Create directory --- .azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat index 473d57902cec0..448e5f5ef375d 100644 --- a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat +++ b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat @@ -3,9 +3,9 @@ set version=9.2.2.0 set file=%version%-IBM-MQC-Redist-Win64.zip set source=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/%file% +md %target% :: Downloading IBM MQ client powershell -command "Invoke-WebRequest -Uri %source% -OutFile %target%\%file%" -dir $target :: Extracting IBM MQ client powershell -command "Expand-Archive %target%\%file% %target%" dir $target From 27d3d05439ce1264b88bb32f296750cb07462e00 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Mon, 20 Dec 2021 15:27:28 +0100 Subject: [PATCH 33/44] Fix variable --- .azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat index 448e5f5ef375d..79ffe3cac4fd2 100644 --- a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat +++ b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat @@ -8,4 +8,4 @@ md %target% powershell -command "Invoke-WebRequest -Uri %source% -OutFile %target%\%file%" :: Extracting IBM MQ client powershell -command "Expand-Archive %target%\%file% %target%" -dir $target +dir %target% From a2ed0db1712c6d01990ea1409b8a059e24120e7c Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Mon, 20 Dec 2021 16:13:31 +0100 Subject: [PATCH 34/44] Use drive download --- .azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat index 79ffe3cac4fd2..d87cb1d096511 100644 --- a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat +++ b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat @@ -1,11 +1,12 @@ set target=c:\ibm_mq set version=9.2.2.0 set file=%version%-IBM-MQC-Redist-Win64.zip -set source=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/%file% +set ibm_source=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/%file% +set source=https://drive.google.com/uc?export=download&id=1ysTsHxAAxIwl0EwFnYzN5cNRBnvKwELw md %target% :: Downloading IBM MQ client powershell -command "Invoke-WebRequest -Uri %source% -OutFile %target%\%file%" :: Extracting IBM MQ client -powershell -command "Expand-Archive %target%\%file% %target%" +powershell -command "Expand-Archive -LiteralPath %target%\%file% -DestinationPath %target%" dir %target% From d19c6157712f48a841902b399a37d04fa8f71263 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Mon, 20 Dec 2021 16:32:19 +0100 Subject: [PATCH 35/44] fix url? --- .azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat index d87cb1d096511..b5a1c0a3019ca 100644 --- a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat +++ b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat @@ -2,7 +2,7 @@ set target=c:\ibm_mq set version=9.2.2.0 set file=%version%-IBM-MQC-Redist-Win64.zip set ibm_source=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/%file% -set source=https://drive.google.com/uc?export=download&id=1ysTsHxAAxIwl0EwFnYzN5cNRBnvKwELw +set "source=https://drive.google.com/uc?export=download&id=1ysTsHxAAxIwl0EwFnYzN5cNRBnvKwELw" md %target% :: Downloading IBM MQ client From 7918306a89ff3e9f837c4119382a99b1eb782db4 Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Mon, 20 Dec 2021 12:23:35 -0500 Subject: [PATCH 36/44] try to fix build --- .azure-pipelines/changes.yml | 30 ++++----- .../ibm_mq/windows/55_install_client.py | 67 +++++++++++++++++++ .../scripts/ibm_mq/windows/install_ibm_mq.bat | 12 ---- ibm_mq/tests/common.py | 6 +- ibm_mq/tests/conftest.py | 60 +++++++++++------ ibm_mq/tox.ini | 8 ++- 6 files changed, 126 insertions(+), 57 deletions(-) create mode 100644 .azure-pipelines/scripts/ibm_mq/windows/55_install_client.py delete mode 100644 .azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat diff --git a/.azure-pipelines/changes.yml b/.azure-pipelines/changes.yml index 87b3b7892129c..d521c9ed8bab3 100644 --- a/.azure-pipelines/changes.yml +++ b/.azure-pipelines/changes.yml @@ -14,25 +14,25 @@ variables: DDEV_COLOR: 1 DD_TRACE_AGENT_PORT: 8127 -resources: - containers: - - ${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}: - - container: dd_agent - image: gcr.io/datadoghq/agent:latest - ports: - - 8127:8126 - env: - DD_API_KEY: $(DD_CI_API_KEY) - DD_HOSTNAME: "none" - DD_INSIDE_CI: "true" +# resources: +# containers: +# - ${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}: +# - container: dd_agent +# image: gcr.io/datadoghq/agent:latest +# ports: +# - 8127:8126 +# env: +# DD_API_KEY: $(DD_CI_API_KEY) +# DD_HOSTNAME: "none" +# DD_INSIDE_CI: "true" jobs: - template: './templates/test-single-linux.yml' parameters: job_name: Changed display: Linux - ${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}: - ddtrace_flag: '--ddtrace' + # ${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}: + # ddtrace_flag: '--ddtrace' validate: false validate_codeowners: false validate_changed: changed @@ -47,8 +47,8 @@ jobs: parameters: job_name: Changed check: '--changed datadog_checks_base datadog_checks_dev active_directory aspdotnet disk dns_check dotnetclr exchange_server ibm_mq iis network pdh_check sqlserver tcp_check win32_event_log windows_performance_counters windows_service wmi_check' - ${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}: - ddtrace_flag: '--ddtrace' + # ${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}: + # ddtrace_flag: '--ddtrace' validate_changed: changed display: Windows pip_cache_config: diff --git a/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.py b/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.py new file mode 100644 index 0000000000000..89d15701f46ee --- /dev/null +++ b/.azure-pipelines/scripts/ibm_mq/windows/55_install_client.py @@ -0,0 +1,67 @@ +import os +import subprocess +from tempfile import TemporaryDirectory +from zipfile import ZipFile + +import requests + +SERVER_VERSION = '924' +SERVER_ARCHIVE_NAME = f'mqadv_dev{SERVER_VERSION}_windows.zip' +SERVER_URL = f'https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqadv/{SERVER_ARCHIVE_NAME}' + +CLIENT_VERSION = '9.2.2.0' +CLIENT_ARCHIVE_NAME = f'{CLIENT_VERSION}-IBM-MQC-Redist-Win64.zip' +CLIENT_URL = f'https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/{CLIENT_ARCHIVE_NAME}' +CLIENT_TARGET_DIR = 'C:\\ibm_mq' + + +def download_file(url, file_name): + response = requests.get(url, stream=True) + response.raise_for_status() + + with open(file_name, 'wb') as f: + for chunk in response.iter_content(16384): + f.write(chunk) + + +def main(): + with TemporaryDirectory() as d: + temp_dir = os.path.realpath(d) + + print('Downloading client') + client_archive_path = os.path.join(temp_dir, CLIENT_ARCHIVE_NAME) + download_file(CLIENT_URL, client_archive_path) + + print('Extracting client') + with ZipFile(client_archive_path) as zip_file: + zip_file.extractall(CLIENT_TARGET_DIR) + + print('Downloading server') + server_target_dir = os.path.join(temp_dir, 'server') + server_archive_path = os.path.join(temp_dir, SERVER_ARCHIVE_NAME) + download_file(SERVER_URL, server_archive_path) + + print('Extracting server') + with ZipFile(server_archive_path) as zip_file: + zip_file.extractall(server_target_dir) + + print('Installing server') + msi_path = os.path.join(server_target_dir, 'MQServer', 'MSI', 'IBM MQ.msi') + subprocess.check_call( + [ + 'msiexec', + '/quiet', + '/passive', + '/qn', + '/i', + msi_path, + 'TRANSFORMS=1033.mst', + 'AGREETOLICENSE=YES', + 'ADDLOCAL=Server', + ], + shell=True, + ) + + +if __name__ == '__main__': + main() diff --git a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat deleted file mode 100644 index b5a1c0a3019ca..0000000000000 --- a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat +++ /dev/null @@ -1,12 +0,0 @@ -set target=c:\ibm_mq -set version=9.2.2.0 -set file=%version%-IBM-MQC-Redist-Win64.zip -set ibm_source=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/%file% -set "source=https://drive.google.com/uc?export=download&id=1ysTsHxAAxIwl0EwFnYzN5cNRBnvKwELw" - -md %target% -:: Downloading IBM MQ client -powershell -command "Invoke-WebRequest -Uri %source% -OutFile %target%\%file%" -:: Extracting IBM MQ client -powershell -command "Expand-Archive -LiteralPath %target%\%file% -DestinationPath %target%" -dir %target% diff --git a/ibm_mq/tests/common.py b/ibm_mq/tests/common.py index 2cb7946133350..c26d244c318fb 100644 --- a/ibm_mq/tests/common.py +++ b/ibm_mq/tests/common.py @@ -140,11 +140,7 @@ E2E_METADATA = { 'docker_volumes': ['{}/agent_scripts/start_commands.sh:/tmp/start_commands.sh'.format(HERE)], 'start_commands': ['bash /tmp/start_commands.sh'], - 'env_vars': { - 'LD_LIBRARY_PATH': '/opt/mqm/lib64:/opt/mqm/lib', - 'C_INCLUDE_PATH': '/opt/mqm/inc', - 'MQ_FILE_PATH': 'c:\\ibm_mq', - }, + 'env_vars': {'LD_LIBRARY_PATH': '/opt/mqm/lib64:/opt/mqm/lib', 'C_INCLUDE_PATH': '/opt/mqm/inc'}, } QUEUE_METRICS = [ diff --git a/ibm_mq/tests/conftest.py b/ibm_mq/tests/conftest.py index 7aff4d7696edd..b1b294a1bcf46 100644 --- a/ibm_mq/tests/conftest.py +++ b/ibm_mq/tests/conftest.py @@ -5,11 +5,13 @@ import logging import os import re +import subprocess import pytest from six.moves import range -from datadog_checks.dev import docker_run +from datadog_checks.dev import docker_run, environment_run +from datadog_checks.dev.ci import running_on_ci from datadog_checks.dev.conditions import CheckDockerLogs, WaitFor from datadog_checks.dev.utils import ON_WINDOWS @@ -138,11 +140,22 @@ def consume(): def prepare_queue_manager(): import pymqi - conn_info = '{0}({1})'.format(common.HOST, common.PORT) - qm_name = common.QUEUE_MANAGER.lower() + if ON_WINDOWS: + # https://developer.ibm.com/tutorials/mq-connect-app-queue-manager-windows/ + exe_dir = os.path.join('C:', 'Program Files', 'IBM', 'MQ', 'bin') + subprocess.check_call([os.path.join(exe_dir, 'setmqenv'), '-s'], shell=True) + subprocess.check_call([os.path.join(exe_dir, 'crtmqm'), 'QM1'], shell=True) + subprocess.check_call([os.path.join(exe_dir, 'strmqm'), 'QM1'], shell=True) + qmgr = pymqi.connect(common.QUEUE_MANAGER) + else: + conn_info = '{0}({1})'.format(common.HOST, common.PORT) + qm_name = common.QUEUE_MANAGER.lower() + + qmgr = pymqi.QueueManager(None) + qmgr.connectTCPClient( + common.QUEUE_MANAGER, pymqi.CD(), common.CHANNEL, conn_info, common.USERNAME, common.PASSWORD + ) - qmgr = pymqi.QueueManager(None) - qmgr.connectTCPClient(common.QUEUE_MANAGER, pymqi.CD(), common.CHANNEL, conn_info, common.USERNAME, common.PASSWORD) pcf = pymqi.PCFExecute(qmgr, response_wait_interval=5000) attrs = [ @@ -196,21 +209,24 @@ def prepare_queue_manager(): @pytest.fixture(scope='session') def dd_environment(): - - if common.MQ_VERSION == 9: - log_pattern = "AMQ5026I: The listener 'DEV.LISTENER.TCP' has started. ProcessId" - elif common.MQ_VERSION == 8: - log_pattern = r".*QMNAME\({}\)\s*STATUS\(Running\).*".format(common.QUEUE_MANAGER) + if ON_WINDOWS and running_on_ci(): + with environment_run(up=lambda: None, down=lambda: None, conditions=[prepare_queue_manager]): + yield common.INSTANCE else: - raise RuntimeError('Invalid version: {}'.format(common.MQ_VERSION)) - - e2e_meta = copy.deepcopy(common.E2E_METADATA) - e2e_meta.setdefault('docker_volumes', []) - e2e_meta['docker_volumes'].append("{}:/opt/pki/keys".format(os.path.join(common.HERE, 'keys'))) - - conditions = [CheckDockerLogs('ibm_mq1', log_pattern)] - if not ON_WINDOWS: - conditions.append(WaitFor(prepare_queue_manager)) - - with docker_run(compose_file=common.COMPOSE_FILE_PATH, build=True, conditions=conditions, sleep=10, attempts=2): - yield common.INSTANCE, e2e_meta + if common.MQ_VERSION == 9: + log_pattern = "AMQ5026I: The listener 'DEV.LISTENER.TCP' has started. ProcessId" + elif common.MQ_VERSION == 8: + log_pattern = r".*QMNAME\({}\)\s*STATUS\(Running\).*".format(common.QUEUE_MANAGER) + else: + raise RuntimeError('Invalid version: {}'.format(common.MQ_VERSION)) + + e2e_meta = copy.deepcopy(common.E2E_METADATA) + e2e_meta.setdefault('docker_volumes', []) + e2e_meta['docker_volumes'].append("{}:/opt/pki/keys".format(os.path.join(common.HERE, 'keys'))) + + conditions = [CheckDockerLogs('ibm_mq1', log_pattern)] + if not ON_WINDOWS: + conditions.append(WaitFor(prepare_queue_manager)) + + with docker_run(compose_file=common.COMPOSE_FILE_PATH, build=True, conditions=conditions, sleep=10, attempts=2): + yield common.INSTANCE, e2e_meta diff --git a/ibm_mq/tox.ini b/ibm_mq/tox.ini index 06fb0f857f442..960fb8075fffb 100644 --- a/ibm_mq/tox.ini +++ b/ibm_mq/tox.ini @@ -24,7 +24,9 @@ dd_mypy_args = '.*/config_models/.*\.py$' dd_mypy_deps = types-mock==0.1.5 -platform = linux|darwin|win32 +platform = + linux|darwin + py38-9: linux|darwin|win32 deps = -e../datadog_checks_base[deps] -rrequirements-dev.txt @@ -33,8 +35,8 @@ commands = pip install -r requirements.in pytest -v {posargs} setenv = - LD_LIBRARY_PATH=/opt/mqm/lib64:/opt/mqm/lib:{env:LD_LIBRARY_PATH:none} - MQ_FILE_PATH=c:\ibm_mq + LD_LIBRARY_PATH=/opt/mqm/lib64{:}/opt/mqm/lib{:}C:\ibm_mq{:}{env:LD_LIBRARY_PATH:none} + MQ_FILE_PATH=C:\ibm_mq 8: IBM_MQ_VERSION = 8 8: IBM_MQ_COMPOSE_VERSION = 8 8: IBM_MQ_VERSION_RAW = 8.0.0.4 From 4b9a70f8b8216a94f3ff9c8a0709fc45d851d74b Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Tue, 21 Dec 2021 10:48:37 +0100 Subject: [PATCH 37/44] migrate script to python --- .../scripts/ibm_mq/windows/install_ibm_mq.bat | 12 --------- .../scripts/ibm_mq/windows/install_ibm_mq.py | 25 +++++++++++++++++++ 2 files changed, 25 insertions(+), 12 deletions(-) delete mode 100644 .azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat create mode 100644 .azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.py diff --git a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat deleted file mode 100644 index b5a1c0a3019ca..0000000000000 --- a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.bat +++ /dev/null @@ -1,12 +0,0 @@ -set target=c:\ibm_mq -set version=9.2.2.0 -set file=%version%-IBM-MQC-Redist-Win64.zip -set ibm_source=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/%file% -set "source=https://drive.google.com/uc?export=download&id=1ysTsHxAAxIwl0EwFnYzN5cNRBnvKwELw" - -md %target% -:: Downloading IBM MQ client -powershell -command "Invoke-WebRequest -Uri %source% -OutFile %target%\%file%" -:: Extracting IBM MQ client -powershell -command "Expand-Archive -LiteralPath %target%\%file% -DestinationPath %target%" -dir %target% diff --git a/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.py b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.py new file mode 100644 index 0000000000000..b1375dfa0c990 --- /dev/null +++ b/.azure-pipelines/scripts/ibm_mq/windows/install_ibm_mq.py @@ -0,0 +1,25 @@ +import os +import urllib.request +import zipfile + +TARGET_PATH = "/tmp/67f55o00o0oo" #"c:\\ibm_mq" +VERSION = "9.2.2.0" +ZIP_FILE = "{}-IBM-MQC-Redist-Win64.zip".format(VERSION) +IBM_URL = "https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/{}".format(ZIP_FILE) + +try: + os.mkdir(TARGET_PATH) + print("Successfully created the directory %s " % TARGET_PATH) +except OSError: + print("Creation of the directory %s failed" % TARGET_PATH) + raise + + +print("Downloading IBM MQ client") +zip_path, _ = urllib.request.urlretrieve(IBM_URL, os.path.join(TARGET_PATH, ZIP_FILE)) + +print("Extracting IBM MQ client") +with zipfile.ZipFile(zip_path, "r") as f: + f.extractall(TARGET_PATH) + +print(os.listdir(TARGET_PATH)) From 9d19c25806ee01e8dfae12d6f0e40d5830f351cc Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Tue, 21 Dec 2021 11:16:22 +0100 Subject: [PATCH 38/44] Fix os separator in conftest --- .../ibm_mq/windows/55_install_ibm_mq.py | 67 +++++++++++++++++++ .../windows/55_install_ibm_mq_client.py | 25 ------- ibm_mq/tests/conftest.py | 2 +- 3 files changed, 68 insertions(+), 26 deletions(-) create mode 100644 .azure-pipelines/scripts/ibm_mq/windows/55_install_ibm_mq.py delete mode 100644 .azure-pipelines/scripts/ibm_mq/windows/55_install_ibm_mq_client.py diff --git a/.azure-pipelines/scripts/ibm_mq/windows/55_install_ibm_mq.py b/.azure-pipelines/scripts/ibm_mq/windows/55_install_ibm_mq.py new file mode 100644 index 0000000000000..89d15701f46ee --- /dev/null +++ b/.azure-pipelines/scripts/ibm_mq/windows/55_install_ibm_mq.py @@ -0,0 +1,67 @@ +import os +import subprocess +from tempfile import TemporaryDirectory +from zipfile import ZipFile + +import requests + +SERVER_VERSION = '924' +SERVER_ARCHIVE_NAME = f'mqadv_dev{SERVER_VERSION}_windows.zip' +SERVER_URL = f'https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqadv/{SERVER_ARCHIVE_NAME}' + +CLIENT_VERSION = '9.2.2.0' +CLIENT_ARCHIVE_NAME = f'{CLIENT_VERSION}-IBM-MQC-Redist-Win64.zip' +CLIENT_URL = f'https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/{CLIENT_ARCHIVE_NAME}' +CLIENT_TARGET_DIR = 'C:\\ibm_mq' + + +def download_file(url, file_name): + response = requests.get(url, stream=True) + response.raise_for_status() + + with open(file_name, 'wb') as f: + for chunk in response.iter_content(16384): + f.write(chunk) + + +def main(): + with TemporaryDirectory() as d: + temp_dir = os.path.realpath(d) + + print('Downloading client') + client_archive_path = os.path.join(temp_dir, CLIENT_ARCHIVE_NAME) + download_file(CLIENT_URL, client_archive_path) + + print('Extracting client') + with ZipFile(client_archive_path) as zip_file: + zip_file.extractall(CLIENT_TARGET_DIR) + + print('Downloading server') + server_target_dir = os.path.join(temp_dir, 'server') + server_archive_path = os.path.join(temp_dir, SERVER_ARCHIVE_NAME) + download_file(SERVER_URL, server_archive_path) + + print('Extracting server') + with ZipFile(server_archive_path) as zip_file: + zip_file.extractall(server_target_dir) + + print('Installing server') + msi_path = os.path.join(server_target_dir, 'MQServer', 'MSI', 'IBM MQ.msi') + subprocess.check_call( + [ + 'msiexec', + '/quiet', + '/passive', + '/qn', + '/i', + msi_path, + 'TRANSFORMS=1033.mst', + 'AGREETOLICENSE=YES', + 'ADDLOCAL=Server', + ], + shell=True, + ) + + +if __name__ == '__main__': + main() diff --git a/.azure-pipelines/scripts/ibm_mq/windows/55_install_ibm_mq_client.py b/.azure-pipelines/scripts/ibm_mq/windows/55_install_ibm_mq_client.py deleted file mode 100644 index 96cde46067e0f..0000000000000 --- a/.azure-pipelines/scripts/ibm_mq/windows/55_install_ibm_mq_client.py +++ /dev/null @@ -1,25 +0,0 @@ -import os -import urllib.request -import zipfile - -TARGET_PATH = "c:\\ibm_mq" -VERSION = "9.2.2.0" -ZIP_FILE = "{}-IBM-MQC-Redist-Win64.zip".format(VERSION) -IBM_URL = "https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/{}".format(ZIP_FILE) - -try: - os.mkdir(TARGET_PATH) - print("Successfully created the directory %s " % TARGET_PATH) -except OSError: - print("Creation of the directory %s failed" % TARGET_PATH) - raise - - -print("Downloading IBM MQ client") -zip_path, _ = urllib.request.urlretrieve(IBM_URL, os.path.join(TARGET_PATH, ZIP_FILE)) - -print("Extracting IBM MQ client") -with zipfile.ZipFile(zip_path, "r") as f: - f.extractall(TARGET_PATH) - -print(os.listdir(TARGET_PATH)) diff --git a/ibm_mq/tests/conftest.py b/ibm_mq/tests/conftest.py index b1b294a1bcf46..0898580605816 100644 --- a/ibm_mq/tests/conftest.py +++ b/ibm_mq/tests/conftest.py @@ -142,7 +142,7 @@ def prepare_queue_manager(): if ON_WINDOWS: # https://developer.ibm.com/tutorials/mq-connect-app-queue-manager-windows/ - exe_dir = os.path.join('C:', 'Program Files', 'IBM', 'MQ', 'bin') + exe_dir = os.path.join('C:' + os.sep, 'Program Files', 'IBM', 'MQ', 'bin') subprocess.check_call([os.path.join(exe_dir, 'setmqenv'), '-s'], shell=True) subprocess.check_call([os.path.join(exe_dir, 'crtmqm'), 'QM1'], shell=True) subprocess.check_call([os.path.join(exe_dir, 'strmqm'), 'QM1'], shell=True) From e1f24628196354bccaff98ab75f30fa2b5caf5da Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Tue, 21 Dec 2021 16:54:52 +0100 Subject: [PATCH 39/44] Do not install server, skip int tests on windows --- .../ibm_mq/windows/55_install_ibm_mq.py | 67 ------------------- .../windows/55_install_ibm_mq_client.py | 37 ++++++++++ ibm_mq/tests/test_ibm_mq_e2e.py | 9 ++- ibm_mq/tests/test_ibm_mq_int.py | 8 ++- ibm_mq/tests/test_ibm_mq_unit.py | 2 + ibm_mq/tests/test_metadata.py | 3 + 6 files changed, 54 insertions(+), 72 deletions(-) delete mode 100644 .azure-pipelines/scripts/ibm_mq/windows/55_install_ibm_mq.py create mode 100644 .azure-pipelines/scripts/ibm_mq/windows/55_install_ibm_mq_client.py diff --git a/.azure-pipelines/scripts/ibm_mq/windows/55_install_ibm_mq.py b/.azure-pipelines/scripts/ibm_mq/windows/55_install_ibm_mq.py deleted file mode 100644 index 89d15701f46ee..0000000000000 --- a/.azure-pipelines/scripts/ibm_mq/windows/55_install_ibm_mq.py +++ /dev/null @@ -1,67 +0,0 @@ -import os -import subprocess -from tempfile import TemporaryDirectory -from zipfile import ZipFile - -import requests - -SERVER_VERSION = '924' -SERVER_ARCHIVE_NAME = f'mqadv_dev{SERVER_VERSION}_windows.zip' -SERVER_URL = f'https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqadv/{SERVER_ARCHIVE_NAME}' - -CLIENT_VERSION = '9.2.2.0' -CLIENT_ARCHIVE_NAME = f'{CLIENT_VERSION}-IBM-MQC-Redist-Win64.zip' -CLIENT_URL = f'https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/{CLIENT_ARCHIVE_NAME}' -CLIENT_TARGET_DIR = 'C:\\ibm_mq' - - -def download_file(url, file_name): - response = requests.get(url, stream=True) - response.raise_for_status() - - with open(file_name, 'wb') as f: - for chunk in response.iter_content(16384): - f.write(chunk) - - -def main(): - with TemporaryDirectory() as d: - temp_dir = os.path.realpath(d) - - print('Downloading client') - client_archive_path = os.path.join(temp_dir, CLIENT_ARCHIVE_NAME) - download_file(CLIENT_URL, client_archive_path) - - print('Extracting client') - with ZipFile(client_archive_path) as zip_file: - zip_file.extractall(CLIENT_TARGET_DIR) - - print('Downloading server') - server_target_dir = os.path.join(temp_dir, 'server') - server_archive_path = os.path.join(temp_dir, SERVER_ARCHIVE_NAME) - download_file(SERVER_URL, server_archive_path) - - print('Extracting server') - with ZipFile(server_archive_path) as zip_file: - zip_file.extractall(server_target_dir) - - print('Installing server') - msi_path = os.path.join(server_target_dir, 'MQServer', 'MSI', 'IBM MQ.msi') - subprocess.check_call( - [ - 'msiexec', - '/quiet', - '/passive', - '/qn', - '/i', - msi_path, - 'TRANSFORMS=1033.mst', - 'AGREETOLICENSE=YES', - 'ADDLOCAL=Server', - ], - shell=True, - ) - - -if __name__ == '__main__': - main() diff --git a/.azure-pipelines/scripts/ibm_mq/windows/55_install_ibm_mq_client.py b/.azure-pipelines/scripts/ibm_mq/windows/55_install_ibm_mq_client.py new file mode 100644 index 0000000000000..9b0375b595c1c --- /dev/null +++ b/.azure-pipelines/scripts/ibm_mq/windows/55_install_ibm_mq_client.py @@ -0,0 +1,37 @@ +import os +from tempfile import TemporaryDirectory +from zipfile import ZipFile + +import requests + + +CLIENT_VERSION = '9.2.2.0' +CLIENT_ARCHIVE_NAME = f'{CLIENT_VERSION}-IBM-MQC-Redist-Win64.zip' +CLIENT_URL = f'https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/{CLIENT_ARCHIVE_NAME}' +CLIENT_TARGET_DIR = 'C:\\ibm_mq' + + +def download_file(url, file_name): + response = requests.get(url, stream=True) + response.raise_for_status() + + with open(file_name, 'wb') as f: + for chunk in response.iter_content(16384): + f.write(chunk) + + +def main(): + with TemporaryDirectory() as d: + temp_dir = os.path.realpath(d) + + print('Downloading client') + client_archive_path = os.path.join(temp_dir, CLIENT_ARCHIVE_NAME) + download_file(CLIENT_URL, client_archive_path) + + print('Extracting client') + with ZipFile(client_archive_path) as zip_file: + zip_file.extractall(CLIENT_TARGET_DIR) + + +if __name__ == '__main__': + main() diff --git a/ibm_mq/tests/test_ibm_mq_e2e.py b/ibm_mq/tests/test_ibm_mq_e2e.py index e20dc2c4e4ee7..08f92d772c53f 100644 --- a/ibm_mq/tests/test_ibm_mq_e2e.py +++ b/ibm_mq/tests/test_ibm_mq_e2e.py @@ -4,12 +4,16 @@ import pytest -from datadog_checks.dev.utils import get_metadata_metrics +from datadog_checks.dev.utils import ON_WINDOWS, get_metadata_metrics from .common import MQ_VERSION, assert_all_metrics +pytestmark = [ + pytest.mark.skipif(ON_WINDOWS, reason="MQ server does not run properly on windows CI machines"), + pytest.mark.e2e, +] + -@pytest.mark.e2e def test_e2e_check_all(dd_agent_check, instance_collect_all): aggregator = dd_agent_check(instance_collect_all, rate=True) @@ -17,7 +21,6 @@ def test_e2e_check_all(dd_agent_check, instance_collect_all): aggregator.assert_metrics_using_metadata(get_metadata_metrics()) -@pytest.mark.e2e @pytest.mark.skipif( MQ_VERSION < 9, reason='Only test for for version >=9, for v8 use a custom image with custom setup.' ) diff --git a/ibm_mq/tests/test_ibm_mq_int.py b/ibm_mq/tests/test_ibm_mq_int.py index f433708483063..ee2ecc63fc528 100644 --- a/ibm_mq/tests/test_ibm_mq_int.py +++ b/ibm_mq/tests/test_ibm_mq_int.py @@ -11,12 +11,16 @@ from datadog_checks.base import AgentCheck from datadog_checks.base.utils.time import ensure_aware_datetime -from datadog_checks.dev.utils import get_metadata_metrics +from datadog_checks.dev.utils import ON_WINDOWS, get_metadata_metrics from . import common from .common import QUEUE_METRICS, assert_all_metrics -pytestmark = [pytest.mark.usefixtures("dd_environment"), pytest.mark.integration] +pytestmark = [ + pytest.mark.skipif(ON_WINDOWS, reason="MQ server does not run properly on windows CI machines"), + pytest.mark.usefixtures("dd_environment"), + pytest.mark.integration, +] def test_no_msg_errors_are_caught(get_check, instance, caplog): diff --git a/ibm_mq/tests/test_ibm_mq_unit.py b/ibm_mq/tests/test_ibm_mq_unit.py index 63f543eeaa374..298d1d09b5d4e 100644 --- a/ibm_mq/tests/test_ibm_mq_unit.py +++ b/ibm_mq/tests/test_ibm_mq_unit.py @@ -6,6 +6,7 @@ from six import iteritems from datadog_checks.base import AgentCheck, ConfigurationError +from datadog_checks.dev.utils import ON_WINDOWS pytestmark = pytest.mark.unit @@ -182,6 +183,7 @@ def test_channel_queue_config_error(instance_config): assert 'channel, queue_manager are required configurations' in str(excinfo.value) +@pytest.mark.skipif(ON_WINDOWS, reason="MQ server does not run properly on windows CI machines") def test_ssl_connection_creation(get_check, instance): """ Test that we are not getting unicode/bytes type error. diff --git a/ibm_mq/tests/test_metadata.py b/ibm_mq/tests/test_metadata.py index 15c0b63dbc442..9ebca4058825e 100644 --- a/ibm_mq/tests/test_metadata.py +++ b/ibm_mq/tests/test_metadata.py @@ -3,9 +3,12 @@ # Licensed under a 3-clause BSD style license (see LICENSE) import pytest +from datadog_checks.dev.utils import ON_WINDOWS + from .common import MQ_VERSION_RAW +@pytest.mark.skipif(ON_WINDOWS, reason="MQ server does not run properly on windows CI machines") @pytest.mark.integration def test_metadata(get_check, instance, datadog_agent): check = get_check(instance) From 00a4b1a88e8e0792d8924069dfa6d696a29a08a2 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Tue, 21 Dec 2021 17:10:12 +0100 Subject: [PATCH 40/44] Undo pipeline changes --- .azure-pipelines/changes.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.azure-pipelines/changes.yml b/.azure-pipelines/changes.yml index d521c9ed8bab3..87b3b7892129c 100644 --- a/.azure-pipelines/changes.yml +++ b/.azure-pipelines/changes.yml @@ -14,25 +14,25 @@ variables: DDEV_COLOR: 1 DD_TRACE_AGENT_PORT: 8127 -# resources: -# containers: -# - ${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}: -# - container: dd_agent -# image: gcr.io/datadoghq/agent:latest -# ports: -# - 8127:8126 -# env: -# DD_API_KEY: $(DD_CI_API_KEY) -# DD_HOSTNAME: "none" -# DD_INSIDE_CI: "true" +resources: + containers: + - ${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}: + - container: dd_agent + image: gcr.io/datadoghq/agent:latest + ports: + - 8127:8126 + env: + DD_API_KEY: $(DD_CI_API_KEY) + DD_HOSTNAME: "none" + DD_INSIDE_CI: "true" jobs: - template: './templates/test-single-linux.yml' parameters: job_name: Changed display: Linux - # ${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}: - # ddtrace_flag: '--ddtrace' + ${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}: + ddtrace_flag: '--ddtrace' validate: false validate_codeowners: false validate_changed: changed @@ -47,8 +47,8 @@ jobs: parameters: job_name: Changed check: '--changed datadog_checks_base datadog_checks_dev active_directory aspdotnet disk dns_check dotnetclr exchange_server ibm_mq iis network pdh_check sqlserver tcp_check win32_event_log windows_performance_counters windows_service wmi_check' - # ${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}: - # ddtrace_flag: '--ddtrace' + ${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}: + ddtrace_flag: '--ddtrace' validate_changed: changed display: Windows pip_cache_config: From c9c174de8cf7230a21d9a6d363b5b3023d6dbb36 Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Tue, 21 Dec 2021 17:10:58 +0100 Subject: [PATCH 41/44] Run tests on py2 too --- ibm_mq/tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/ibm_mq/tox.ini b/ibm_mq/tox.ini index 960fb8075fffb..da8ffd0dc0f49 100644 --- a/ibm_mq/tox.ini +++ b/ibm_mq/tox.ini @@ -26,6 +26,7 @@ dd_mypy_deps = types-mock==0.1.5 platform = linux|darwin + py27-9: linux|darwin|win32 py38-9: linux|darwin|win32 deps = -e../datadog_checks_base[deps] From 2826ca7dcbb0a1845146f96fa374b669eb2df3fe Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Tue, 21 Dec 2021 18:00:53 +0100 Subject: [PATCH 42/44] Do not run py2 on windows --- ibm_mq/tox.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/ibm_mq/tox.ini b/ibm_mq/tox.ini index da8ffd0dc0f49..960fb8075fffb 100644 --- a/ibm_mq/tox.ini +++ b/ibm_mq/tox.ini @@ -26,7 +26,6 @@ dd_mypy_deps = types-mock==0.1.5 platform = linux|darwin - py27-9: linux|darwin|win32 py38-9: linux|darwin|win32 deps = -e../datadog_checks_base[deps] From 26e7911157a9f9682de9378005de576a7da7bf48 Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Wed, 22 Dec 2021 01:38:52 -0500 Subject: [PATCH 43/44] add back support for non-CI Windows --- ibm_mq/tests/common.py | 11 ++++++ ibm_mq/tests/conftest.py | 60 ++++++++++++-------------------- ibm_mq/tests/test_ibm_mq_e2e.py | 9 ++--- ibm_mq/tests/test_ibm_mq_int.py | 10 ++---- ibm_mq/tests/test_ibm_mq_unit.py | 5 +-- ibm_mq/tests/test_metadata.py | 6 ++-- 6 files changed, 44 insertions(+), 57 deletions(-) diff --git a/ibm_mq/tests/common.py b/ibm_mq/tests/common.py index c26d244c318fb..7f659d5373679 100644 --- a/ibm_mq/tests/common.py +++ b/ibm_mq/tests/common.py @@ -4,7 +4,11 @@ import os +import pytest + from datadog_checks.dev import get_docker_hostname +from datadog_checks.dev.ci import running_on_ci +from datadog_checks.dev.utils import ON_WINDOWS # Ignore missing library to not require it for e2e try: @@ -12,6 +16,13 @@ except ImportError: COUNT = GAUGE = '' +RUNNING_ON_WINDOWS_CI = ON_WINDOWS and running_on_ci() +skip_windows_ci = pytest.mark.skipif(RUNNING_ON_WINDOWS_CI, reason='MQ server cannot be setup on Windows VMs in CI') + +# Test that we can at least import the library +if RUNNING_ON_WINDOWS_CI: + import pymqi # noqa: F401 + HERE = os.path.dirname(os.path.abspath(__file__)) COMPOSE_DIR = os.path.join(HERE, 'compose') diff --git a/ibm_mq/tests/conftest.py b/ibm_mq/tests/conftest.py index 0898580605816..7aff4d7696edd 100644 --- a/ibm_mq/tests/conftest.py +++ b/ibm_mq/tests/conftest.py @@ -5,13 +5,11 @@ import logging import os import re -import subprocess import pytest from six.moves import range -from datadog_checks.dev import docker_run, environment_run -from datadog_checks.dev.ci import running_on_ci +from datadog_checks.dev import docker_run from datadog_checks.dev.conditions import CheckDockerLogs, WaitFor from datadog_checks.dev.utils import ON_WINDOWS @@ -140,22 +138,11 @@ def consume(): def prepare_queue_manager(): import pymqi - if ON_WINDOWS: - # https://developer.ibm.com/tutorials/mq-connect-app-queue-manager-windows/ - exe_dir = os.path.join('C:' + os.sep, 'Program Files', 'IBM', 'MQ', 'bin') - subprocess.check_call([os.path.join(exe_dir, 'setmqenv'), '-s'], shell=True) - subprocess.check_call([os.path.join(exe_dir, 'crtmqm'), 'QM1'], shell=True) - subprocess.check_call([os.path.join(exe_dir, 'strmqm'), 'QM1'], shell=True) - qmgr = pymqi.connect(common.QUEUE_MANAGER) - else: - conn_info = '{0}({1})'.format(common.HOST, common.PORT) - qm_name = common.QUEUE_MANAGER.lower() - - qmgr = pymqi.QueueManager(None) - qmgr.connectTCPClient( - common.QUEUE_MANAGER, pymqi.CD(), common.CHANNEL, conn_info, common.USERNAME, common.PASSWORD - ) + conn_info = '{0}({1})'.format(common.HOST, common.PORT) + qm_name = common.QUEUE_MANAGER.lower() + qmgr = pymqi.QueueManager(None) + qmgr.connectTCPClient(common.QUEUE_MANAGER, pymqi.CD(), common.CHANNEL, conn_info, common.USERNAME, common.PASSWORD) pcf = pymqi.PCFExecute(qmgr, response_wait_interval=5000) attrs = [ @@ -209,24 +196,21 @@ def prepare_queue_manager(): @pytest.fixture(scope='session') def dd_environment(): - if ON_WINDOWS and running_on_ci(): - with environment_run(up=lambda: None, down=lambda: None, conditions=[prepare_queue_manager]): - yield common.INSTANCE + + if common.MQ_VERSION == 9: + log_pattern = "AMQ5026I: The listener 'DEV.LISTENER.TCP' has started. ProcessId" + elif common.MQ_VERSION == 8: + log_pattern = r".*QMNAME\({}\)\s*STATUS\(Running\).*".format(common.QUEUE_MANAGER) else: - if common.MQ_VERSION == 9: - log_pattern = "AMQ5026I: The listener 'DEV.LISTENER.TCP' has started. ProcessId" - elif common.MQ_VERSION == 8: - log_pattern = r".*QMNAME\({}\)\s*STATUS\(Running\).*".format(common.QUEUE_MANAGER) - else: - raise RuntimeError('Invalid version: {}'.format(common.MQ_VERSION)) - - e2e_meta = copy.deepcopy(common.E2E_METADATA) - e2e_meta.setdefault('docker_volumes', []) - e2e_meta['docker_volumes'].append("{}:/opt/pki/keys".format(os.path.join(common.HERE, 'keys'))) - - conditions = [CheckDockerLogs('ibm_mq1', log_pattern)] - if not ON_WINDOWS: - conditions.append(WaitFor(prepare_queue_manager)) - - with docker_run(compose_file=common.COMPOSE_FILE_PATH, build=True, conditions=conditions, sleep=10, attempts=2): - yield common.INSTANCE, e2e_meta + raise RuntimeError('Invalid version: {}'.format(common.MQ_VERSION)) + + e2e_meta = copy.deepcopy(common.E2E_METADATA) + e2e_meta.setdefault('docker_volumes', []) + e2e_meta['docker_volumes'].append("{}:/opt/pki/keys".format(os.path.join(common.HERE, 'keys'))) + + conditions = [CheckDockerLogs('ibm_mq1', log_pattern)] + if not ON_WINDOWS: + conditions.append(WaitFor(prepare_queue_manager)) + + with docker_run(compose_file=common.COMPOSE_FILE_PATH, build=True, conditions=conditions, sleep=10, attempts=2): + yield common.INSTANCE, e2e_meta diff --git a/ibm_mq/tests/test_ibm_mq_e2e.py b/ibm_mq/tests/test_ibm_mq_e2e.py index 08f92d772c53f..6c58aedfc9b4a 100644 --- a/ibm_mq/tests/test_ibm_mq_e2e.py +++ b/ibm_mq/tests/test_ibm_mq_e2e.py @@ -4,14 +4,11 @@ import pytest -from datadog_checks.dev.utils import ON_WINDOWS, get_metadata_metrics +from datadog_checks.dev.utils import get_metadata_metrics -from .common import MQ_VERSION, assert_all_metrics +from .common import MQ_VERSION, assert_all_metrics, skip_windows_ci -pytestmark = [ - pytest.mark.skipif(ON_WINDOWS, reason="MQ server does not run properly on windows CI machines"), - pytest.mark.e2e, -] +pytestmark = [skip_windows_ci, pytest.mark.e2e] def test_e2e_check_all(dd_agent_check, instance_collect_all): diff --git a/ibm_mq/tests/test_ibm_mq_int.py b/ibm_mq/tests/test_ibm_mq_int.py index ee2ecc63fc528..f5f8896ac19f5 100644 --- a/ibm_mq/tests/test_ibm_mq_int.py +++ b/ibm_mq/tests/test_ibm_mq_int.py @@ -11,16 +11,12 @@ from datadog_checks.base import AgentCheck from datadog_checks.base.utils.time import ensure_aware_datetime -from datadog_checks.dev.utils import ON_WINDOWS, get_metadata_metrics +from datadog_checks.dev.utils import get_metadata_metrics from . import common -from .common import QUEUE_METRICS, assert_all_metrics +from .common import QUEUE_METRICS, assert_all_metrics, skip_windows_ci -pytestmark = [ - pytest.mark.skipif(ON_WINDOWS, reason="MQ server does not run properly on windows CI machines"), - pytest.mark.usefixtures("dd_environment"), - pytest.mark.integration, -] +pytestmark = [skip_windows_ci, pytest.mark.usefixtures("dd_environment"), pytest.mark.integration] def test_no_msg_errors_are_caught(get_check, instance, caplog): diff --git a/ibm_mq/tests/test_ibm_mq_unit.py b/ibm_mq/tests/test_ibm_mq_unit.py index 298d1d09b5d4e..8830700d1868d 100644 --- a/ibm_mq/tests/test_ibm_mq_unit.py +++ b/ibm_mq/tests/test_ibm_mq_unit.py @@ -6,7 +6,8 @@ from six import iteritems from datadog_checks.base import AgentCheck, ConfigurationError -from datadog_checks.dev.utils import ON_WINDOWS + +from .common import skip_windows_ci pytestmark = pytest.mark.unit @@ -183,7 +184,7 @@ def test_channel_queue_config_error(instance_config): assert 'channel, queue_manager are required configurations' in str(excinfo.value) -@pytest.mark.skipif(ON_WINDOWS, reason="MQ server does not run properly on windows CI machines") +@skip_windows_ci def test_ssl_connection_creation(get_check, instance): """ Test that we are not getting unicode/bytes type error. diff --git a/ibm_mq/tests/test_metadata.py b/ibm_mq/tests/test_metadata.py index 9ebca4058825e..f45adb7458944 100644 --- a/ibm_mq/tests/test_metadata.py +++ b/ibm_mq/tests/test_metadata.py @@ -3,12 +3,10 @@ # Licensed under a 3-clause BSD style license (see LICENSE) import pytest -from datadog_checks.dev.utils import ON_WINDOWS +from .common import MQ_VERSION_RAW, skip_windows_ci -from .common import MQ_VERSION_RAW - -@pytest.mark.skipif(ON_WINDOWS, reason="MQ server does not run properly on windows CI machines") +@skip_windows_ci @pytest.mark.integration def test_metadata(get_check, instance, datadog_agent): check = get_check(instance) From b6dc116586687c247332dc28e89a4ecefc48b58b Mon Sep 17 00:00:00 2001 From: Julia Simon <611228+hithwen@users.noreply.github.com> Date: Wed, 22 Dec 2021 10:06:08 +0100 Subject: [PATCH 44/44] No need to force import on common --- ibm_mq/tests/common.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/ibm_mq/tests/common.py b/ibm_mq/tests/common.py index 7f659d5373679..3c1e0052a993f 100644 --- a/ibm_mq/tests/common.py +++ b/ibm_mq/tests/common.py @@ -19,9 +19,6 @@ RUNNING_ON_WINDOWS_CI = ON_WINDOWS and running_on_ci() skip_windows_ci = pytest.mark.skipif(RUNNING_ON_WINDOWS_CI, reason='MQ server cannot be setup on Windows VMs in CI') -# Test that we can at least import the library -if RUNNING_ON_WINDOWS_CI: - import pymqi # noqa: F401 HERE = os.path.dirname(os.path.abspath(__file__)) COMPOSE_DIR = os.path.join(HERE, 'compose')