restate icon indicating copy to clipboard operation
restate copied to clipboard

Deprecate service protocol <= 4

Open slinkydeveloper opened this issue 8 months ago • 10 comments

Proposed deprecation strategy for service protocol <= 4:

  • We start printing a warning in 1.4 every time users try to use an SDK using protocol <= v4.
  • We phase out support in 1.x (to be decided), completely removing support for old SDKs. In that case, invocations will simply panic, asking user to rollback to previous runtime version to complete those invocations (or kill them).

slinkydeveloper avatar Apr 22 '25 17:04 slinkydeveloper

cc @tillrohrmann

slinkydeveloper avatar Apr 22 '25 17:04 slinkydeveloper

  • We start printing a warning in 1.4 every time users try to use an SDK using protocol <= v4.

What does every time mean in your opinion? I would not print on every invocation because this will clutter the logs significantly. Instead we can log it on start-up or periodically.

In general, I am +1 for this approach. How are we gonna decide on when to remove support? Maybe we should check on Discord and Slack whether users are still using the old SDKs and require support for them.

tillrohrmann avatar Apr 23 '25 07:04 tillrohrmann

I would not print on every invocation because this will clutter the logs significantly. Instead we can log it on start-up or periodically.

I would do it exactly every invocation so the log gets cluttered and people will notice.

How are we gonna decide on when to remove support?

I think we can be very much arbitrary here and simply say in two or three releases (~6 months) we remove it. Sampling Discord and Slack IMO just gives us a too small audience sample. We also have download statistics, those might help.

slinkydeveloper avatar Apr 23 '25 07:04 slinkydeveloper

As an intermediate step we could in 1.5 to stop allowing people to register deployments using the old SDKs... Basically return an error in that case saying "you can't register a deployment with a protocol version <= 3"

slinkydeveloper avatar Apr 23 '25 11:04 slinkydeveloper

I think an even better place to print such warnings would be from the restate CLI - the services and deployments subcommands specifically should inform the operator about deployments using deprecated SDKs. Operators must be able to easily audit their deployments prior to starting an upgrade.

pcholakov avatar Apr 30 '25 08:04 pcholakov

Fair, it would be a good idea to have that in UI too @nikrooz .

slinkydeveloper avatar Apr 30 '25 08:04 slinkydeveloper

@slinkydeveloper I tried adding the warning to the UI, but I only have access to the deployment protocol version once the deployment is registered, which I think it's too late. Ideally, we should get the protocol version during the dry_run registration.

nikrooz avatar May 01 '25 17:05 nikrooz

@nikrooz checkout https://github.com/restatedev/restate/pull/3220, it should give you what you need.

slinkydeveloper avatar May 05 '25 09:05 slinkydeveloper

From Restate 1.6 we should prevent executing new requests to SDKs using the old protocol. In case of service to service communication, this will be a retryable error and not a terminal failure.

Because we prevent executing new requests to the old SDKs, we won't need to initialize journal table v1 anymore. Hence, we should flip the default behavior where for new invocations we initialize table v1, and remove the "migration v1 -> v2", since now only these two cases will be possible:

  • Invocation already exists on table v1 -> go to completion
  • New invocations or existing invocations -> always go to table v2

In order to do that, we probably need some way for leaders and replicas to agree. @AhmedSoliman how do we sort this point out?

slinkydeveloper avatar Sep 29 '25 07:09 slinkydeveloper

For leaders and replicas to agree, this will be the process:

  • in 1.6 we need to introduce a new feature flag in the state machine to enable using the journal v2 table by default, but we don't enable it yet (still keep it behind feature flag for testing purposes)
  • in 1.7 we enable this feature flag by default, by leaders self proposing it.

cc @tillrohrmann i can take care of the work needed in 1.6 for this.

slinkydeveloper avatar Oct 20 '25 07:10 slinkydeveloper

As part of the 1.6 release we complete #3998.

tillrohrmann avatar Nov 17 '25 11:11 tillrohrmann