-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 failed tests are depends on external container images #5328
fix failed tests are depends on external container images #5328
Conversation
This PR has multiple commits, and the default merge method is: merge. 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. |
Skipping CI for Draft Pull Request. |
508ba30
to
774c1e2
Compare
5408838
to
ac848b6
Compare
d8f7fc0
to
1124aa9
Compare
adae377
to
fabd61f
Compare
925f8c0
to
7869890
Compare
7869890
to
69a2a48
Compare
@@ -0,0 +1,34 @@ | |||
module sigs.k8s.io/kustomize/cmd/config/internal/commands/e2e/e2econtainerenvgenerator | |||
|
|||
go 1.20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@koba1t Could you elaborate on why we need a separate go mod file and repo for e2e testing? I'm sorry if the question sounds trivial, but I'm still trying to catch up. The issue states:
"I believe this was caused by attempting to run a container image that was built external to this repo and does not support the arm64 architecture."
but I'm just wondering if we need to init a separate repo for just for e2e. And if its just for building the container image, why do we need to do it specifically inside this directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @varshaprasad96
Thanks for your comment.
but I'm just wondering if we need to init a separate repo for just for e2e. And if its just for building the container image
I think we need any container images when testing the KRM container function. And, I think we need separate modules because we need to build small images in tests.
why do we need to do it specifically inside this directory?
I'm just putting the same directory on the source of previous e2e tests container image.
If you need any ideas to improve these tests, Could you tell me that?
I want to know your advice and improve this code!
69a2a48
to
9da0b3d
Compare
9da0b3d
to
af7c088
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@koba1t apologies for missing the ping. For the tests, one option is to init the project in-memory instead on disk, as that could possibly help us to reduce the number of files in the project just for testing purposes. Plus the scaffolded projects are not for users to refer and do not contain much of code making it easier to have templates for them. One option is with mapFs
(https://pkg.go.dev/testing/fstest#MapFS). Using this is easier because it let's us map the files and the contents. We could also use TestContainers (https://golang.testcontainers.org/features/build_from_dockerfile/#build-from-dockerfile) to build and use lightweight docker images for test.
I would not like to hold this PR based on the above suggestions though. We can merge this, and create an issue to investigate and follow up with a clean up, if that would make the process easier.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: koba1t, varshaprasad96 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
fix #5319