Project

General

Profile

Actions

Architecture #21825

open

Port code to ZIO2

Added by François ARMAND 13 days ago. Updated 10 days ago.

Status:
Pending technical review
Priority:
N/A
Category:
Architecture - Dependencies
Target version:
Effort required:
Regression:
No

Description

ZIO 2 was released earlier that year (2022-06-24 - see https://degoes.net/articles/zio-2.0). Since then, ZIO maintenairs have been eagered to migrate library to ZIO 2 and to stop support on ZIO 1. The change are important (but with luck, not in part of the framework we are using) and the core dev have a very aggressive policy toward EOL of community support of previous versions.

All that means that we don't have much time if we want to still have some updates and if we want to be able to use recent version of ZIO libs (and libs are very young, so a one-year-old version is obsolete and misses major features).

Given that 7.2 dev cycle was already well advanced (and I had blocking bugs for rudder until the very last weeks of ZIO 2 beta), we weren't able to migrate for that release. But we really, really need to migrate for 7.3, or else suffer a couple of difficult years for dev/maintenance.

There is an excellent migration guide here: https://zio.dev/guides/migrate/zio-2.x-migration-guide/

In our case, the main aspect are:

- we don't need to use blocking effect everywhere, now ZIO managed it all by itself. In ZIO 2.0.0, the perf are not that much different (which is already a massive evolution, because we had to be extremelly specific on some hot points, and now it's not needed anymore)
- all .effect were rename to .attempt, and there is a lot of other renaming. Nothing hard, it's just breaking everything everywhere. We need to use the same change, at least for effect, else we will get lost on when to use the one or the other.
- bracket are removed because now we have Scope. Limited impact in our use cases (just copy what the migration guide says for that)
- parallelism is not "foreachParN" but now "foreach(...).withParallelism(n)"


Subtasks 2 (2 open0 closed)

Rudder plugins - Architecture #21826: Port plugins to ZIO2Pending technical reviewVincent MEMBRÉActions
Architecture #21864: Port private plugins to ZIO2NewActions
Actions #1

Updated by François ARMAND 13 days ago

  • Category changed from Architecture - Internal libs to Architecture - Dependencies
Actions #2

Updated by François ARMAND 13 days ago

  • Status changed from New to In progress
  • Assignee set to François ARMAND
Actions #3

Updated by François ARMAND 13 days ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Vincent MEMBRÉ
  • Pull Request set to https://github.com/Normation/rudder/pull/4507
Actions #4

Updated by François ARMAND 13 days ago

  • Subtask #21826 added
Actions #5

Updated by François ARMAND 10 days ago

  • Subtask #21864 added
Actions

Also available in: Atom PDF