This commit is contained in:
Sudheer Salavadi 2024-07-09 22:48:24 +05:30
commit 3d8d2bc467
7 changed files with 11 additions and 18 deletions

View file

@ -1,10 +1,11 @@
from elasticsearch import Elasticsearch
from chalicelib.core import log_tools
import logging
from elasticsearch import Elasticsearch
from chalicelib.core import log_tools
from schemas import schemas
logging.getLogger('elasticsearch').level = logging.ERROR
logger = logging.getLogger(__name__)
IN_TY = "elasticsearch"
@ -63,9 +64,9 @@ def __get_es_client(host, port, api_key_id, api_key, use_ssl=False, timeout=15):
try:
args = {
"hosts": [{"host": host, "port": port, "scheme": scheme}],
"verify_certs": False,
"verify_certs": use_ssl,
"request_timeout": timeout,
"api_key": (api_key_id, api_key)
"api_key": api_key
}
es = Elasticsearch(
**args
@ -76,8 +77,8 @@ def __get_es_client(host, port, api_key_id, api_key, use_ssl=False, timeout=15):
if not r:
return None
except Exception as err:
print("================exception connecting to ES host:")
print(err)
logger.error("================exception connecting to ES host:")
logger.exception(err)
return None
return es

View file

@ -323,7 +323,7 @@ class IntegrationCloudwatchSchema(IntegrationCloudwatchBasicSchema):
class IntegrationElasticsearchTestSchema(IntegrationBase):
host: str = Field(...)
port: int = Field(...)
api_key_id: str = Field(...)
api_key_id: Optional[str] = Field(default=None)
api_key: str = Field(...)

View file

@ -23,4 +23,4 @@ MINIO_SECRET_KEY = ''
# APP and TRACKER VERSIONS
VERSION = 1.19.0
TRACKER_VERSION = '14.0.0'
TRACKER_VERSION = '14.0.1'

Binary file not shown.

View file

@ -22,7 +22,6 @@
"replace-pkg-version": "sh pkgver.sh",
"replace-req-version": "replace-in-files lib/* cjs/* --string='REQUIRED_TRACKER_VERSION' --replacement='13.0.0'",
"prepublishOnly": "bun run test && bun run build",
"prepare": "cd ../../ && husky install tracker/.husky/",
"lint-front": "lint-staged",
"test": "jest --coverage=false",
"test:ci": "jest --coverage=true",
@ -44,7 +43,6 @@
"eslint": "^7.8.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.1",
"jest": "^29.3.1",
"jest-environment-jsdom": "^29.3.1",
"lint-staged": "^13.0.3",
@ -53,11 +51,6 @@
"ts-jest": "^29.0.3",
"typescript": "^4.6.0-dev.20211126"
},
"husky": {
"hooks": {
"pre-commit": "sh lint.sh"
}
},
"lint-staged": {
"*.{js,mjs,cjs,jsx,ts,tsx}": [
"eslint --fix --quiet"

View file

@ -1 +1 @@
export const pkgVersion = '9.0.0'
export const pkgVersion = "9.0.0";

View file

@ -21,7 +21,6 @@
"rollup": "rollup --config rollup.config.js",
"compile": "node --experimental-modules --experimental-json-modules scripts/compile.cjs",
"build": "bun run clean && bun run tscRun && bun run rollup && bun run compile",
"prepare": "cd ../../ && husky install tracker/.husky/",
"lint-front": "lint-staged",
"test": "jest --coverage=false",
"test:ci": "jest --coverage=true",