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

kustomize build fails with remote transformer function with kustomize version 4.5.5+ #4958

Closed
Jell opened this issue Jan 5, 2023 · 6 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/resolved Indicates an issue has been resolved or doesn't need to be resolved.

Comments

@Jell
Copy link

Jell commented Jan 5, 2023

What happened?

Running:

kustomize build --enable-alpha-plugins .

with this kustomization file:

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
transformers:
  - git@github.com:Jell/devops-test-tooling

returns:

Error: couldn't execute function: chdir /tmp/kustomize-2989599739: no such file or directory

when using kustomize version 4.5.5, 4.5.6 and 4.5.7, but works on all earlier 4.5.X versions

What did you expect to happen?

kustomize build --enable-alpha-plugins .

should work the same with regards to remote transformers as with version 4.5.4

How can we reproduce it (as minimally and precisely as possible)?

Create a kustomization file that points to a remote transformer function

kustomization.yaml:

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
transformers:
  - git@github.com:Jell/devops-test-tooling

the URL points to a folder with those two files:

config.yaml

apiVersion: examples.config.kubernetes.io/v1beta1
kind: cloudproxy
metadata:
  name: cloudproxy
  annotations:
    config.kubernetes.io/function: |-
      container:
        image: europe-west3-docker.pkg.dev/devops-test-2/devops-test/kustomize-transformer-cloud-sql-proxy:main

kustomization.yaml:

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
  - config.yaml

Checkout: https://github.com/Jell/kustomize-issue-4958 for reproducing the error.

Expected output

same output as with kustomize version 4.5.4

Actual output

Error: couldn't execute function: chdir /tmp/kustomize-2989599739: no such file or directory

Kustomize version

4.5.7

Operating system

Linux

@Jell Jell added the kind/bug Categorizes issue or PR as related to a bug. label Jan 5, 2023
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jan 5, 2023
@k8s-ci-robot
Copy link
Contributor

@Jell: This issue is currently awaiting triage.

SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@Jell Jell changed the title kustomize build fails with remote transformer function with kustomize version 4.5.6+ kustomize build fails with remote transformer function with kustomize version 4.5.5+ Jan 5, 2023
@Jell
Copy link
Author

Jell commented Jan 5, 2023

Made a repo with a minimum setup to reproduce the error: https://github.com/Jell/kustomize-issue-4958/blob/main/README.md

@Jell
Copy link
Author

Jell commented Jan 5, 2023

the issue appears to be with remote SSH URLs, and both public and private SSH URLs are affected.

@KnVerey
Copy link
Contributor

KnVerey commented Jan 5, 2023

Thank you for the detailed reproduction! I can reproduce with v4.5.7, but I believe we've already merged a fix for this; kustomize built from current master attempts to pull the container. It looks like a problem we had related to working directories with KRM functions, and indeed checking out a previous revision confirms it was #4654 that fixed it. I'm going to close this since the fix is already in place. We are planning a release soon, hopefully next week.

/close
/triage resolved

@k8s-ci-robot k8s-ci-robot added the triage/resolved Indicates an issue has been resolved or doesn't need to be resolved. label Jan 5, 2023
@k8s-ci-robot
Copy link
Contributor

@KnVerey: Closing this issue.

In response to this:

Thank you for the detailed reproduction! I can reproduce with v4.5.7, but I believe we've already merged a fix for this; kustomize built from current master attempts to pull the container. It looks like a problem we had related to working directories with KRM functions, and indeed checking out a previous revision confirms it was #4654 that fixed it. I'm going to close this since the fix is already in place. We are planning a release soon, hopefully next week.

/close
/triage resolved

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@KnVerey KnVerey removed the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jan 5, 2023
@Jell
Copy link
Author

Jell commented Jan 6, 2023

excellent! 🎉 thank you for the fast reply, looking forward to the next release! cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/resolved Indicates an issue has been resolved or doesn't need to be resolved.
Projects
None yet
Development

No branches or pull requests

3 participants