-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Misc build/log changes #2623
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
Misc build/log changes #2623
Conversation
@@ -1024,6 +1024,7 @@ func NewDaemon(c *Config) (*Daemon, error) { | |||
return nil, fmt.Errorf("Unable to reserve IPv4 loopback address: %s", err) | |||
} | |||
d.loopbackIPv4 = loopbackIPv4 | |||
log.Infof("Loopback IPv4: %s", d.loopbackIPv4.String()) |
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.
Can you change line 1014
to Infof?
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.
Done.
@@ -2,6 +2,13 @@ provision = true | |||
# If you set provision to false the test will run without compile the code | |||
# again. | |||
|
|||
all: build |
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.
I'm on the fence here, does this means when I run make all
on the root directory it will also build ginkgo? If yes can we move the build
target to a test
target?
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.
Yes, that's the intention. It would build the tests, but not run ginkgo.
There's a couple of instances that I think motivate this:
- Late last year there was a case where someone refactored code in
pkg/
and ended up unintentionally breaking the building of tests. - Just this week I've done the same thing with PRs, eg renaming a variable and missing some cases.
I think that the easiest way to pick up on stuff like this is for developers to run make on their local machines before pushing, and for the default make command to also at least compile the tests.
The main argument I see against this is that it makes the build take longer. At this point it's a couple of seconds on my laptop.
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.
@aanm What would you like the behaviour to be for make all
and make -C test/ all
?
EDIT: I moved the ginkgo build into the root level tests-common
, let me know what you think.
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.
IMO make all
would be to generate the binaries, make tests
would execute the tests (including all the necessary ginkgo building). Gingko itself is not required to run cilium, that's why I think it doesn't make senses to build ginkgo as well
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.
OK, the latest version should achieve this. Specifically:
make
does not build the ginkgo tests.make tests
builds ginkgo tests, but does not run them (it runs only unit tests).make -C test
,cd test/ && make
will build ginkgo tests but not run them.make -C test/ test
,make -C test/ run
ormake -C test/ k8s
builds & runs ginkgo tests.
EDIT: For a bit of context, you might expect make tests
to run the tests, but it only runs the unit tests. IMO running all of the runtime and k8s tests on a local machine is not a reasonable thing to do off this target, considering the resource requirements and time to complete (dozens of minutes and would spin up perhaps 8 VMs, with each VM wanting 2-3GB of memory). Personally my workflow involves attempting specific runtime tests on my local machine via ginkgo
foo, then relying on the CI on PRs to catch the rest of the issues.
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.
@aanm Do you agree with this?
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.
yes I think it looks good, thanks!
2927e05
to
896fe4f
Compare
This address is used for services when directing traffic from a container to a service IP that is backed by itself. Log it so it's easier to grep around and figure out where it came from. Signed-off-by: Joe Stringer <joe@covalent.io>
tests/00-fmt.sh is invoked at build time to check the format of golang source code, so there's no need to invoke it again under runtime tests. Furthermore, the bash-based tests/ directory will be going away, so move this script to contrib/ while we're at it. Signed-off-by: Joe Stringer <joe@covalent.io>
Build the ginkgo tests as part of the regular make command, it doesn't take long and ensures that we don't end up inadvertently breaking ginkgo tests when refactoring common code. Signed-off-by: Joe Stringer <joe@covalent.io>
A few of the BPF object targets were only depending on the C source, and some were depending on nothing. Add the proper library dependencies to the make targets to ensure that they are rebuilt whenever library files change. Signed-off-by: Joe Stringer <joe@covalent.io>
Ensure this shows up in the cilium logs. Signed-off-by: Joe Stringer <joe@covalent.io>
896fe4f
to
d872aac
Compare
test-me-please |
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.
LGTM!
Install cloud CLIs so that you can run cilium-cli from inside a container and connect to AKS / EKS / GKE clusters. This commit also changes in-cluster scripts to use bash instead of sh. Some of these scripts are not POSIX-compliant, and they don't work with sh that comes with Ubuntu. Ref: #2623 Ref: cilium/design-cfps#9 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
Add image-repo and image-tag parameters to the cilium-cli action that set up cilium-cli to run inside a container. Update aks-byocni.yaml to run cilium-cli inside a container using the action instead of using cilium-cli-test-job-chart. Ref: #2623 Ref: cilium/design-cfps#9 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
Update gke.yaml to run cilium-cli inside a container instead of using cilium-cli-test-job-chart. Ref: #2623 Ref: #2627 Ref: cilium/design-cfps#9 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
Update externalworklads.yaml to run cilium-cli inside a container instead of using cilium-cli-test-job-chart. Ref: #2623 Ref: #2627 Ref: cilium/design-cfps#9 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
Update {eks,eks-tunnel}.yaml to run cilium-cli inside a container instead of using cilium-cli-test-job-chart. Ref: #2623 Ref: #2627 Ref: cilium/design-cfps#9 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
Update multicluster.yaml to run cilium-cli inside a container instead of using cilium-cli-test-job-chart. Ref: #2623 Ref: #2627 Ref: cilium/design-cfps#9 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
Now all the cloud workflows run cilium-cli inside a container instead of using cilium-cli-test-job-chart. Also update eks-tunnel.yaml and remove the helm install step. I forgot to remove it in 5146f46d. Fixes: #2623 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
[ cherry-picked from cilium/cilium-cli repository ] Install cloud CLIs so that you can run cilium-cli from inside a container and connect to AKS / EKS / GKE clusters. This commit also changes in-cluster scripts to use bash instead of sh. Some of these scripts are not POSIX-compliant, and they don't work with sh that comes with Ubuntu. Ref: #2623 Ref: cilium/design-cfps#9 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
[ cherry-picked from cilium/cilium-cli repository ] Add image-repo and image-tag parameters to the cilium-cli action that set up cilium-cli to run inside a container. Update aks-byocni.yaml to run cilium-cli inside a container using the action instead of using cilium-cli-test-job-chart. Ref: #2623 Ref: cilium/design-cfps#9 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
[ cherry-picked from cilium/cilium-cli repository ] Update gke.yaml to run cilium-cli inside a container instead of using cilium-cli-test-job-chart. Ref: #2623 Ref: #2627 Ref: cilium/design-cfps#9 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
[ cherry-picked from cilium/cilium-cli repository ] Update externalworklads.yaml to run cilium-cli inside a container instead of using cilium-cli-test-job-chart. Ref: #2623 Ref: #2627 Ref: cilium/design-cfps#9 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
[ cherry-picked from cilium/cilium-cli repository ] Update {eks,eks-tunnel}.yaml to run cilium-cli inside a container instead of using cilium-cli-test-job-chart. Ref: #2623 Ref: #2627 Ref: cilium/design-cfps#9 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
[ cherry-picked from cilium/cilium-cli repository ] Update multicluster.yaml to run cilium-cli inside a container instead of using cilium-cli-test-job-chart. Ref: #2623 Ref: #2627 Ref: cilium/design-cfps#9 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
[ cherry-picked from cilium/cilium-cli repository ] Now all the cloud workflows run cilium-cli inside a container instead of using cilium-cli-test-job-chart. Also update eks-tunnel.yaml and remove the helm install step. I forgot to remove it in 5146f46d. Fixes: #2623 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
[ cherry-picked from cilium/cilium-cli repository ] Install cloud CLIs so that you can run cilium-cli from inside a container and connect to AKS / EKS / GKE clusters. This commit also changes in-cluster scripts to use bash instead of sh. Some of these scripts are not POSIX-compliant, and they don't work with sh that comes with Ubuntu. Ref: #2623 Ref: cilium/design-cfps#9 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
[ cherry-picked from cilium/cilium-cli repository ] Add image-repo and image-tag parameters to the cilium-cli action that set up cilium-cli to run inside a container. Update aks-byocni.yaml to run cilium-cli inside a container using the action instead of using cilium-cli-test-job-chart. Ref: #2623 Ref: cilium/design-cfps#9 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
[ cherry-picked from cilium/cilium-cli repository ] Update gke.yaml to run cilium-cli inside a container instead of using cilium-cli-test-job-chart. Ref: #2623 Ref: #2627 Ref: cilium/design-cfps#9 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
[ cherry-picked from cilium/cilium-cli repository ] Update externalworklads.yaml to run cilium-cli inside a container instead of using cilium-cli-test-job-chart. Ref: #2623 Ref: #2627 Ref: cilium/design-cfps#9 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
[ cherry-picked from cilium/cilium-cli repository ] Update {eks,eks-tunnel}.yaml to run cilium-cli inside a container instead of using cilium-cli-test-job-chart. Ref: #2623 Ref: #2627 Ref: cilium/design-cfps#9 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
[ cherry-picked from cilium/cilium-cli repository ] Update multicluster.yaml to run cilium-cli inside a container instead of using cilium-cli-test-job-chart. Ref: #2623 Ref: #2627 Ref: cilium/design-cfps#9 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
[ cherry-picked from cilium/cilium-cli repository ] Now all the cloud workflows run cilium-cli inside a container instead of using cilium-cli-test-job-chart. Also update eks-tunnel.yaml and remove the helm install step. I forgot to remove it in 5146f46d. Fixes: #2623 Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
This PR pulls in a few misc Makefile and logging changes I've been trying out locally to improve debugging and developer workflows. Particularly noteworthy is the addition of the ginkgo build to the regular default
make
command. This means that tomake
, you now need ginkgo installed on your developer machine. This has been described in the documentation since commit 6771144 ("Documentation: Add ginkgo to developer guide"), so hopefully shouldn't be a surprise to anyone at this point.