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

Mirror api fix #6009

Merged
merged 2 commits into from
Sep 24, 2024
Merged

Mirror api fix #6009

merged 2 commits into from
Sep 24, 2024

Conversation

MarkSymsCtx
Copy link
Contributor

No description provided.

Defining as Copy of uri * uri results in JSON of `["Copy", ["uri",
"uri"]]` but the unparse tries to enforce the `["uri", "uri"]` as a
tuple, a type which is not supported by JSON.

Signed-off-by: Mark Syms <mark.syms@cloud.com>
Signed-off-by: Mark Syms <mark.syms@cloud.com>
@MarkSymsCtx
Copy link
Contributor Author

as discussed with @edwintorok it turns out that these bits were unusable from the generated python due to type confusion. As such it is highly unlikely that anyone has used them so a breaking change is in this case acceptable

@lindig
Copy link
Contributor

lindig commented Sep 20, 2024

I am surprised that these changes don't require corresponding changes of existing client code.

@edwintorok
Copy link
Contributor

I am surprised that these changes don't require corresponding changes of existing client code.

The client side of this is not wired up yet (@Vincent-lau ) will be working on wiring this up in xapi-storage-script.

Copy link
Contributor

@edwintorok edwintorok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'progress = Some 1.0' is probably the same as 'complete = true', but it is probably better to be explicit here, otherwise some floating point rounding error might lead to us to believe that an operation is complete before it really is.

ocaml/xapi-storage/generator/lib/data.ml Show resolved Hide resolved
operation from the [src] URI to the [dst] URI. *)
| CopyV1 of copy_operation_v1
(** CopyV1 (key) represents an on-going copy operation
with the unique [key]. *)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this key representing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's an abstract key that can be passed back to stat to obtain information about the running operation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so something like a handle/token

@MarkSymsCtx
Copy link
Contributor Author

I am surprised that these changes don't require corresponding changes of existing client code.

It was when we tried to wire up the Python side of this that we discovered that it couldn't actually be used as specified as the types in the ocaml can't be represented in JSON and so results from an operation can't be round-tripped and used as input for a subsequent API call.

@robhoes robhoes added this pull request to the merge queue Sep 24, 2024
Merged via the queue into xapi-project:master with commit 1bafd51 Sep 24, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants