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

[Chore] Test OpenTelemetry must-gather script #3387

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

IshwarKanse
Copy link
Contributor

Description:
The PR adds tests for OpenTelemetry Operator must-gather script, which collects troubleshooting data from the operator and CR instances.

--- PASS: chainsaw (89.11s)
    --- PASS: chainsaw/otlp-metrics-traces (89.11s)
    --- PASS: chainsaw/must-gather (76.85s)
PASS
Tests Summary...
- Passed  tests 2
- Failed  tests 0
- Skipped tests 0
Done.

@IshwarKanse IshwarKanse requested a review from a team as a code owner October 24, 2024 05:53
@IshwarKanse
Copy link
Contributor Author

cc @iblancasa

Copy link
Contributor

@jaronoff97 jaronoff97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this makes sense, but i'm wondering if we can try going one step further and checking that we get the expected metrics from the must gather? (i'm working on this in #3381 and would love us to do more of this)

Copy link
Contributor

@swiatekm swiatekm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, had some relatively minor comments.

#!/bin/bash

# Create the directory to store must-gather
MUST_GATHER_DIR=/tmp/must-gather
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use mktemp -d here instead of a fixed directory? I know we delete it at the end, but I'd like to minimize potential conflicts.

template: true
file: install-target-allocator.yaml
- assert:
file: install-target-allocator-assert.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is an assertion file, can we name it assert-target-allocator.yaml instead? It's easier to see at a glance what each yaml file represents if it's in the prefix.

catch:
- podLogs:
selector: app.kubernetes.io/component=opentelemetry-targetallocator
- name: assert-data-propagates
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we asserting this separately here, as opposed to putting it in install-target-allocator-assert.yaml?

- apply:
file: install-app.yaml
- assert:
file: install-app-assert.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, I'd prefer assert-app-installed.yaml.

name: ta
namespace: ($namespace)
---
apiVersion: opentelemetry.io/v1alpha1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we start using v1beta1 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants