Skip to content

Conversation

@michael-johnston
Copy link
Member

@michael-johnston michael-johnston commented Nov 13, 2025

This PR moves parts of the orchestrate module into four private modules. It does not change any code.

The aim is to separate concerns in order to enhance maintainability.

It is necessary in order to address #200 effectively (ensure consistent shutdown behaviour including signal handling, actor cleanup etc, with nested operations).

orchestrate remains the main entry point to operation orchestration functions. The private modules are

  • _clean_up: contains ResourceCleaner and base shutdown handler/shutdown function
  • _orchestrate_core: contains the core logic common to orchestrating all operations
  • _general_orchestration: contains the additional logic required for all operations that are not explore operations
  • _explore_orchestration: contains the additional logic required for explore operations (these write to the sample store which requires special setup)

The refactoring moves general/explore orchestration function to private modules for clarity.

However we don't want to expose this private modules external - want to keep the access point orchestrate.py
orchestrate_explore_operation
…operation

# Conflicts:
#	.secrets.baseline
#	orchestrator/modules/operators/orchestrate.py
@michael-johnston
Copy link
Member Author

@AlessandroPomponio Need this merged relatively quickly as it moves code. This means any other PRs needed to modify this code should work using the new locations.

@DRL-NextGen
Copy link
Member

DRL-NextGen commented Nov 13, 2025

Checks Summary

Last run: 2025-11-13T19:56:05.506Z

Code Risk Analyzer vulnerability scan found 2 vulnerabilities:

Severity Identifier Package Details Fix
🔷Medium CVE-2025-50181 urllib3
urllib3 redirects are not disabled when retries are disabled on PoolManager instantiationGHSA-pq67-6m6q-mj2v

urllib3:2.3.0->kubernetes:34.1.0
2.5.0
🔷Medium CVE-2025-50182 urllib3
urllib3 does not control redirects in browsers and Node.jsGHSA-48p4-8xcf-vxj5

urllib3:2.3.0->kubernetes:34.1.0
2.5.0

@AlessandroPomponio AlessandroPomponio changed the title refactor: split orchestrate refactor(core): split orchestrate into submodules Nov 13, 2025
@AlessandroPomponio AlessandroPomponio added this pull request to the merge queue Nov 13, 2025
Merged via the queue into main with commit 730ea4b Nov 13, 2025
18 checks passed
@AlessandroPomponio AlessandroPomponio deleted the maj_fix_operation_in_operation branch November 13, 2025 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants