Skip to content

Conversation

@HITweihailiuxu
Copy link

Pull image from remote image registry for confidential containers

@HITweihailiuxu HITweihailiuxu requested a review from a team as a code owner April 27, 2025 02:54
.map_or_else(|| Err(other!("can not get image: {:?}", image_rpc::ANNO_K8S_IMAGE_NAME)),
|name| Ok(name)
)?;
debug!("image_name = {:?}", image_name);
Copy link
Member

Choose a reason for hiding this comment

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

Do not use variable name in debug info?
Image name: {:?}, Container id: {:?}

Copy link
Author

Choose a reason for hiding this comment

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

fixed

container_id: &str,
) -> Result<()> {
let image_name = annotations.get(image_rpc::ANNO_K8S_IMAGE_NAME)
.map_or_else(|| Err(other!("can not get image: {:?}", image_rpc::ANNO_K8S_IMAGE_NAME)),
Copy link
Member

Choose a reason for hiding this comment

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

Better to have container id with error info, so that it is easier to debug?
Failed to get image name from annotation for container {:?}

Copy link
Author

Choose a reason for hiding this comment

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

fixed

info!("image_client.config.auth set to: {}", !aa_kbc_params.is_empty());
image_client.config.auth = !aa_kbc_params.is_empty();

// Read enable signature verification from the task config and set it in the image_client
Copy link
Member

Choose a reason for hiding this comment

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

Check if signature verification is enabled, and set it in image client

Copy link
Author

Choose a reason for hiding this comment

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

fixed

.await;
match res {
Ok(image) => {
info!("pull and unpack image {:?}, cid: {:?}, with image-rs succeed. ", image, cid);
Copy link
Member

Choose a reason for hiding this comment

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

Successfully pull and unpack image ..

Copy link
Author

Choose a reason for hiding this comment

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

fixed

info!("pull and unpack image {:?}, cid: {:?}, with image-rs succeed. ", image, cid);
}
Err(e) => {
error!("pull and unpack image {:?}, cid: {:?}, with image-rs failed with {:?}. ",
Copy link
Member

Choose a reason for hiding this comment

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

Failed to

Copy link
Author

Choose a reason for hiding this comment

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

fixed

@kevin-wangzefeng
Copy link
Member

@HITweihailiuxu could you address the review comments, and fix the failing checks?

@HITweihailiuxu
Copy link
Author

recompile protobuf by env GENERATE_PROTOBUF=1

@HITweihailiuxu
Copy link
Author

@HITweihailiuxu could you address the review comments, and fix the failing checks?

I have modified the code based on the review comments and fixed the original failing checks by adding env GENERATE_PROTOBUF=1.
But the checks seems to need more repairs, such as rust upgrade, and protobuf compilation requires the protobuf-compiler dependency.
Can you tell me how to make the above changes? Many thanks.

@HITweihailiuxu HITweihailiuxu requested a review from a team as a code owner July 1, 2025 12:02
@HITweihailiuxu HITweihailiuxu force-pushed the coco-dev branch 3 times, most recently from 7493578 to f13230e Compare July 1, 2025 12:39
@HITweihailiuxu
Copy link
Author

/retest

@HITweihailiuxu HITweihailiuxu force-pushed the coco-dev branch 2 times, most recently from 54f22f9 to c174202 Compare July 22, 2025 09:10
@abel-von
Copy link
Collaborator

It seems the codes has not been cargo fmt ed

@HITweihailiuxu HITweihailiuxu force-pushed the coco-dev branch 4 times, most recently from 8dc3b15 to 0621f54 Compare July 30, 2025 03:43
@HITweihailiuxu HITweihailiuxu force-pushed the coco-dev branch 5 times, most recently from a656444 to 1918c38 Compare July 30, 2025 08:04
@HITweihailiuxu
Copy link
Author

It seems the codes has not been cargo fmt ed

fixed

@abel-von
Copy link
Collaborator

@HITweihailiuxu could you please fix the clippy error of CI?

@HITweihailiuxu
Copy link
Author

HITweihailiuxu commented Oct 13, 2025

@HITweihailiuxu could you please fix the clippy error of CI?

There are two types of issues in the access control error report:

  1. Some used variables are reported as unused;
  2. The tests-wasm compilation fails but this PR does not involve any modifications.

I have tried to fix them but failed.I have no idea how to proceed. Could you give me some guidance?

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