Skip to content

Conversation

@chrisburr
Copy link
Member

@chrisburr chrisburr commented Aug 24, 2025

Description

This PR extracts stateless utilities from DIRAC into a new DIRACCommon package to resolve circular dependency issues between DIRAC and DiracX. DIRACCommon contains only stateless utilities (ReturnValues, DErrno) that can be safely imported without triggering DIRAC's global state initialization.

The package is co-released with DIRAC and shares its version number.

Note: This PR requires DIRACGrid/Pilot#265 to be merged first.

Fixes #8285

BEGINRELEASENOTES
*Core
NEW: DIRACCommon package containing stateless utilities extracted from DIRAC. This allows external projects like DiracX to use DIRAC's S_OK/S_ERROR return values and error codes without importing DIRAC and triggering global state initialization. The package maintains full backward compatibility - all existing imports continue to work unchanged.
ENDRELEASENOTES

@chrisburr chrisburr force-pushed the dirac-common branch 10 times, most recently from 6b5225c to 784842e Compare August 25, 2025 11:27
@chaen
Copy link
Contributor

chaen commented Aug 25, 2025

note for myself when reviewing: integration-tests.py should install DIRACCommon in editable mode

CLIENT_UPLOAD_LFN: LFN:/vo/test_lfn.txt
CLIENT_UPLOAD_FILE: test_lfn.txt
PILOT_INSTALLATION_COMMAND: dirac-pilot.py --modules /home/dirac/LocalRepo/ALTERNATIVE_MODULES/DIRAC -M 2 -N jenkins.cern.ch -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch --pilotUUID=whatever12345 --CVMFS_locations=/home/dirac/ -o diracInstallOnly --wnVO=vo --debug
PILOT_INSTALLATION_COMMAND: dirac-pilot.py --modules /home/dirac/LocalRepo/ALTERNATIVE_MODULES/DIRAC/dirac-common,/home/dirac/LocalRepo/ALTERNATIVE_MODULES/DIRAC -M 2 -N jenkins.cern.ch -Q jenkins-queue_not_important -n DIRAC.Jenkins.ch --pilotUUID=whatever12345 --CVMFS_locations=/home/dirac/ -o diracInstallOnly --wnVO=vo --debug
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same file needs to be changed also in LHCbDIRAC

@fstagni
Copy link
Contributor

fstagni commented Aug 26, 2025

What is the reason for releasing DIRACCommon every time there's a DIRAC release?

@chrisburr chrisburr marked this pull request as ready for review August 28, 2025 10:52
@chrisburr chrisburr force-pushed the dirac-common branch 2 times, most recently from 1b7a847 to c0c3465 Compare August 28, 2025 10:55
Extract ReturnValues and DErrno to separate DIRACCommon package to solve
circular dependencies where DiracX needs DIRAC utilities without global
state initialization.

- Create DIRACCommon package with stateless utilities
- Maintain backward compatibility in original DIRAC locations
- Add independent testing and CI workflows
- Configure automated deployment for both packages

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@chaen chaen merged commit 6cd1339 into DIRACGrid:integration Aug 29, 2025
43 of 46 checks passed
@DIRACGridBot DIRACGridBot added the sweep:ignore Prevent sweeping from being ran for this PR label Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sweep:ignore Prevent sweeping from being ran for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add DIRACCommon

4 participants