osrd icon indicating copy to clipboard operation
osrd copied to clipboard

Remove unused fields in the rolling stock schema

Open multun opened this issue 2 years ago • 3 comments

Description and goal

Over the time, a couple of irrelevant fields creeped into the rolling stock RailJSON schema:

  • version was added in this change. It's meant to be incremented every time the rolling stock is edited. It has no business there, it's supposed to be internal to editoast, and its addition is not sound: if the version counter is supposed to be incremented when a rolling stock with a given ID changes, this field cannot meaningfully be read from disk. Clients also have no business knowing the current version.
  • energy_sources was added in this change. This field is not read anywhere, and we don't know when it's going to be used. Sure, the design of this API is pretty good, and we're probably going to use it at some point, but we should have added the field as we needed it:
    • even if this API seems appropriate now, it may have to change when it is finally used
    • anyone actually using this field may be lead to believe that is actually makes a difference
    • anyone using this field, through hyrum's law, constrain what we can do later on with this API

Both of these changes introduced practical issues.

Acceptance criteria

  • [ ] Remove the version field from the RailJSON schema
  • [ ] Create an issue or documentation page with the Qualesi design work and proposed schema
  • [ ] Remove the energy_sources field from the RailJSON schema

multun avatar Jul 25 '23 18:07 multun

The energy_source field was supposed to be used soon. I would like to discuss it before finding out that there's an issue asking to remove it...

axrolld avatar Aug 09 '23 08:08 axrolld

@flomonster is this fixed by the changes on the schemas ?

celine-sncf avatar Nov 27 '23 09:11 celine-sncf

@flomonster is this fixed by the changes on the schemas ?

I'm not sure which changes you're talking about. But no.

We need to discuss the roadmap for rolling stock modelization.

flomonster avatar Jun 28 '24 14:06 flomonster

Is this still relevant? Was a decision reached about the status of these fields?

Synar avatar Jul 01 '25 16:07 Synar

Not relevent anymore. Thanks @Synar

flomonster avatar Jul 02 '25 12:07 flomonster