DiracX WP: Transformation System

→ Europe/Zurich
2/R-014 (CERN)

2/R-014

CERN

10
Show room on map
Description

Discussions around the Transformation System: https://codimd.web.cern.ch/SVAX3vHySq6mhbufbp87iQ

Zoom Meeting ID
62504856418
Host
Federico Stagni
Useful links
Join via phone
Zoom URL

# Transformation System: planning meeting, 13 Nov 2026


[TOC]

**Links**
- Epic: [#1092 Transformation System](https://github.com/DIRACGrid/diracx/issues/1092)
- Deliverable 1: [#1081](https://github.com/DIRACGrid/diracx/issues/1081)
- Project board: [DIRAC development planning](https://github.com/orgs/DIRACGrid/projects/30)
- Previous meetings: 30 Oct, 6 Nov 2026

## Goals & Rules

### Goals

1. Deliverable 1: what is left, who acts next. **(10 min)**
2. Deliverable 1: the remaining design decisions. **(10 min)**
3. **Deliverable 2: decide its scope, its issues and their owners.** **(30 min)**

Issues are written **after** the meeting, from this document.

### Rules of the meeting

- **Timeboxes are strict.** The facilitator may stop a discussion. That does not mean it is unimportant: it goes to the [Parking lot](#Parking-lot) with an owner.
- **Decisions here, details in issues.** We decide *what* and *who*; *how* goes into the issue or the PR.
- **Write in this document freely** in the sections marked ✍️.
- **A decision is taken when nobody has an objection they cannot live with.** If we cannot decide in the timebox, the question becomes a short experiment (spike), with an owner and a date.
- **No blame.** We look at how we work, not at who did what.

## 1. Deliverable 1

**Goal ([#1081](https://github.com/DIRACGrid/diracx/issues/1081)):** process a basic workgraph made of a single transformation, in the diracx-charts dev environment.

**"Done" (proposal):** in the diracx-charts dev environment, submit a workgraph with one transformation → the feeder creates N inputs → the packer makes parcels → the dummy backend runs them → N inputs `Processed`, N parcels `Done`. (Counters were not part of D1's goal: they move to D2, see D2-7.)

**Board**: https://github.com/orgs/DIRACGrid/projects/30/views/13

### Where the stacked PRs are (13 Nov)

| Issue | Merged | Waiting for review | Draft / stuck |
|---|---|---|---|
| Feeder [#1082](https://github.com/DIRACGrid/diracx/issues/1082) | [#1144](https://github.com/DIRACGrid/diracx/pull/1144), [#1145](https://github.com/DIRACGrid/diracx/pull/1145) (10 Nov) | [#1146](https://github.com/DIRACGrid/diracx/pull/1146) (ready 11 Nov, **conflicts**) | [#1147](https://github.com/DIRACGrid/diracx/pull/1147) tasks: no push since 30 Oct, written against the old API; [#1148](https://github.com/DIRACGrid/diracx/pull/1148) docs |
| Packer [#1083](https://github.com/DIRACGrid/diracx/issues/1083) | [#1149](https://github.com/DIRACGrid/diracx/pull/1149), [#1150](https://github.com/DIRACGrid/diracx/pull/1150), [#1151](https://github.com/DIRACGrid/diracx/pull/1151) (12 Nov), [#1170](https://github.com/DIRACGrid/diracx/pull/1170) (11 Nov) | | [#1152](https://github.com/DIRACGrid/diracx/pull/1152) logic: changes requested 4 Nov, no push since 5 Nov; [#1153](https://github.com/DIRACGrid/diracx/pull/1153) tasks: no push since 3 Nov |
| Plugin contract [#1179](https://github.com/DIRACGrid/diracx/issues/1179) | | | [#1186](https://github.com/DIRACGrid/diracx/pull/1186) draft, WIP (Alan) |
| Counters [#1085](https://github.com/DIRACGrid/diracx/issues/1085) | | [#1164](https://github.com/DIRACGrid/diracx/pull/1164) (ready 12 Nov; Chris's "changes requested" still on it) | question to Chris unanswered, see decision E |
| CWL [#1080](https://github.com/DIRACGrid/diracx/issues/1080) | | | [#1114](https://github.com/DIRACGrid/diracx/pull/1114) draft: changes requested by Alexandre (duplicate / missing `$graph` ids, 6 Nov), comments by Alan (9 Nov); no push since 4 Nov |
| Chunked `IN` lists (core) | | | [#1176](https://github.com/DIRACGrid/diracx/pull/1176) (Chris) changes requested: deadlock with unsorted chunks |
| Submit [#1086](https://github.com/DIRACGrid/diracx/issues/1086) | | | no PR |
| [charts#305](https://github.com/DIRACGrid/diracx-charts/issues/305) TransformationDB | [charts#315](https://github.com/DIRACGrid/diracx-charts/pull/315) | [charts#321](https://github.com/DIRACGrid/diracx-charts/pull/321) distinct MySQL name (pkontaxa) | |

**What blocks D1 "done":** the two task PRs (#1147 feeder, #1153 packer), the packer logic (#1152), and a way to submit (#1086, or a seeded workgraph as in the 12 Nov DOps demo).

### Design decisions (Deliverable 1)

**Refinement:**

- [Clean up entrypoint naming](https://github.com/DIRACGrid/diracx/issues/1171) -> backlog
- [TrivialPacker](https://github.com/DIRACGrid/diracx/issues/1140) -> backlog
- [Feeder & Packer protocols?](https://github.com/DIRACGrid/diracx/issues/1179) -> backlog
- [Common base class for feeder and packer inputs?](https://github.com/DIRACGrid/diracx/issues/1168) -> backlog
- [SharedRWLock never expires](https://github.com/DIRACGrid/diracx/issues/1142)
  - Needed for D1? Only once pause/finalise exist, so it could be D2 or later.
  - Decision: owner of #1142:   in D1 / D2 / later
- [ADR editing](https://github.com/DIRACGrid/diracx/issues/1180)

- **One transaction convention for feeder and packer** ([#1152](https://github.com/DIRACGrid/diracx/pull/1152#discussion_r4469088167), [#1146](https://github.com/DIRACGrid/diracx/pull/1146))
  - The feeder (#1146) already uses the pattern Chris asked for: no transaction from the task, one `async with db` per batch. The packer (#1152) still commits by hand.
  - Decision: the packer follows the feeder's pattern? yes / no. Owner: Marco

- **Counters journal vs DX-ADR-009** ([#1164](https://github.com/DIRACGrid/diracx/pull/1164#issuecomment-6776170605))
  - Chris suggested `INSERT … SELECT` for `rebuild()`. DX-ADR-009 forbids it for journal writes (AUTO-INC table lock). Quinn proposes streaming the corrections and writing them with `executemany` in chunks.
  - Decision: Chris to answer on #1164 by end of the day (?)


## 2. Deliverable 2 (2–3 sprints)

**Frame:** a workgraph with at least two transformations, where the outputs of the first feed the second (e.g. MCSimulation → MCReconstruction from [#1080](https://github.com/DIRACGrid/diracx/issues/1080)).

### Proposed D2 flow

Full picture (D1 vs D2, one lane per package, colour-coded): Excalidraw board `d1-d2-architecture.excalidraw`.


### Where we stand (fill in during the meeting)

- **Agreed** (from the homework and the threads, to confirm in the room)
  - A finished parcel reports back and the server records its outputs; in D2 the dummy backend produces that report.
  - No real job wrapper inside DiracX in D2; the job-wrapper contract becomes an ADR. Push and pull are both needed.
  - EdgeFeeder + workgraphs with several transformations are the core of D2 (Alan, Marco).
  - The counters must be finished (Marco).
- **Disagreed / to settle**
  - Where the demo stops: T2 inputs (Federico), T2 parcels (Alan), T2 runs and produces an output (Marco), T2 reads the content of its inputs (Quinn).
  - Real CWL in D2 (D2-2): Alan's answer puts "any job runtime code" out of scope; Quinn's goal needs it.
  - Who turns a parcel's outputs into T2's inputs (D2-2): a VO-specific "backfeeder" (Federico) vs the edge feeder of ADR-006 reading `ParcelOutputs`.
- **Open / not discussed yet**
  - Search and status endpoints (D2-9): no feedback yet.
  - Hooks (workgraph / transformation active), suggested by Marco.
  - Real input data at the first feeder (Alan) and a Rucio ADR (Marco).

### Decisions for D2

#### D2-1 · Real execution
- **Proposal:** Do we execute parcels with `cwltool`?
- **Outcome:**
    - [name=Christophe] I am afraid getting a lot of "toys"
    - [name=Christophe] The dummy compute backend has a hardcoded path, we assume outputs exist and there is not catalog aspect
    - It does not matter -> yes

 

#### D2-2 · Outcomes handled
- **Proposal:** cwltool exits 0 → every input `SUCCESS`. Anything else → the parcel goes to `Failed` and records no files (ADR-003). `SPLIT`, `NOT_TRIED`, recovery parcels: later.
- **Outcome:**
    - OK with just SUCCESS/FAILED


#### D2-3 · Where the files go?
- **Proposal:** a dedicated S3 bucket acting as a storage element? Output sandboxes on S3?
- **Outcome:**
    - A directory, that is known by the dummy compute backend, and the feeder

#### D2-5 · Counters usage
- **Proposal:** counters usage were not part of D1's goal. Every existing write site (`TODO(#1085)`) records its counter change, and every new D2 writer does it from the start.
- **Outcome:**
    - YES

#### D2-6 · Users can follow transformations
- **Proposal:** D1 has no status interface. D2 adds `POST /api/transformations/search` and `/summary`, built like the job and pilot ones on the generic `_search` / `_summary` of `diracx-db` (#1165), plus each transformation's progress per status from the counters.
- **Outcome:**
    - NICE TO HAVE (NOT A MUST)


### D2 issues (DRAFT to adjust and rediscuss next week) - ✍️ Feel free to add comments (and DoD) with your name

What we should have at the end of D1:
![](https://codimd.web.cern.ch/uploads/upload_a388d8dfd8a1dad1ba52669786b1fdba.png)

**"JobWrapper" equivalent**

  - ADR: job wrapper ↔ backend contract

**Feeding T2 from T1's outputs**

  - **A1** Read a transformation output's files after a bookmark (db)
  - **A2** EdgeFeeder plugin (logic, needs A1, #1146)
  - **A4** Record a parcel's output files (db)
  - **A5** Complete a compute parcel with its output files (logic, needs A4)

**Counters**

  - **C1** Record counter changes on every input and parcel transition (db, needs #1164)

**Real CWL processes** (in the experimental dummy backend)

  - **B1** Fixed output place: one S3 bucket, key = `<transformation>/<parcel>/<output>/<file>` (core)
  - **B2** Run a parcel's packed CWL process with cwltool (tasks, needs B1)
  - **B3** Upload the outputs to the fixed place and complete the parcel (tasks, needs B2, A5)
  - **B4** Dummy backend CWL in the demo image (tasks + image, needs B3)
  - **B5** Chain test with two real CWL processes = **D2 done** (test, needs A2, B3, #1152)

**Search and status (NICE TO HAVE)**

  - **R1** `TransformationDB.search()` / `summary()` (db)
  - **R2** `POST /api/transformations/search` and `/summary` (routers + logic, needs R1)
  - **R3** Progress per status from the counters (logic + routers, needs R2, C1)
  - **R4** CLI `dirac transformations search / summary` (cli, needs R2)


### Homework answers

- **Name:** Alan Malta Rodrigues
  - Goal: having compute parcels created for T2
  - Q2: job returns a job report, which is parsed by a diracx task and injected into the database
  - Q3: I'd say any job runtime code (but then we need to mock job execution/report in order to feed T2)
  - Q4: maybe two concerns at the moment (a) how to deal with real input data at the feeder level (in terms of ingesting Inputs) and (b) boundaries between the pilot and job wrapper systems
  - Issues and DoD: having a functional edge feeder; properly ingesting multi-transformation workgraph; having the Feeder and Packer defined in the workgraph also available in DiracX

- **Name:** Federico
  - Goal: one or more of T2's Transformation Inputs are created for every T1's parcel finishing successfully
  - Q2: when a parcel ends successfully it POST a job report decument that a component interprets. Such component might be VO specific -- maybe a new concept, "backfeeder"?
  - Q3: IDK
  - Q4: the absence of job wrapper "contract", call it ADR if you want
  - Issues and DoD:

- **Name:** Marco
  - Goal: CWL with two transformation, one "trivial feeder(what was the name?)" that puts 4 inputs, one edge feeder, FixedSize:2 for both packers, only one output is produced.
  - Q2: DummyJobBackend sweep recurring task could put two tasks per parcel. First immediate task sets parcel to acquired. Second delayed task simulates job completion and records outputs.
  - Q3: Edge feeder and chained transformations are the bare minimum. A few hooks (workgraph and transformation active?) might be really useful! Need to finish counters implementation (left as a TODO in packer)
  - Q4: Speed gap between code development time, and code review time. Also, missing ADRs (job wrapper and Rucio integration)
  - Issues and DoD:

- **Name:** Quinn
  - Goal: creating a T2 parcel from the output of T1 parcels that just reads the content of the inputs
  - Q2:
  - Q3:
  - Q4:
  - Issues and DoD:

## Parking lot

✍️ Anything important that is not for today. Add an owner and a next step (issue, ddev meeting, next planning).

| Topic | Raised by | Owner | Next step |
|---|---|---|---|
| Shared interface to load the packer/feeder plugins | Alan | Alexandre | Now [#1179](https://github.com/DIRACGrid/diracx/issues/1179) / [#1186](https://github.com/DIRACGrid/diracx/pull/1186), see decision F |
| [#1165](https://github.com/DIRACGrid/diracx/issues/1165) reuse generic `search`/`summary` in TransformationDB | Alexandre | | Follow-up after D1 once we have the diracx-db layer set up |
| [#1185](https://github.com/DIRACGrid/diracx/issues/1185) FixedSize proposing `DataParcel`s | chaen | Marco | After data transformations are supported |
| | | | |

## Actions

| What | Who | When |
| ---- | --- | ---- |
|      |     |      |
|      |     |      |
|      |     |      |
|      |     |      |


## AOB 

CMS might not be able to attend the next ddev meeting

There are minutes attached to this event. Show them.
The agenda of this meeting is empty