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, 6 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 meeting: 30 Oct 2026


> chris
whether we want to push or pull the job report: we want to do both
> alexandre
we can have a proof of concept of the equivalent of the job wrapper (not something that should end up in diracx) + the ADR based on requirements we give

## Goals & Rules

### Goals

1. Where each stacked PR stands, and who acts next. **(10 min)**
2. Give owners to the open design questions. **(10 min)**
3. Deliverable 2: collect the missing answers, list what we agree on. **(10 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.

## Agenda (30 min)

| Time | Topic |
|---|---|
| 0–10 | Deliverable 1: where the stacked PRs are |
| 10–20 | Deliverable 1: owners for the open design decisions |
| 20–30 | Deliverable 2: missing answers, agreements, disagreements |

## 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 → the counters show N done.

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

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

All stacked PRs target `main`, so each later PR's diff also contains the earlier ones.

| 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) (Chris to re-review) | [#1146](https://github.com/DIRACGrid/diracx/pull/1146) (conflicts, rebase after #1145), [#1147](https://github.com/DIRACGrid/diracx/pull/1147) (settings-doc-check failing), [#1148](https://github.com/DIRACGrid/diracx/pull/1148) |
| 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) | [#1170](https://github.com/DIRACGrid/diracx/pull/1170) (Chris's fix-up) | [#1151](https://github.com/DIRACGrid/diracx/pull/1151); [#1152](https://github.com/DIRACGrid/diracx/pull/1152) changes requested 4 Nov, no reply; [#1153](https://github.com/DIRACGrid/diracx/pull/1153) two review-bot points unanswered |
| Counters [#1085](https://github.com/DIRACGrid/diracx/issues/1085) | none | none | [#1164](https://github.com/DIRACGrid/diracx/pull/1164) changes requested 4 Nov, no push since 3 Nov |
| CWL [#1080](https://github.com/DIRACGrid/diracx/issues/1080) | none | [#1114](https://github.com/DIRACGrid/diracx/pull/1114) (now uses `cwltool --pack`, Chris to re-review) | |
| Dummy backend [#1084](https://github.com/DIRACGrid/diracx/issues/1084) | [#1130](https://github.com/DIRACGrid/diracx/pull/1130) (+ diracx-charts #315) | | |
| Submit [#1086](https://github.com/DIRACGrid/diracx/issues/1086) | | | no PR |
| [charts#305](https://github.com/DIRACGrid/diracx-charts/issues/305) TransformationDB | | | no PR; **"done" cannot happen in diracx-charts without it** |

### Architecture: who reads and writes what

```mermaid
flowchart LR
  subgraph SUB["Submission (diracx-routers + diracx-logic)"]
    submit["Submit a workgraph<br/>#1086"]
    ingest["CWL ingestion<br/>#1080"]
  end

  subgraph TASKS["diracx-tasks: periodic tasks, each *_ENABLED, off by default"]
    feeder["Feeder task<br/>#1082<br/>lock: feeder mutex + shared status lock"]
    packer["Packer task<br/>#1083<br/>lock: packer mutex + shared status lock"]
    monitor["Dummy backend monitor<br/>#1130 (merged)"]
    complete["Dummy completion task<br/>one per parcel"]
  end

  subgraph PLUGINS["Plugins propose, the core writes"]
    fplug["Feeder plugin<br/>yields Input, SetFeederState, NoMoreInputs"]
    pplug["Packer plugin: Trivial / FixedSize<br/>yields ComputeParcel, BadInput, DelayInput"]
  end

  subgraph DB["TransformationDB"]
    tr[("Transformations<br/>Status, Feeder, FeederArgs,<br/>FeederState, FeederEnabled,<br/>Packer, PackerArgs")]
    ct[("ComputeTransformations<br/>ProcessID, RequirementsTemplateID")]
    proc[("Processes")]
    req[("RequirementsTemplates")]
    inp[("Inputs<br/>Unassigned → Assigned → Processed")]
    par[("Parcels + ComputeParcels + ParcelInputs<br/>Unassigned → Reserved → Assigned<br/>→ Completing → Done")]
    cnt[("Counters journal<br/>#1085")]
  end

  submit -- "store process" --> ingest --> proc
  submit -- "workgraph and transformation rows" --> tr
  submit --> ct
  ct -.-> proc
  ct -.-> req

  feeder -- "1. read config and state" --> tr
  feeder --- fplug
  feeder -- "2. insert Unassigned, dedup by hash" --> inp
  feeder -- "save state, disable when no more inputs" --> tr

  packer -- "3. claim Unassigned, SKIP LOCKED" --> inp
  packer --- pplug
  packer -- "4. create parcels, inputs → Assigned" --> par
  packer -- "merged requirements" --> req

  monitor -- "5. claim Unassigned parcels, Backend = dummy" --> par
  monitor -- "schedule" --> complete
  complete -- "6. → Done, inputs → Processed" --> par

  feeder -. "journal" .-> cnt
  packer -. "journal" .-> cnt
  complete -. "journal" .-> cnt
```

### Design decisions (Deliverable 1)

**Decided in review, recorded:**
- Hashing: SHA-256 over RFC 8785 canonical JSON, no xxhash: [#1154](https://github.com/DIRACGrid/diracx/pull/1154), [Chris's reasons](https://github.com/DIRACGrid/diracx/pull/1154#discussion_r4429355519)
- `input_id`/`input_ids` everywhere: [#1149](https://github.com/DIRACGrid/diracx/pull/1149)
- CWL process identity = hash of the `cwltool --pack` output, no normalisation: [Chris's review](https://github.com/DIRACGrid/diracx/pull/1114#pullrequestreview-5769007118), applied in [#1114](https://github.com/DIRACGrid/diracx/pull/1114) (Chris still to re-review)
- MySQL test for SKIP LOCKED kept out of the packer PR: [#1150](https://github.com/DIRACGrid/diracx/pull/1150#discussion_r4455297327)

**Open:**

- **A · Entry-point names** ([#1171](https://github.com/DIRACGrid/diracx/issues/1171), [#1169](https://github.com/DIRACGrid/diracx/issues/1169))
  - Converging on `diracx.transformation.feeders` / `.packers`, i.e. singular system, plural plugins ([chaen](https://github.com/DIRACGrid/diracx/issues/1171#issuecomment-6658758927), [Alexandre](https://github.com/DIRACGrid/diracx/issues/1171#issuecomment-6679597731)). Alan suggested `ts_feeders` ([thread](https://github.com/DIRACGrid/diracx/pull/1144#discussion_r4468161599)).
  - Still open: hyphens or underscores, and moving `lock_object_types` under a tasks namespace.
  - Blocks: #1146, #1147, #1152, #1170.
  - Decision: `diracx.<system singular>.<component plural>`
      - [name=Alexandre] going to adjust the issue to add DoD today

- **B · Shared base for FeederInput / PackerInput** ([#1168](https://github.com/DIRACGrid/diracx/issues/1168))
  - Feeder uses diracx `BaseModel` and isn't frozen; packer uses plain pydantic and is frozen ([Chris](https://github.com/DIRACGrid/diracx/issues/1168#issuecomment-6654360891)). Also: name and size both set or both empty ([#1144](https://github.com/DIRACGrid/diracx/pull/1144#discussion_r4468256284), [#1170](https://github.com/DIRACGrid/diracx/pull/1170)).
  - Decision: comment added to the issue
      - [name=Alexandre] going to adjust the issue to add DoD today

- **C · Packer transactions** ([#1152](https://github.com/DIRACGrid/diracx/pull/1152))
  - The packer commits by hand. Chris suggests the `clean_sandboxes` pattern instead (no transaction from the task, one `async with db` per batch), so a batch that fails halfway is always rolled back ([comment](https://github.com/DIRACGrid/diracx/pull/1152#discussion_r4469088167)). His [review](https://github.com/DIRACGrid/diracx/pull/1152#pullrequestreview-5769762401) also asks for a `Requirements` model that defines its own hash, plus use of the shared hashing function. No reply yet.
  - Decision: Did not go through it, waiting for Marco

- **D · Locks** (was D8; [#1142](https://github.com/DIRACGrid/diracx/issues/1142), [#1153](https://github.com/DIRACGrid/diracx/pull/1153))
  - Agreed on #1102: each task takes its own lock plus a shared "status" lock. Still open:
    - #1142: a crashed worker never releases the shared lock, so pause/finalise is blocked forever. No owner.
    - On #1153, lock keys use the raw UUID string, so differently written IDs get different locks ([bot](https://github.com/DIRACGrid/diracx/pull/1153#discussion_r4422909327)); and sweeps can pile up runs ([bot](https://github.com/DIRACGrid/diracx/pull/1153#discussion_r4422909363)). Both unanswered.
    - Feeder #1147 not checked against this rule yet.
  - Decision: Did not go through it yet

## 2. Deliverable 2 (2-3 sprints) - Deadline 13th November

**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)).

**Homework** (≈ 30 min): write your answers under your name below. Short bullets are fine; reading the others' answers first is fine too.

- **Goal** What is the smallest demo that proves T1's outputs feed T2? (one sentence)
- **Q2** Who records a parcel's outputs, when and where? (In the end, it should probably be a "jobwrapper"-equivalent)
- **Q3** What is out of scope for Deliverable 2?
- **Q4** What worries you most? (risk, unknown, missing piece)
- **Issues and DoD**: Provide a concise list of issues with the definition of done

✍️ **Answers** (copy a block for yourself)

- **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:**
  - Goal:
  - Q2:
  - Q3:
  - Q4:
  - Issues and DoD:

### Summary (as of 6th Nov)

- **Agreed:**
  - At the end of a parcel a job report comes back and the server records the outputs; for D2 the dummy backend fakes it (all four answers).
  - No real job wrapper in D2.
  - EdgeFeeder ([#1087](https://github.com/DIRACGrid/diracx/issues/1087)) and submitting a workgraph with several transformations are the core.
  - Main worry: no job wrapper / job-report contract.
      - [name=Alexandre] need ADR about the job-report contract taking into consideration the following parameters.
          - Push vs pull
          - Single vs Batch outputs upload 
- **Disagreements to discuss:**
  1. Where the demo stops: T2 inputs created (Federico) / T2 parcels created (Alan) / T2 runs and produces one output (Marco, Alexandre).
  2. Who writes `ParcelOutputs`: a diracx task that parses the report (Alan, Alexandre) / a possibly VO-specific "backfeeder" (Federico) / the dummy backend directly (Marco).

## 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 |
|---|---|---|---|
| [#1129](https://github.com/DIRACGrid/diracx/issues/1129) DB connection leak (core diracx) | Francesco | Alexandre | Discussed and refined in next Ddev |
| Shared interface to load the packer/feeder plugins | Alan | Alexandre | Discussed once Packer and Feeder land in `main` |
| [#1116](https://github.com/DIRACGrid/diracx/pull/1116) may overlap `check_self_contained` ([#1114](https://github.com/DIRACGrid/diracx/pull/1114)) since the `--pack` switch | Alan (review) | Ryu | Say whether #1116 is still needed after #1114 merges |
| [#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 |
| | | | |


## Actions

| What                                  | Who       | When                               |
| ------------------------------------- | --------- | ---------------------------------- |
| D1: adjust the issue                  | Alexandre | After the 30 Oct meeting ==Done==  |
| D4: adjust the issue and close the PR | Ryun      | After the 30 Oct meeting ==Done==  |
| D5: open PR to provide shared hashing functions | Alan      | After the 30 Oct meeting ==Done== ([#1154](https://github.com/DIRACGrid/diracx/pull/1154)) |
| D6: add the `TrivialPacker` within gubbins ([#1140](https://github.com/DIRACGrid/diracx/issues/1140)) | Marco → aspiringmind-code (assigned 5 Nov)? | |
| Split the packer PR into several smaller PRs | Marco      | ==Done== (#1149–#1153)         |
| Split the feeder PR into several smaller PRs | Alan      | ==Done== (#1144–#1148)         |
| Decision A: adjust #1171 | Alexandre | After the 6 Nov meeting |
| Decision B: shared input base class (#1168) | Alexandre | After the 6 Nov meeting |
| Decision C: packer transactions (#1152) | Marco | Next meeting |
| Decision D: owner for #1142 | | Next meeting |
| Deliverable 2 homework (missing answers) | Chris, Francesco, Ryu, aspiringmind-code, qdcampagna | before next meeting |
| Summarise the Deliverable 2 answers | | after next meeting |
|                                       |           |                                    |

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