Upgrade API version to 2.22

This commit is contained in:
allegroai 2022-11-29 17:29:57 +02:00
parent 3451ff441f
commit 37e485e1f2
2 changed files with 9 additions and 9 deletions

View File

@ -29,9 +29,10 @@ OVERRIDE_PORT_ENV_KEY = (
) )
OVERRIDE_CONNECTION_STRING_ENV_KEY = "CLEARML_MONGODB_SERVICE_CONNECTION_STRING" OVERRIDE_CONNECTION_STRING_ENV_KEY = "CLEARML_MONGODB_SERVICE_CONNECTION_STRING"
OVERRIDE_MONGO_USERNAME_ENV_KEY = "CLEARML_MONGODB_SERVICE_USERNAME" OVERRIDE_USERNAME_ENV_KEY = "CLEARML_MONGODB_SERVICE_USERNAME"
OVERRIDE_MONGO_PASSWORD_ENV_KEY = "CLEARML_MONGODB_SERVICE_PASSWORD" OVERRIDE_PASSWORD_ENV_KEY = "CLEARML_MONGODB_SERVICE_PASSWORD"
OVERRIDE_MONGO_QUERY_ENV_KEY = "CLEARML_MONGODB_SERVICE_QUERY" OVERRIDE_QUERY_ENV_KEY = "CLEARML_MONGODB_SERVICE_QUERY"
class DatabaseEntry(models.Base): class DatabaseEntry(models.Base):
host = StringField(required=True) host = StringField(required=True)
@ -54,10 +55,9 @@ class DatabaseFactory:
override_connection_string = getenv(OVERRIDE_CONNECTION_STRING_ENV_KEY) override_connection_string = getenv(OVERRIDE_CONNECTION_STRING_ENV_KEY)
override_hostname = first(map(getenv, OVERRIDE_HOST_ENV_KEY), None) override_hostname = first(map(getenv, OVERRIDE_HOST_ENV_KEY), None)
override_port = first(map(getenv, OVERRIDE_PORT_ENV_KEY), None) override_port = first(map(getenv, OVERRIDE_PORT_ENV_KEY), None)
override_username = getenv(OVERRIDE_MONGO_USERNAME_ENV_KEY) override_username = getenv(OVERRIDE_USERNAME_ENV_KEY)
override_password = getenv(OVERRIDE_MONGO_PASSWORD_ENV_KEY) override_password = getenv(OVERRIDE_PASSWORD_ENV_KEY)
override_query = getenv(OVERRIDE_MONGO_QUERY_ENV_KEY) override_query = getenv(OVERRIDE_QUERY_ENV_KEY)
if override_connection_string: if override_connection_string:
log.info(f"Using override mongodb connection string template {override_connection_string}") log.info(f"Using override mongodb connection string template {override_connection_string}")
@ -69,7 +69,7 @@ class DatabaseFactory:
if override_username: if override_username:
log.info(f"Using override mongodb username {override_username}") log.info(f"Using override mongodb username {override_username}")
if override_password: if override_password:
log.info(f"Using override mongodb password xxxxxx") log.info(f"Using override mongodb password ******")
if override_query: if override_query:
log.info(f"Using override mongodb query {override_query}") log.info(f"Using override mongodb query {override_query}")

View File

@ -39,7 +39,7 @@ class ServiceRepo(object):
"""If the check is set, parsing will fail for endpoint request with the version that is grater than the current """If the check is set, parsing will fail for endpoint request with the version that is grater than the current
maximum """ maximum """
_max_version = PartialVersion("2.21") _max_version = PartialVersion("2.22")
""" Maximum version number (the highest min_version value across all endpoints) """ """ Maximum version number (the highest min_version value across all endpoints) """
_endpoint_exp = ( _endpoint_exp = (