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

Merge feature/non-cdn-update to master #5914

Merged
merged 26 commits into from
Aug 19, 2024

Conversation

BengangY
Copy link
Contributor

@BengangY BengangY commented Aug 6, 2024

Merge feature/non-cdn-update to master.
Resolved conflicts:
ocaml/tests/dune
quality-gate.sh

minglumlu and others added 20 commits July 11, 2024 15:59
…erge-master-to-non-cdn-update

Merge master to feature/non-cdn-update
…erge-master-to-non-cdn-update

Merge master to feature/non-cdn-update
Add a field "origin" in "repository" to indicate the origin of the
repository. It's an enum type with 2 values: "remote" and "bundle".

Signed-off-by: Bengang Yuan <bengang.yuan@cloud.com>
Signed-off-by: Bengang Yuan <bengang.yuan@cloud.com>
…P-49212

CP-49212: Update datamodel for non-CDN update
Add a module Tar_ext to unpack a tar file.
During the unpacking process, verify the tar file, containing total file size,
file type, file path, file integrity, etc.

Signed-off-by: Bengang Yuan <bengang.yuan@cloud.com>
Signed-off-by: Bengang Yuan <bengang.yuan@cloud.com>
…P-49213

CP-49213: Add new tar unpacking module
…erge-master-to-non-cdn-update

Merge `master` to `feature/non-cdn-update`
Upload a bundle file and unpack it with module Tar_ext. After that,
sync the bundle repository.

Signed-off-by: Bengang Yuan <bengang.yuan@cloud.com>
Add an allowed_operations for sync bundle.

Signed-off-by: Bengang Yuan <bengang.yuan@cloud.com>
Signed-off-by: Bengang Yuan <bengang.yuan@cloud.com>
1. Replace all `Client.Pool.get_all` and `Client.Pool.get_master` with
   self-defined function `cli_util.get_pool` and `cli_util.get_master` so that
   we can reduce the use of `List.hd`.
2. Remove some unused getting pool_master code in function `host_careful_op`.

Signed-off-by: Bengang Yuan <bengang.yuan@cloud.com>
…P-49214

CP 49214: Upload and reposync from the bundle
1. Change the max total bundle files size limit to 1G.
2. Change HTTP error code for the following error to 400:
  1) bundle_repo_not_enabled.
  2) no_repository_enabled.
  3) multiple_update_repositories_enabled.

Signed-off-by: Bengang Yuan <bengang.yuan@cloud.com>
Add a new API error for bundle syncing failure:
Syncing with bundle repository failed.

Signed-off-by: Bengang Yuan <bengang.yuan@cloud.com>
Signed-off-by: Bengang Yuan <118869129+BengangY@users.noreply.github.com>
@BengangY BengangY changed the title Merger feature/nob-cdn-update to master Merger feature/nob-cdn-update to master (Not ready) Aug 6, 2024
@BengangY BengangY changed the title Merger feature/nob-cdn-update to master (Not ready) Merge feature/non-cdn-update to master (Not ready) Aug 6, 2024
@BengangY BengangY changed the title Merge feature/non-cdn-update to master (Not ready) Merge feature/non-cdn-update to master Aug 12, 2024
@BengangY BengangY marked this pull request as ready for review August 12, 2024 01:27
@minglumlu
Copy link
Member

I think we need the auto-generated changes in datamodel_lifecycle.ml. And bumping up minor vsn together with the last_known_schema_hash.

Update the auto-generated changes in `datamodel_lifecycle.ml` before
the code is merged into master.

Signed-off-by: Bengang Yuan <bengang.yuan@cloud.com>
Update `scheme` to `https` in `Cli_operations.pool_sync_bundle` as
`http` can't be used in newcli and will be executed on slave.

Signed-off-by: Bengang Yuan <bengang.yuan@cloud.com>
@BengangY
Copy link
Contributor Author

I think we need the auto-generated changes in datamodel_lifecycle.ml. And bumping up minor vsn together with the last_known_schema_hash.

Will update it on another PR #5927.

Bump `schema_minor_vsn` as this feature adds a new field repository.origin.

Signed-off-by: Bengang Yuan <bengang.yuan@cloud.com>
ocaml/tests/test_tar_ext.ml Outdated Show resolved Hide resolved
ocaml/tests/test_tar_ext.ml Outdated Show resolved Hide resolved
1. Refine test_tar_ext for integer format and add some comments to describe
the relationship of the 'max_size_limit' between UT and 'gen_tar_ext_test_file.sh'.
2. Add copyright in 'gen_tar_ext_test_file.sh'.

Signed-off-by: Bengang Yuan <bengang.yuan@cloud.com>
@gangj gangj merged commit 42f5d3f into xapi-project:master Aug 19, 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.

4 participants