From 7c49fd5c39ae3abb5d706a8fb2591eebcc592301 Mon Sep 17 00:00:00 2001 From: Jacob Floyd Date: Sat, 12 Jun 2021 16:05:53 -0500 Subject: [PATCH 1/3] pants: Inform pants more precisely about dependence on st2common.conf:base.logging.conf --- st2common/st2common/conf/BUILD | 4 ++++ st2common/st2common/conf/__init__.py | 18 ++++++++++++++++++ st2common/st2common/constants/BUILD | 6 +----- st2common/st2common/constants/logging.py | 7 +------ 4 files changed, 24 insertions(+), 11 deletions(-) create mode 100644 st2common/st2common/conf/__init__.py diff --git a/st2common/st2common/conf/BUILD b/st2common/st2common/conf/BUILD index 3b89b94788..f21b91df2b 100644 --- a/st2common/st2common/conf/BUILD +++ b/st2common/st2common/conf/BUILD @@ -3,3 +3,7 @@ resource( name="base.logging.conf", source="base.logging.conf", ) + +python_sources( + dependencies=[":base.logging.conf"], +) diff --git a/st2common/st2common/conf/__init__.py b/st2common/st2common/conf/__init__.py new file mode 100644 index 0000000000..6ce122f340 --- /dev/null +++ b/st2common/st2common/conf/__init__.py @@ -0,0 +1,18 @@ +# Copyright 2021 The StackStorm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os + +CONF_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__))) +BASE_LOGGING_CONF_PATH = os.path.join(CONF_DIR, "base.logging.conf") diff --git a/st2common/st2common/constants/BUILD b/st2common/st2common/constants/BUILD index f0ac5efd12..db46e8d6c9 100644 --- a/st2common/st2common/constants/BUILD +++ b/st2common/st2common/constants/BUILD @@ -1,5 +1 @@ -python_sources( - dependencies=[ - "st2common/st2common/conf:base.logging.conf", - ] -) +python_sources() diff --git a/st2common/st2common/constants/logging.py b/st2common/st2common/constants/logging.py index 0985a03947..1db8f721a5 100644 --- a/st2common/st2common/constants/logging.py +++ b/st2common/st2common/constants/logging.py @@ -14,11 +14,6 @@ # limitations under the License. from __future__ import absolute_import -import os +from st2common.conf import BASE_LOGGING_CONF_PATH as DEFAULT_LOGGING_CONF_PATH __all__ = ["DEFAULT_LOGGING_CONF_PATH"] - -BASE_PATH = os.path.dirname(os.path.abspath(__file__)) - -DEFAULT_LOGGING_CONF_PATH = os.path.join(BASE_PATH, "../conf/base.logging.conf") -DEFAULT_LOGGING_CONF_PATH = os.path.abspath(DEFAULT_LOGGING_CONF_PATH) From 60c7d9bf8338d5c74c5735d3c2ecbd23193bef3b Mon Sep 17 00:00:00 2001 From: Jacob Floyd Date: Thu, 5 Jan 2023 00:09:11 -0600 Subject: [PATCH 2/3] update changelog entry --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e14c784128..d29c3e8b17 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,7 +14,7 @@ Added working on StackStorm, improve our security posture, and improve CI reliability thanks in part to pants' use of PEX lockfiles. This is not a user-facing addition. #5778 #5789 #5817 #5795 #5830 #5833 #5834 #5841 #5840 #5838 #5842 #5837 #5849 #5850 - #5846 #5853 #5848 + #5846 #5853 #5848 #5858 Contributed by @cognifloyd * Added a joint index to solve the problem of slow mongo queries for scheduled executions. #5805 From f5caa0062be7f8f450359fa33c4ec5f88407ef3c Mon Sep 17 00:00:00 2001 From: Jacob Floyd Date: Thu, 5 Jan 2023 11:05:07 -0600 Subject: [PATCH 3/3] update copyright to 2023 in st2common/st2common/conf/__init__.py --- st2common/st2common/conf/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st2common/st2common/conf/__init__.py b/st2common/st2common/conf/__init__.py index 6ce122f340..02dee96c31 100644 --- a/st2common/st2common/conf/__init__.py +++ b/st2common/st2common/conf/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2021 The StackStorm Authors. +# Copyright 2023 The StackStorm Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.