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

Fix potential for double transform of images (i.e with operators that self-reference) #1989

Merged
merged 10 commits into from
Aug 28, 2023

Conversation

cmwylie19
Copy link
Contributor

@cmwylie19 cmwylie19 commented Aug 25, 2023

Description

Checks if image.Host has already been patched

Related Issue

Fixes #1988

Relates to #

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

@netlify
Copy link

netlify bot commented Aug 25, 2023

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit a9a037f
🔍 Latest deploy log https://app.netlify.com/sites/zarf-docs/deploys/64ecea66b6539100081fdab5

cmwylie19 and others added 4 commits August 25, 2023 17:39
@Racer159 Racer159 changed the title 1988 Fix potential for double transform of images (i.e with operators that self-reference) Aug 26, 2023
Copy link
Contributor

@Racer159 Racer159 left a comment

Choose a reason for hiding this comment

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

looks good but this should probably be unit tested.

src/pkg/transform/image.go Outdated Show resolved Hide resolved
@Racer159 Racer159 added the needs-tests PR Label - Tests required to merge label Aug 26, 2023
@cmwylie19 cmwylie19 removed the needs-tests PR Label - Tests required to merge label Aug 27, 2023
@cmwylie19
Copy link
Contributor Author

@Racer159 I took the needs test label off because I think i have covered the newly implemented logic in image_test.go. LMK if you would like to see changes.

Signed-off-by: Case Wylie <[email protected]>
@Racer159 Racer159 self-requested a review August 28, 2023 15:54
Copy link
Contributor

@Racer159 Racer159 left a comment

Choose a reason for hiding this comment

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

lgtm

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.

Zarf image mutation happens twice in some scenarios
2 participants