Skip to content

Stream sha256#1137

Open
meghan-bailey wants to merge 21 commits into
mainfrom
certify_optimization
Open

Stream sha256#1137
meghan-bailey wants to merge 21 commits into
mainfrom
certify_optimization

Conversation

@meghan-bailey

@meghan-bailey meghan-bailey commented Jul 3, 2024

Copy link
Copy Markdown
Collaborator

This pull request refactors and streamlines the image deployment and certification logic, particularly for plugin images. The main changes include moving deployment logic into a reusable function, improving SHA256 validation and deployment flow, and cleaning up unnecessary imports and code. These updates make the deployment process more modular, maintainable, and secure.

Deployment and Certification Logic Refactoring:

  • The image deployment logic previously embedded in trcplgtoolbase.go is now extracted into a new deployImage function in ecrcommon.go, making the deployment process reusable and easier to maintain. This function handles directory creation, placeholder replacement, file writing, and optional expansion or archival of deployed artifacts. [1] [2]
  • SHA256 validation and deployment flow are improved in azrcr.go: the code now checks SHA256 hashes before deployment, and only deploys if certification passes and the codebundledeployPtr flag is set. The logic for reading and hashing tar/gzip image layers is rewritten for clarity and correctness. [1] [2]

Configuration and Parameter Handling:

  • The codebundledeployPtr flag is added to pluginToolConfig to control whether code bundles should be deployed, supporting the new deployment logic and providing finer-grained control over deployment operations.

Code Cleanup and Import Management:

  • Unused imports such as encoding/hex, time, and memprotectopts are removed from trcplgtoolbase.go, and necessary imports are added to azrcr.go and ecrcommon.go to support the new logic. [1] [2] [3] [4]

These changes collectively improve the reliability and maintainability of the image deployment and certification workflow for plugins.

@meghan-bailey meghan-bailey requested a review from joel-rieke July 3, 2024 22:50
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