Pilot unit and integration test fixes#19790
Conversation
This reverts commit bd6d803a9ed81869e27ebff96f9c9d66678b9c56.
This reverts commit ae9b612b2416d640e58afb4850d109eb11e5e1f9.
…l be added in 'stats.go' automatically
|
Hi @seflerZ. Thanks for your PR. I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
Makefile
Outdated
| endif | ||
|
|
||
| RUN = $(CONTAINER_CLI) run -t -i --sig-proxy=true -u $(UID):$(GID) --rm \ | ||
| RUN = $(CONTAINER_CLI) run --sig-proxy=true -u $(UID):$(GID) --rm \ |
There was a problem hiding this comment.
This is no need to start the container in interactive and terminal mode because this is a automation process. And it will cause some trouble if the caller process didn't get assigned to a tty, so I just removed them.
There was a problem hiding this comment.
I think there are commands that run in a shell? I think there's a make shell that drops you into a shell in the docker container. Maybe there is a way to automatically detect this?
There was a problem hiding this comment.
I didn't find the "make shell" command and if I execute "make shell" in Istio src root. I got "make: *** No rule to make target 'shell'. Stop." error.
The "-t -i" options are used for user inputting from TTY. This is a automation process, no inputs needed from user. Removing this option doesn't affect shell script executing within docker container.
In some cases, if the caller doesn't get assigned to a shell (for example, a process started the building process), it will fail with error "input device is not a TTY". Therefore, I think it's better to remove this option.
There was a problem hiding this comment.
Its in another repo, there is a pr out to add the Target to all repos. I don't think there is any reason we need to limit this to not user input
There was a problem hiding this comment.
Okay, this patch can be ignored. I'll remove it later.
|
|
||
| server := createAndStartServer(liveServerStats) | ||
| defer server.Close() | ||
| probe := Probe{LocalHostAddr: "localhost", AdminPort: 1234} |
There was a problem hiding this comment.
Request HTTP without host is not allowed in HTTP1.1. I added them in some test cases, but encountered more empty host requests in test cases with updates from master branch. So I wrote a check in 'stats.go'(in the next diff window) and removed the redundant configurations.
|
@howardjohn Would you please take a look? |
|
/ok-to-test Just one question: Isn't this run in the current CI? Why doesn't it fail? |
The Istio CI runs tests and CI in local building tool chain, not docker and applied the default namespace "istio-system", so we wouldn't encounter those issues. |
Makefile
Outdated
| endif | ||
|
|
||
| RUN = $(CONTAINER_CLI) run -t -i --sig-proxy=true -u $(UID):$(GID) --rm \ | ||
| RUN = $(CONTAINER_CLI) run --sig-proxy=true -u $(UID):$(GID) --rm \ |
There was a problem hiding this comment.
I think there are commands that run in a shell? I think there's a make shell that drops you into a shell in the docker container. Maybe there is a way to automatically detect this?
Makefile
Outdated
| --mount type=volume,source=gocache,destination="/gocache" \ | ||
| $(CONDITIONAL_HOST_MOUNTS) \ | ||
| -w /work $(IMG) | ||
| -w /work/src/istio.io/istio $(IMG) |
There was a problem hiding this comment.
a couple notes on this
This file comes from the common-files repo so it shouldn't be modified there.
Moving the src to a path like this seems pretty reasonable, especially if we start mounting other local repos so you can reference them with ../api for example. Would like @sdake opinion here as well.
Note that the build tools support for this repo was merged in a few days ago only and is off by default due to a few minor issues like this one. If we don't decide to change the folder structure like this I have a patch locally I was working on that fixes the same problem
There was a problem hiding this comment.
Thanks @howardjohn. If we don't change the path, run unit tests through "make pilot-test" command will fall directly with env BUILD_WITH_CONTAINER=1.
There was a problem hiding this comment.
I understand, but there are other options to fix this as well. We should make sure this won't have other negative impact
There was a problem hiding this comment.
Okay, what's the next step? Wait for review from @sdake ?
There was a problem hiding this comment.
Yes, but it will need to be in the common-files repo. If we remove this part from the pr I'll approve all the other changes
There was a problem hiding this comment.
but yes I think we should get Steve to look at this, he put a lot of work into getting this working across all the repos and I am not familiar with why all of it works the way it does
There was a problem hiding this comment.
Okay, Thanks. I'll remove this and leave it there.
Makefile
Outdated
| $(DOCKER_SOCKET_MOUNT) \ | ||
| $(CONTAINER_OPTIONS) \ | ||
| --mount type=bind,source="$(PWD)",destination="/work" \ | ||
| --mount type=bind,source="$(GOPATH)",destination="/work" \ |
There was a problem hiding this comment.
what's the motivation for this? I think gopath is optional now
There was a problem hiding this comment.
oh nevermind we are mouning the entire gopath rather than just the working directory.
Makefile
Outdated
| --mount type=volume,source=gocache,destination="/gocache" \ | ||
| $(CONDITIONAL_HOST_MOUNTS) \ | ||
| -w /work $(IMG) | ||
| -w /work/src/istio.io/istio $(IMG) |
There was a problem hiding this comment.
but yes I think we should get Steve to look at this, he put a lot of work into getting this working across all the repos and I am not familiar with why all of it works the way it does
This PR resolves two issues in Pilot component:
✔ Fixed the corrupted docker building and unit testing process.(Moved here)✔ Fixed some tests not fully applied to namespace isolation in integration tests.
I'll explain those in details:
📃 The Istio integration test framework supports namespace customizing while deploying Istio despite the default "istio-system". But not all tests obeyed this instruction and even some of the configurations were hard coded in source. I fixed them up and tested.
⚠ Other Istio components may also have the same issues and need fix up but I focused on Pilot only this time.