Skip to content

Conversation

@Yu-Jack
Copy link
Contributor

@Yu-Jack Yu-Jack commented May 28, 2025

Which issue(s) this PR fixes:

Issue harvester/harvester#8148

What this PR does / why we need it:

  • Add integration test for volume encryption.

Special notes for your reviewer:

I created these codes with this prompt and copilot instruction from #2066 and refactored them manually.

Additional documentation or context

@Yu-Jack Yu-Jack force-pushed the HARV-8148 branch 2 times, most recently from d542091 to 76e4bfc Compare May 28, 2025 08:28
@Yu-Jack Yu-Jack self-assigned this May 28, 2025
@Yu-Jack Yu-Jack force-pushed the HARV-8148 branch 5 times, most recently from b8f3e0b to 7c29cfd Compare June 4, 2025 07:41
@Yu-Jack Yu-Jack force-pushed the HARV-8148 branch 4 times, most recently from 75380b0 to 45296a6 Compare June 4, 2025 10:00
@Yu-Jack Yu-Jack marked this pull request as ready for review June 13, 2025 06:19
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces integration tests for volume encryption and decryption along with associated API client manager updates to support secret and storage class operations for encrypted images.

  • New integration tests for creating encrypted and decrypted images, including tests for failure scenarios.
  • Addition of secret management support and improvements in storage class parameter merging.
  • API client updates for images and secrets modules to enable crypto image creation using encryption parameters.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
harvester_e2e_tests/integrations/test_1_security_images.py Added integration tests for encrypted/decrypted images using various secret combinations and validation of error responses.
harvester_e2e_tests/integrations/test_1_images.py Updated shared image fixture and image status waiting functions; minor improvements in error logging.
apiclient/harvester_api/managers/storageclasses.py Introduced create_by_parameters to merge custom parameters into storage class creation data.
apiclient/harvester_api/managers/secrets.py Added new SecretManager to support secret creation, retrieval, and deletion for encryption tests.
apiclient/harvester_api/managers/images.py Added create_crypto_image function for handling encrypted/decrypted image creation.
apiclient/harvester_api/managers/init.py Exported SecretManager for broader API client access.
apiclient/harvester_api/api.py Updated API load to include SecretManager.

Copy link
Member

Choose a reason for hiding this comment

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

as this will add the dependency on secrets, so the it should named starts with test_2

@Yu-Jack
Copy link
Contributor Author

Yu-Jack commented Jun 19, 2025

After new commit, result is:

image

@Yu-Jack Yu-Jack requested a review from lanfon72 June 19, 2025 06:59
@Yu-Jack Yu-Jack force-pushed the HARV-8148 branch 4 times, most recently from 197ca81 to 588357f Compare June 20, 2025 08:16
@lanfon72
Copy link
Member

link to #1483

@lanfon72
Copy link
Member

Tested with Cluster Version: v1.5-d52ec7e0-head in harvester-runtests#71, work as expected.

@lanfon72 lanfon72 merged commit d35316b into harvester:main Jun 23, 2025
5 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.

2 participants