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

[ASAP] CP-47431: Use un-patched Json.NET in C# SDK and package SDK in releases. Update PS SDK to use NuGet reference to XenServer.NET #5433

Merged
merged 12 commits into from
Mar 6, 2024

Conversation

danilo-delbusso
Copy link
Member

@danilo-delbusso danilo-delbusso commented Feb 6, 2024

PR contains two main changes:

  • CP-47431: Use un-patched Json.NET in C# SDK + minor changes to the source and NuGet package
  • Improve "sanity check" run on every PR and push to ensure SDK is generated and C# SDK compiles and builds as expected.
  • Also update PS SDK to use NuGet references and build for every PR and release
  • Add an unsigned NuGet build to the release artefacts. Please see https://github.com/danilo-delbusso/xen-api/releases/tag/v99.2.0 for an example of the output. Also add PowerShell SDKs

To achieve this I split up the intialisation of a XenAPI environment in a separate composite action so it can be reused

psafont added a commit to psafont/xen-api that referenced this pull request Feb 6, 2024
It does not support linting actions, which blocks reusing code in github
actions.

On top of that it hasn't been updated in months. There's a PR to add actions to
it since october.

Since this is blocking xapi-project#5433, remove it

Signed-off-by: Pau Ruiz Safont <[email protected]>
@psafont psafont mentioned this pull request Feb 6, 2024
@danilo-delbusso danilo-delbusso force-pushed the dev/drop-json.net-patches branch from aaa835b to f7ae90e Compare February 7, 2024 09:45
@danilo-delbusso
Copy link
Member Author

rebased on master and added a commit based on PR comments

however, I am putting this one into draft since I noticed we need changes to the PS SDK

@danilo-delbusso danilo-delbusso marked this pull request as draft February 7, 2024 09:46
@danilo-delbusso danilo-delbusso force-pushed the dev/drop-json.net-patches branch from f7ae90e to 82a19bb Compare February 8, 2024 15:28
@danilo-delbusso danilo-delbusso changed the title CP-47431: Use un-patched Json.NET in C# SDK and package SDK in releases CP-47431: Use un-patched Json.NET in C# SDK and package SDK in releases. Update PS SDK to use NuGet reference to XenServer.NET Feb 8, 2024
@danilo-delbusso danilo-delbusso marked this pull request as ready for review February 8, 2024 15:29
@kc284 kc284 changed the title CP-47431: Use un-patched Json.NET in C# SDK and package SDK in releases. Update PS SDK to use NuGet reference to XenServer.NET [ASAP] CP-47431: Use un-patched Json.NET in C# SDK and package SDK in releases. Update PS SDK to use NuGet reference to XenServer.NET Feb 12, 2024
… in C# SDK

Also:
- Rename `README.dist` and `README-NuGet.dist` to `README.md` and `README-NuGet.md`
- Change content of aforementioned READMEs to use markdown
- Remove mentions of patched Json.NET library
- Update copyright notice year
- Do not add `.txt` extension to `LICENSE` file

Signed-off-by: Danilo Del Busso <[email protected]>
Signed-off-by: Danilo Del Busso <[email protected]>
@danilo-delbusso danilo-delbusso force-pushed the dev/drop-json.net-patches branch from 82a19bb to 7e6a66c Compare February 14, 2024 15:09
@danilo-delbusso
Copy link
Member Author

Rebased on master to fix Makefile conflict and added 7e6a66c to address review commments

@danilo-delbusso
Copy link
Member Author

spotted an issue and had to force-push a couple times.

see this diff for the latest changes, to make it easier to review them:

https://github.com/xapi-project/xen-api/compare/8e8b981e459d2893ee929b586dcb55a7ce5b8cb4..ed1cafeacca924280529fabe97ed1f82805f5d73

Enables building without the use of `ResGen.exe`

Signed-off-by: Danilo Del Busso <[email protected]>
Also:
- Update copyright notices
- Update `README` files to use markdown
- Add `.gitignore` file
- Drop extension from `LICENSE.txt`
- Add `.sln` file since it's needed for NuGet usage in VS22
- Add .NET 8.0 to list of target frameworks for the SDK project
- Ensure all DLLs are placed in `bin/` when running `dotnet build`. Without `CopyLocalLockFileAssemblies = true` this is not the case for .NET builds.

Signed-off-by: Danilo Del Busso <[email protected]>
Makes use of new composite action that sets up a XenAPI environment in a Ubuntu node.

Signed-off-by: Danilo Del Busso <[email protected]>
@danilo-delbusso danilo-delbusso force-pushed the dev/drop-json.net-patches branch from 3cf71f9 to 15e55ed Compare February 26, 2024 13:52
Copy link
Member

@psafont psafont left a comment

Choose a reason for hiding this comment

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

The workflow changes seem fine to me

@kc284
Copy link
Contributor

kc284 commented Mar 5, 2024

@danilo-delbusso I noticed the "don't merge" label was added today, is there anything new blocking this PR?

@danilo-delbusso
Copy link
Member Author

@danilo-delbusso I noticed the "don't merge" label was added today, is there anything new blocking this PR?

Nope, just wanted to make sure you had a chance to review it before it was merged :)

.github/workflows/main.yml Outdated Show resolved Hide resolved
@danilo-delbusso danilo-delbusso force-pushed the dev/drop-json.net-patches branch from 15e55ed to 361e342 Compare March 6, 2024 11:16
- Upload PS DLLs as part of SDK artefacts
- Use one call to upload all artefacts in release.yml

Signed-off-by: Danilo Del Busso <[email protected]>
Other binaries are of the form `SDK_Binaries_XYZ`

Signed-off-by: Danilo Del Busso <[email protected]>
@danilo-delbusso danilo-delbusso force-pushed the dev/drop-json.net-patches branch from 361e342 to 227a1d7 Compare March 6, 2024 11:21
@kc284 kc284 merged commit c5af1a4 into xapi-project:master Mar 6, 2024
26 checks passed
@danilo-delbusso danilo-delbusso deleted the dev/drop-json.net-patches branch March 6, 2024 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants