Skip to content
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

Add versioning support in durabletask-dotnet(phase1) #295

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
380c622
Add a new constructor that sets the version expected by the client
skyao Apr 22, 2024
1976de6
Add new abstract method to get instance version
skyao Apr 22, 2024
4e1f8cb
Implemented new added abstract method to get instance version
skyao Apr 22, 2024
f6162ff
change to get instance version from this.innerContext.Version
skyao Apr 23, 2024
d564c79
Merge branch 'main' into versioning-phase1
skyao Apr 26, 2024
d9298d0
change InstanceVersion to virtual and return null be default to avoid…
skyao Apr 26, 2024
60c1341
Merge branch 'versioning-phase1' of github.com:skyao/durabletask-dotn…
skyao Apr 26, 2024
fc44a4a
Merge branch 'main' into versioning-phase1
skyao Apr 29, 2024
5b1b2b2
Merge branch 'main' into versioning-phase1
skyao May 7, 2024
cb86ecd
Merge branch 'main' into versioning-phase1
skyao May 21, 2024
83bc227
update constructor to handle null correctly
skyao May 21, 2024
f1619b1
Merge branch 'main' into versioning-phase1
skyao Jul 5, 2024
0045ced
update Equals/GetHashCode method to include version field
skyao Jul 10, 2024
2172e96
use value.ToString() to include version field
skyao Jul 10, 2024
5c3ad58
rollback file formator to use 4 space indentation
skyao Jul 16, 2024
7912d46
use Microsoft.Bcl.HashCode to do hash
skyao Jul 16, 2024
d015d3e
fix typo
skyao Jul 16, 2024
87b15e1
udpate documents for version
skyao Jul 18, 2024
6ecfde1
add static FromString() method and update the string conversion opera…
skyao Jul 18, 2024
220fb2d
Merge branch 'main' into versioning-phase1
skyao Aug 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/Abstractions/TaskName.cs
skyao marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@
/// <returns><c>true</c> if the two objects are equal using value semantics; otherwise <c>false</c>.</returns>
public bool Equals(TaskName other)
{
return string.Equals(this.Name, other.Name, StringComparison.OrdinalIgnoreCase);
return string.Equals(this.Name, other.Name, StringComparison.OrdinalIgnoreCase)
&& string.Equals(this.Version, other.Version, StringComparison.OrdinalIgnoreCase);
}

/// <summary>
Expand All @@ -148,7 +149,13 @@
/// <returns>A 32-bit hash code value.</returns>
public override int GetHashCode()
{
return StringComparer.OrdinalIgnoreCase.GetHashCode(this.Name);
if (string.IsNullOrEmpty(this.Version))
{
return StringComparer.OrdinalIgnoreCase.GetHashCode(this.Name);
}

return StringComparer.OrdinalIgnoreCase.GetHashCode(this.Name) * 31

Check warning on line 157 in src/Abstractions/TaskName.cs

View workflow job for this annotation

GitHub Actions / build

Check warning on line 157 in src/Abstractions/TaskName.cs

View workflow job for this annotation

GitHub Actions / build

skyao marked this conversation as resolved.
Show resolved Hide resolved
+ StringComparer.OrdinalIgnoreCase.GetHashCode(this.Version);
}

/// <summary>
Expand Down
Loading