-
Notifications
You must be signed in to change notification settings - Fork 31
AppSignals AutoMonitor integration testing #306
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
base: main
Are you sure you want to change the base?
Conversation
…h AutoMonitor and AnnotationMutators, check if safe to mutate before applying custom selector, run opt out tests for each type of workload, test opt out by disabling monitorallservices
CustomSelectors should obey autoRestart, autoAnnotateAutoInstrumentation shouldn't. Rename MonitorInterface to InstrumentationAnnotator. Add docs.
…ntation container validation by default. This is required for automonitor to work, because it tries to apply all init containers to each selected pod.
… update pod templates in workloads.
…el custom selector should not update pod template
…art namespace for autoAnnotateAutoInstrumentation.
|
will fail/be flakey until #311 is merged in |
* Implement patching and workload informers * Update EnableMultiInstrumentationSupport and SkipMultiInstrumentationContainerValidation feature flags to be enabled by default * incorporate feedback
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.
reviewed in #311
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.
reviewed in #311
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.
reviewed in #311
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.
reviewed in #311
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.
reviewed in #311
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.
reviewed in #311
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.
reviewed in #311
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.
reviewed in #311
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.
reviewed in #311
|
reopening to see status of integ tests |
| run: | | ||
| cd integration-tests/manifests/automonitor/ && \ | ||
| echo "tests<<EOF" >> $GITHUB_OUTPUT | ||
| go test -list . | sed -e '$d' >> $GITHUB_OUTPUT |
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.
nit, can we call the test directly using absolute path?
| go test -list . | sed -e '$d' >> $GITHUB_OUTPUT | |
| go test -list integration-tests/manifest/automonitor/ | sed -e '$d' >> $GITHUB_OUTPUT |
| - name: Start minikube | ||
| uses: medyagh/setup-minikube@master | ||
|
|
||
| - name: Deploy cert-manager to minikube |
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.
nit: at some point we should combine the start minikube, deploy cert-manager, and verify minikube and cert manager steps into their own workflow since they're used everywhere
| } | ||
| } | ||
| // sleep to give pods time to come up | ||
| time.Sleep(20 * time.Second) |
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.
nit: make a const
| h.updateOperatorConfig(deploymentArg{jsonStr, "--auto-annotation-config="}) | ||
| } | ||
|
|
||
| func (h *TestHelper) updateOperatorConfig(argList ...deploymentArg) { |
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.
Instead of modifying an existing operator deployment can't we apply a deployment object? or use yaml to force an update on the operator?
| flag string | ||
| } | ||
|
|
||
| func (h *TestHelper) ValidateNamespaceAnnotations(namespace string, shouldExist []string, shouldNotExist []string) error { |
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.
instead of having a shouldNotExist parameter, can't we just strictly check the shouldExist? Maybe we have some filter to only look at auto annotate prefixes?
| @@ -0,0 +1,32 @@ | |||
| apiVersion: apps/v1 | |||
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.
all of these manifests are pretty much identical but just different names. Can we re-use just 1?
| const TimeBetweenRetries = 5 * time.Second | ||
|
|
||
| // WaitForNewPodCreation takes in a resource either Deployment, DaemonSet, or StatefulSet wait until it is in running stage | ||
| func WaitForNewPodCreation(clientSet *kubernetes.Clientset, resource interface{}, startTime time.Time) error { |
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.
Why was this changed?
Description of changes:
mainBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.