You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The response does not contain the "Version.Index".
The version index (this is sometimes represented as a long and other times a ulong in this library) is required in order to call UpdateServiceAsync - if you don't specify it you can get exceptions back about the update being out of sequence.
To workaround this, after creating the service, I have to do an intermediary ListServicesAsync to fetch it again, because that API does return a Version.
Note: I have to cast from ulong to long - ideally these types could be aligned?
You may wonder why I am doing a create then an immediate update. I am writing a test to check that I can update a service and it has the intended behaviour. At the start of the test I need to create the service first as a test subject. In normal application usage I don't envisage I'd want to create then immediately update a service.
The text was updated successfully, but these errors were encountered:
When creating a swarm service
The response does not contain the "Version.Index".
The version index (this is sometimes represented as a
long
and other times aulong
in this library) is required in order to callUpdateServiceAsync
- if you don't specify it you can get exceptions back about the update being out of sequence.To workaround this, after creating the service, I have to do an intermediary
ListServicesAsync
to fetch it again, because that API does return a Version.Then I can do
Note: I have to cast from
ulong
tolong
- ideally these types could be aligned?You may wonder why I am doing a create then an immediate update. I am writing a test to check that I can update a service and it has the intended behaviour. At the start of the test I need to create the service first as a test subject. In normal application usage I don't envisage I'd want to create then immediately update a service.
The text was updated successfully, but these errors were encountered: