From a0c88ebac4fb84a4ad9b3d3416dede865311a3ae Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Mon, 4 Nov 2024 11:49:57 +0100 Subject: [PATCH 1/2] sweep: #7869 fix: from mambaforge to miniforge --- .github/workflows/basic.yml | 2 +- .github/workflows/cvmfs.yml | 4 +--- .github/workflows/deployment.yml | 4 +--- .readthedocs.yaml | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index f64d5e700db..c78f5d98d52 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -77,7 +77,7 @@ jobs: - uses: actions/checkout@v4 - name: Fail-fast for outdated pipelines run: .github/workflows/fail-fast.sh - - uses: mamba-org/setup-micromamba@v2 + - uses: conda-incubator/setup-miniconda@v3 with: environment-file: environment.yml diff --git a/.github/workflows/cvmfs.yml b/.github/workflows/cvmfs.yml index 2242598fefb..6f7b6c99cad 100644 --- a/.github/workflows/cvmfs.yml +++ b/.github/workflows/cvmfs.yml @@ -7,10 +7,8 @@ jobs: deploy_CVMFS: runs-on: "ubuntu-latest" steps: - - uses: mamba-org/setup-micromamba@v2 + - uses: conda-incubator/setup-miniconda@v3 with: - - mamba-version: "*" channels: conda-forge,defaults channel-priority: true - name: Deploy on CVMFS diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index b0733674ad0..b78a8cbc55d 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -132,10 +132,8 @@ jobs: if: github.event_name == 'workflow_dispatch' needs: deploy-pypi steps: - - uses: mamba-org/setup-micromamba@v2 + - uses: conda-incubator/setup-miniconda@v3 with: - - mamba-version: "*" channels: conda-forge,defaults channel-priority: true - name: Deploy on CVMFS diff --git a/.readthedocs.yaml b/.readthedocs.yaml index f841c92ea04..63d30735921 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,6 +1,6 @@ version: 2 build: - os: ubuntu-20.04 + os: ubuntu-24.04 tools: python: mambaforge-4.10 sphinx: From a6f2751b3b4719a1d64ca4b94e4b852c0011bb07 Mon Sep 17 00:00:00 2001 From: Chris Burr Date: Wed, 6 Nov 2024 16:20:22 +0100 Subject: [PATCH 2/2] sweep: #7875 Remove lock in Logging._createLogRecord --- .../private/standardLogging/Logging.py | 50 ++++++++----------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/src/DIRAC/FrameworkSystem/private/standardLogging/Logging.py b/src/DIRAC/FrameworkSystem/private/standardLogging/Logging.py index b8bd3e0b989..71ea6002866 100644 --- a/src/DIRAC/FrameworkSystem/private/standardLogging/Logging.py +++ b/src/DIRAC/FrameworkSystem/private/standardLogging/Logging.py @@ -383,37 +383,31 @@ def _createLogRecord( :return: boolean representing the result of the log record creation """ + # exc_info is only for exception to add the stack trace + + # extra is a way to add extra attributes to the log record: + # - 'componentname': the system/component name + # - 'varmessage': the variable message + # - 'customname' : the name of the logger for the DIRAC usage: without 'root' and separated with '/' + # as log records, extras attributes are not camel case + extra = { + "componentname": self._componentName, + "varmessage": str(sVarMsg), + "spacer": "" if not sVarMsg else " ", + "customname": self._customName, + } - # lock to prevent a level change after that the log is sent. - self._lockLevel.acquire() - try: - # exc_info is only for exception to add the stack trace - - # extra is a way to add extra attributes to the log record: - # - 'componentname': the system/component name - # - 'varmessage': the variable message - # - 'customname' : the name of the logger for the DIRAC usage: without 'root' and separated with '/' - # as log records, extras attributes are not camel case - extra = { - "componentname": self._componentName, - "varmessage": str(sVarMsg), - "spacer": "" if not sVarMsg else " ", - "customname": self._customName, - } - - # options such as headers and threadIDs also depend on the logger, we have to add them to extra - extra.update(self._options) + # options such as headers and threadIDs also depend on the logger, we have to add them to extra + extra.update(self._options) - # This typically contains local custom names - if local_context: - extra.update(local_context) + # This typically contains local custom names + if local_context: + extra.update(local_context) - self._logger.log(level, "%s", sMsg, exc_info=exc_info, extra=extra) - # check whether the message is displayed - isSent = LogLevels.getLevelValue(self.getLevel()) <= level - return isSent - finally: - self._lockLevel.release() + self._logger.log(level, "%s", sMsg, exc_info=exc_info, extra=extra) + # check whether the message is displayed + isSent = LogLevels.getLevelValue(self.getLevel()) <= level + return isSent def showStack(self) -> bool: """