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

CP-46060/Py3: (Local Pytests) rebased on merge of master into feature/py3 #5626

Conversation

bernhardkaindl
Copy link
Collaborator

Rebase #5622 (local Py3 tests) on #5624 (merge master -> py3)

Hi @stephenchengCloud!
this is the remaining part of CP-46060 that was left for me to do for CA-390883:

With CA-390883, I was asked to submit #5504 to feature/py3, but as @psafont said, master should be merged into feature/py3 first:

These are the two parts of this final submission by me:

1.

2.


As recommended by @psafont, I'll leave the decision on using these submissions to @stephenchengCloud and hereby transfer this to him, and we can consider CA-390883 (finishing of my unresolved Xapi PRs) as done.

ydirson and others added 30 commits March 6, 2024 16:56
This test did not exercised the SR type expected by user, and notably
failed when no default SR was defined.

Adds the option of installing a VM in a non-default SR using
VM.with_new.

Signed-off-by: Yann Dirson <yann.dirson@vates.fr>
Also update `pom.xml` to remove `org.apache.xmlrpc` packages and add `jackson-databind` and `org.apache.httpcomponents.client5`

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
As reported by `make check`

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
Instead use `Fun.protect`

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
Exception is already subclass of stdlib exception `IOException` and there's no need to expose it explicitly

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
Also remove a redundant `List.map` in `java/main.ml`

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
`jackson-databind` to `2.16.1` and `httpclient5` to `5.4`

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
- Shorten docs for Java's `IOException`
- Use `String.concat` instead of multiple `^` calls in Java's `main.ml`
- Rename `pascal_case_` to `pascal_case_rec` to avoid confusion for the fuinction's consumers
- Use `{| |}` to replace escaped quotes when possible in Java's `main.ml`

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
- Deprecates `Connection` constructors that take in `requestTimeout` or `connectionTimeout`
- Add docs to tell user to use `Connection.client#setXYZ` instead
- Add setters to `JsonRpcClient`
- Replace `protected` with `private` in `JsonRpcClient` when possible, since API consumers will now be able to access `Connection.client`
- Make `Connection.client` `public`
- Fix misc formatting in `Connection`

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
…rsion

This version replicates what we do in the C# SDK, and uses fewer calls to fetch the API version

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
- Restore use of `Set` instead of `HashSet` to avoid consumer implementation breaking
- Remove use of raw types to avoid runtime exceptions
- Deprecate `toX(Object)` methods in `Types` since they should be internal
- Restore `toX(Object, Connection)` methods
- Supress unchecked cast warnings with annotation to remove them during compilation.

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
Adds "@deprecated (since = x )" annotations, and populates it for methods and fields.
Also adds "@deprecated xyz" in method JavaDocs.

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
xapi returns strings of the form "0.0" for `event.timestamp` fields.
This commit adds a new custom JSON deserializer to handle such values.

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
…-java_CP-45888

CP-45888: Replace XML-RPC client in Java SDK with JSON-RPC
These were errors, even if they were accidentally working

Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
…es any more.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
…tes.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
Christian Lindig and others added 23 commits April 30, 2024 15:58
Signed-off-by: Christian Lindig <christian.lindig@cloud.com>
Signed-off-by: Christian Lindig <christian.lindig@cloud.com>
…/CP-48195-instrument-forkexecd-client

CP-48195: Instrument client side of `forkexecd`
- Use `Types.checkError` instead of throwing a generic `XenAPIException`. This ensures the `Types.XYZ` family of exceptions are being used
- Use `@JsonValue` to ensure base class objects are deserialised as a simple opaque_ref string, as opposed to a mapping of each field. This ensures the API's behaviour is unchanged.
- Parse the results of `task.getResult` calls. The jsonrpc method returns value payloads of the form `"value" : "<value>OpaqueRef:XYZ</value>"` so we need to strip the surrounding XML

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
…e build @check

Bytecode builds for `http_lib` are disabled due to '(modes best)',
and that means that anything that depends on it must have it disabled too to avoid this warning.

Avoids these kinds of warnings:
```
File "_none_", line 1:
Error: Module `Buf_io' is unavailable (required by `Http_svr')
```

Signed-off-by: Edwin Török <edwin.torok@cloud.com>
Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
…ries

There were 3 modules with conflicting names with compiler libraries: Watch,
Debuginfo and Stats. Debuginfo was renamed, the others's libraries were changed
to be wrapped.

Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
Pinning the libraries runs dune subst, which needs a project name, define it

Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
Do not output loglines that are part of the normal operation. Use debug for
them, they are not usually logged, but can be enabled if need be by changing
the loglevel

Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
New version got released

Signed-off-by: Pau Ruiz Safont <pau.ruizsafont@cloud.com>
The query on HTTP endpoint /updates will return the available updates in
JSON format. Prior to the changes in this commit, if a query arrives
when another query is being handled, a "GET_UPDATES_IN_PROGRESS" error
will be returned immediately. This behaviour is not friendly to GUI
client XenCenter.

In this commit, the behaviour is changed to wait and retry in handling
the query in xapi since the "*_IN_PROGGRESS" error is a transient
failure. Tolerating it in xapi (server) side avoids error handling in
client side.

With the change, the "GET_UPDATES_IN_PROGRESS" will not be an error
exposed to users any more. Therefore it is removed.

Signed-off-by: Ming Lu <ming.lu@cloud.com>
…389319

CA-389319: Wait and retry for GET_UPDATES_IN_PROGRESS
As part of a start, resources are allocated for a VM in "scheduled_to.."
fields. These need to be cleared if the start fails. It turned out that
this was incomplete for PCI slots and those were leaking. This patch
tries to be more systematical about it.

Signed-off-by: Christian Lindig <christian.lindig@cloud.com>
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
@bernhardkaindl bernhardkaindl requested review from psafont and removed request for psafont May 10, 2024 15:46
@stephenchengCloud
Copy link
Contributor

Thanks, Bernhard.
It would be easier to review this after #5624 is merged.

@stephenchengCloud stephenchengCloud mentioned this pull request May 21, 2024
@stephenchengCloud
Copy link
Contributor

I resubmitted this PR in #5641 based on the latest code of feature/py3.
Close this one.

@liulinC
Copy link
Collaborator

liulinC commented May 21, 2024

Close this PR, @stephenchengCloud will handle in #5641
Thanks all for the help.

@liulinC liulinC closed this May 21, 2024
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.

None yet