-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include runtime version in Dapr placement data to ease with upgrades #6838
Comments
How does this work with edge builds and/or custom builds? |
Good question, and I am not sure I have a good answer to this. Do you have any suggestion? |
Maybe selecting a default behavior which is non-compatibility mode for edge builds while having users explicitly set the Dapr version that the custom build is based on. |
I think that makes sense. Here's a possible decision matrix:
|
Implements the first bullet point of dapr#6838 (and only the first bullet point) - The Dapr runtime reports its version to the Placement service when it connects - This data is currently unused and ignored by the Placement service - In Dapr 1.13 we can use that data to perform decisions as described in dapr#6838 - Having the data submitted by 1.12 already will be helpful to ensure smoother upgrades Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
@yaron2 @mukundansundar I've found a better solution, which involves defining a constant "Actor API version" set in the actors package. That constnat will be set to "10" in Dapr 1.12, and if a future version makes changes that require new API levels, we can increment that to for example "20". This should solve the problems highlighted above:
Another (lesser) benefit is that the API level can be sent as an int over the wire so it's a bit less data on each message I've updated the first message to include the details and the PR |
Question: why are we versioning by |
In this case, won't this essentially prevent rollbacks from happening? Probably a reconciliation needs to happen between what min version is represented by Placement vs Sidecar? |
The version is meant to be decoupled from the Dapr version. So, 1.12 will have version "10", and then we don't need to update the version on each Dapr version; only when we make significant changes that may not be fully backwards-compatible. So, while 1.13 could have version 20, we may not need to change it until Dapr 1.16 then, for example. The reason for skipping 10 is to be able to have hotfixes where we make changes that require increasing the version. So if 1.13 comes out with version "20", and we realize we need to change something in 1.12.4, we can use version "11" there. I believe this will be very unlikely, but it's best to be safe. As for using ints... Exactly the reason you mentioned: they are easier to manage. With floats, checking for equality is always a bit iffy. We could use strings that represent a semver version, but that's more complex and less efficient over the wire.
Yes, that could be a problem. If a rollback is needed:
|
* Report Dapr runtime version to Placement Implements the first bullet point of #6838 (and only the first bullet point) - The Dapr runtime reports its version to the Placement service when it connects - This data is currently unused and ignored by the Placement service - In Dapr 1.13 we can use that data to perform decisions as described in #6838 - Having the data submitted by 1.12 already will be helpful to ensure smoother upgrades Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Switched to use API level instead of Dapr version Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> --------- Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com> Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
This issue has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions. |
As we continue to make improvements to actors (especially reminders) and workflow, we are sometimes faced with the need to make changes that, while non-breaking (in the sense that don't alter the behavior observed by end users), are not backwards-compatible.
For example, assume that we wanted to change the format used to store reminders in the actor state store (today it's JSON, and we could use a more efficient format like protobuf). This change would make it impossible for older versions of the Dapr sidecar to be able to parse the reminders data, and would cause issues in clusters with heterogeneous Dapr versions. In fact, we can make Dapr "vNext" be able to read data created from "vCurrent", but there's no way for us to make "vCurrent" read data created by "vNext".
This scenario, where "vCurrent" and "vNext" run side-by-side, is very common while performing rolling upgrades, as there are always sidecars running alongside older versions. It generally is short-lived, as upgrades are eventually completed in minutes/hours, but if we don't manage this situation we will observe a variety of issues.
Because of this problem, it's really hard to make changes to actors/reminders, and workflow too once it reaches beta in the next release, as we'll have to manage clusters with heterogeneous versions.
A possible solution to this problem could be making each Dapr sidecar report its version to the Placement service and use that to ease with upgrades.
Pros:
Cons:
The text was updated successfully, but these errors were encountered: