Skip to content

feat: revert "feat: transform imagePullPolicy when using local cluster (#9495)" (#9703) #9704

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

Closed

Conversation

plumpy
Copy link
Collaborator

@plumpy plumpy commented Feb 4, 2025

This backs out commit c1834b6.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Hi @plumpy and reviewers,

I'm currently reviewing this pull request and will provide my feedback in a few minutes. In the meantime, here's a summary of the changes for you and other reviewers to quickly get up to speed:

This pull request, #9703, titled "feat: revert "feat: transform imagePullPolicy when using local cluster (#9495)", reverts commit c1834b6296f5f8a19b64c3c97ade0c11e08e6958. The intent is to undo changes made in PR #9495 related to transforming the imagePullPolicy when using a local cluster.

Here's a breakdown of the changes:

  • pkg/skaffold/deploy/kubectl/kubectl.go: This file had a section of code (lines 244-253) removed. This section handled the replacement of the imagePullPolicy in Kubernetes manifests when deploying to a local cluster. The removal effectively disables this behavior.
  • pkg/skaffold/kubernetes/manifest/image_pull_policy.go: This entire file (88 lines) was deleted. This file contained the logic for selecting and modifying the imagePullPolicy field in Kubernetes manifests based on various rules and configurations. Its removal completely eliminates the functionality added in PR feat: transform imagePullPolicy when using local cluster #9495.
  • pkg/skaffold/kubernetes/manifest/image_pull_policy_test.go: This entire file (67 lines) was deleted. This was the test file for image_pull_policy.go, and its removal ensures that the removed functionality is no longer tested.

In short, this PR completely removes the feature introduced in PR #9495 that modified the imagePullPolicy for local cluster deployments.


And now, a little haiku to lighten the mood:

Code flows like a stream,
Reverts undo what was done,
A cleaner, clear code.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

This pull request reverts the changes introduced in #9495, which modified the imagePullPolicy for deployments on local clusters. This revert is necessary as the original change caused unintended side effects. The code changes are straightforward and effectively remove the logic for transforming the imagePullPolicy. Removing the now-unused code related to imagePullPolicy transformation in pkg/skaffold/kubernetes/manifest/image_pull_policy.go and the corresponding test in pkg/skaffold/kubernetes/manifest/image_pull_policy_test.go improves the codebase's maintainability by eliminating dead code. The changes in pkg/skaffold/deploy/kubectl/kubectl.go correctly remove the conditional logic that altered the imagePullPolicy based on the cluster type. Overall, the changes are appropriate and well-implemented.

@plumpy plumpy closed this Feb 4, 2025
@plumpy plumpy deleted the cherrypicks branch February 4, 2025 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant